Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR for issue #502 : Optional IfcLogical #503

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Tests/OptionalIfcLogicalTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xbim.Ifc2x3.MeasureResource;
using Xbim.Ifc4.Interfaces;
using Xbim.IO.Memory;

namespace Xbim.Essentials.Tests
{
/// <summary>
/// For failing on IfcMaterialLayer.IsVentilated : OPTIONAL IfcLogical
/// </summary>
[TestClass]
public class OptionalIfcLogicalTest
{
[TestMethod]
public void IfcMaterialLayerTest()
{
var ifcPath = "TestFiles/IfcMaterialLayerTestFile.ifc";
using(MemoryModel model = MemoryModel.OpenReadStep21(ifcPath))
{
var entity = model.Instances[347] as IIfcMaterialLayer;
Assert.IsNotNull(entity);
Assert.IsNotNull(entity.IsVentilated);
Assert.Equals(entity.IsVentilated.ToString(), ".U.");
Assert.Equals(entity.ToString(),
"#347=IFCMATERIALLAYER(#326,417.,.U.,'Component 1',$,$,$);");
}
}
}
}
54 changes: 54 additions & 0 deletions Tests/TestFiles/IfcMaterialLayerTestFile.ifc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [Design_Transfer_View]'),'2;1');
FILE_NAME('./Duplex_A_ifc4.ifc','2019-05-07T17:09:22',('Architect'),('Building Designer Office'),'The EXPRESS Data Manager Version 5.02.0100.09 : 26 Sep 2013','IFC file generated by GRAPHISOFT ARCHICAD-64 22.0.0.','The authorising person');
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#85= IFCDIRECTION((1.,0.,0.));
#87= IFCDIRECTION((0.,0.,1.));
#89= IFCCARTESIANPOINT((0.,0.,0.));
#91= IFCAXIS2PLACEMENT3D(#89,#87,#85);
#92= IFCLOCALPLACEMENT($,#91);
#113= IFCDIRECTION((1.,0.,0.));
#115= IFCDIRECTION((0.,0.,1.));
#117= IFCCARTESIANPOINT((0.,0.,0.));
#119= IFCAXIS2PLACEMENT3D(#117,#115,#113);
#120= IFCLOCALPLACEMENT(#92,#119);
#169= IFCDIRECTION((1.,0.,0.));
#171= IFCDIRECTION((0.,0.,1.));
#173= IFCCARTESIANPOINT((0.,0.,-1250.));
#175= IFCAXIS2PLACEMENT3D(#173,#171,#169);
#176= IFCLOCALPLACEMENT(#120,#175);
#237= IFCDIRECTION((1.,0.,0.));
#239= IFCDIRECTION((0.,0.,1.));
#241= IFCCARTESIANPOINT((208.5,-208.5,0.));
#243= IFCAXIS2PLACEMENT3D(#241,#239,#237);
#244= IFCLOCALPLACEMENT(#176,#243);
#248= IFCCARTESIANPOINT((208.5,-208.5));
#250= IFCCARTESIANPOINT((8174.5,-208.5));
#252= IFCCARTESIANPOINT((8591.5,208.5));
#254= IFCCARTESIANPOINT((-208.5,208.5));
#256= IFCPOLYLINE((#248,#250,#252,#254,#248));
#258= IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,'',#256);
#261= IFCDIRECTION((1.,0.,0.));
#263= IFCDIRECTION((0.,0.,1.));
#265= IFCCARTESIANPOINT((0.,0.,0.));
#267= IFCAXIS2PLACEMENT3D(#265,#263,#261);
#268= IFCDIRECTION((0.,0.,1.));
#270= IFCEXTRUDEDAREASOLID(#258,#267,#268,1250.);
#280= IFCSHAPEREPRESENTATION(#246,'Body','SweptSolid',(#270));
#287= IFCPRESENTATIONLAYERASSIGNMENT('A-WALL-MBNI.IFC Model',$,(#280,#297),$);
#297= IFCSHAPEREPRESENTATION(#290,'Axis','Curve2D',(#295));
#291= IFCCARTESIANPOINT((0.,0.));
#293= IFCCARTESIANPOINT((8383.,0.));
#295= IFCPOLYLINE((#291,#293));
#301= IFCPRODUCTDEFINITIONSHAPE($,$,(#280,#297));
#307= IFCWALLSTANDARDCASE('2O2Fr$t4X7Zf8NOew3FK80',$,'Basic Wall:Foundation - Concrete (417mm):140479',$,'Basic Wall:Foundation - Concrete (417mm):128676',#244,#301,'140479',$);
#326= IFCMATERIAL('Concrete - Cast In Situ',$,$);
#347= IFCMATERIALLAYER(#326,417.,.U.,'Component 1',$,$,$);
#349= IFCMATERIALLAYERSET((#347),'Concrete - Cast In Situ 417',$);
#352= IFCMATERIALLAYERSETUSAGE(#349,.AXIS2.,.POSITIVE.,-208.5,$);
#354 = IFCRELASSOCIATESMATERIAL('3nhziuMrHzR_A3$qPzE8R4',$,$,$,(#307),#352);
ENDSEC;
END-ISO-10303-21;