diff --git a/features/VRT000_Virtual-elements.feature b/features/VRT000_Virtual-elements.feature new file mode 100644 index 00000000..fe19d909 --- /dev/null +++ b/features/VRT000_Virtual-elements.feature @@ -0,0 +1,16 @@ +@implementer-agreement +@VRT +@version1 +@E00020 + +Feature: VRT000 - Virtual Elements + The rule verifies the presence of IFC entities used to model special elements providing imaginary, placeholder, or provisional areas (e.g. clearance), volumes, and boundaries. + + + Scenario: Check for activation + + Given an IfcVirtualElement + + Then The IFC model contains information on the selected functional part + + diff --git a/test/files/vrt000/generate.py b/test/files/vrt000/generate.py new file mode 100644 index 00000000..5b81b455 --- /dev/null +++ b/test/files/vrt000/generate.py @@ -0,0 +1,15 @@ +import ifcopenshell +import ifcopenshell.template +import uuid + +create_guid = lambda: ifcopenshell.guid.compress(uuid.uuid1().hex) + +file = ifcopenshell.template.create(schema_identifier="IFC4X3_ADD2") +building_parent = proj = file.by_type("IfcProject")[0] +owner = file.by_type("IfcOwnerHistory")[0] + +file.write('na-vrt000-no_virtual_element.ifc') + +file.createIfcVirtualElement(create_guid(), owner) + +file.write('pass-vrt000-virtual_element_present.ifc') diff --git a/test/files/vrt000/na-vrt000-no_virtual_element.ifc b/test/files/vrt000/na-vrt000-no_virtual_element.ifc new file mode 100644 index 00000000..9385f6f5 --- /dev/null +++ b/test/files/vrt000/na-vrt000-no_virtual_element.ifc @@ -0,0 +1,29 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2024-10-23T14:56:11',(''),(''),'IfcOpenShell-0.7.11-d51fa2c5f','IfcOpenShell-0.7.11-d51fa2c5f',''); +FILE_SCHEMA(('IFC4X3_ADD2')); +ENDSEC; +DATA; +#1=IFCPERSON($,$,'',$,$,$,$,$); +#2=IFCORGANIZATION($,'',$,$,$); +#3=IFCPERSONANDORGANIZATION(#1,#2,$); +#4=IFCAPPLICATION(#2,'0.7.11-d51fa2c5f','IfcOpenShell-0.7.11-d51fa2c5f',''); +#5=IFCOWNERHISTORY(#3,#4,$,.NOTDEFINED.,$,#3,#4,1729695371); +#6=IFCDIRECTION((1.,0.,0.)); +#7=IFCDIRECTION((0.,0.,1.)); +#8=IFCCARTESIANPOINT((0.,0.,0.)); +#9=IFCAXIS2PLACEMENT3D(#8,#7,#6); +#10=IFCDIRECTION((0.,1.)); +#11=IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,1.E-05,#9,#10); +#12=IFCDIMENSIONALEXPONENTS(0,0,0,0,0,0,0); +#13=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.); +#14=IFCSIUNIT(*,.AREAUNIT.,$,.SQUARE_METRE.); +#15=IFCSIUNIT(*,.VOLUMEUNIT.,$,.CUBIC_METRE.); +#16=IFCSIUNIT(*,.PLANEANGLEUNIT.,$,.RADIAN.); +#17=IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(0.017453292519943295),#16); +#18=IFCCONVERSIONBASEDUNIT(#12,.PLANEANGLEUNIT.,'DEGREE',#17); +#19=IFCUNITASSIGNMENT((#13,#14,#15,#18)); +#20=IFCPROJECT('0pAItsL3j8uvHBHoWcteB6',#5,'',$,$,$,$,(#11),#19); +ENDSEC; +END-ISO-10303-21; diff --git a/test/files/vrt000/pass-vrt000-virtual_element_present.ifc b/test/files/vrt000/pass-vrt000-virtual_element_present.ifc new file mode 100644 index 00000000..2c473b09 --- /dev/null +++ b/test/files/vrt000/pass-vrt000-virtual_element_present.ifc @@ -0,0 +1,30 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1'); +FILE_NAME('','2024-10-23T14:56:11',(''),(''),'IfcOpenShell-0.7.11-d51fa2c5f','IfcOpenShell-0.7.11-d51fa2c5f',''); +FILE_SCHEMA(('IFC4X3_ADD2')); +ENDSEC; +DATA; +#1=IFCPERSON($,$,'',$,$,$,$,$); +#2=IFCORGANIZATION($,'',$,$,$); +#3=IFCPERSONANDORGANIZATION(#1,#2,$); +#4=IFCAPPLICATION(#2,'0.7.11-d51fa2c5f','IfcOpenShell-0.7.11-d51fa2c5f',''); +#5=IFCOWNERHISTORY(#3,#4,$,.NOTDEFINED.,$,#3,#4,1729695371); +#6=IFCDIRECTION((1.,0.,0.)); +#7=IFCDIRECTION((0.,0.,1.)); +#8=IFCCARTESIANPOINT((0.,0.,0.)); +#9=IFCAXIS2PLACEMENT3D(#8,#7,#6); +#10=IFCDIRECTION((0.,1.)); +#11=IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,1.E-05,#9,#10); +#12=IFCDIMENSIONALEXPONENTS(0,0,0,0,0,0,0); +#13=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.); +#14=IFCSIUNIT(*,.AREAUNIT.,$,.SQUARE_METRE.); +#15=IFCSIUNIT(*,.VOLUMEUNIT.,$,.CUBIC_METRE.); +#16=IFCSIUNIT(*,.PLANEANGLEUNIT.,$,.RADIAN.); +#17=IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(0.017453292519943295),#16); +#18=IFCCONVERSIONBASEDUNIT(#12,.PLANEANGLEUNIT.,'DEGREE',#17); +#19=IFCUNITASSIGNMENT((#13,#14,#15,#18)); +#20=IFCPROJECT('0pAItsL3j8uvHBHoWcteB6',#5,'',$,$,$,$,(#11),#19); +#21=IFCVIRTUALELEMENT('3nB75UaKuHxwNb_Anb_eAl',#5,$,$,$,$,$,$,$); +ENDSEC; +END-ISO-10303-21;