public ViewController() { _ifcEngine = new IfcEngine(); _treeData = new CIFCTreeData(_ifcEngine); _meshToIfcItems = new Dictionary <MeshGeometryVisual3D, IFCItem>(); _minCorner = new float[3] { float.MaxValue, float.MaxValue, float.MaxValue }; _maxCorner = new float[3] { float.MinValue, float.MinValue, float.MinValue }; }
public ViewController(bool makeModelCentered = true) { _ifcEngine = new IfcEngine(); _treeData = new CIFCTreeData(_ifcEngine); _meshToIfcItems = new Dictionary <MeshGeometryModel3D, IFCItem>(); _minCorner = new float[3] { float.MaxValue, float.MaxValue, float.MaxValue }; _maxCorner = new float[3] { float.MinValue, float.MinValue, float.MinValue }; _makeModelCentered = makeModelCentered; }
public void init(string ifcFile, string ifcSchema) { _ifcEngine = new IfcEngine(); _ifcModel = _ifcEngine.OpenModel(IntPtr.Zero, ifcFile, ifcSchema); ifcProp2IfcPropType = new Dictionary <string, string>(); ifcProp2IfcPropValueType = new Dictionary <string, string>(); ifcPropSetTypeByIfcPropType = new Dictionary <string, string>(); ifcElemntContainerTypeByIfcPropType = new Dictionary <string, string>(); ifcProp2IfcPropType.Add("NetVolume", "IfcQuantityVolume"); ifcProp2IfcPropValueType.Add("NetVolume", "VolumeValue"); ifcProp2IfcPropType.Add("Weight", "IfcPropertySingleValue"); ifcProp2IfcPropValueType.Add("Weight", "NominalValue"); ifcProp2IfcPropType.Add("Profile", "IfcPropertySingleValue"); ifcProp2IfcPropValueType.Add("Profile", "NominalValue"); ifcPropSetTypeByIfcPropType.Add("IfcQuantityVolume", "IfcElementQuantity"); ifcPropSetTypeByIfcPropType.Add("IfcPropertySingleValue", "IfcPropertySet"); ifcElemntContainerTypeByIfcPropType.Add("IfcElementQuantity", "Quantities"); ifcElemntContainerTypeByIfcPropType.Add("IfcPropertySet", "hasProperties"); #region commented Oleg' code //if (!String.Empty.Equals(ifcFilePath)) //{ // _ifcEngine = new IfcEngine(); // path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location); // // open model // _ifcModel = _ifcEngine.OpenModel(IntPtr.Zero, @ifcFilePath, @String.Concat(path, @"/IFC2X3_TC1.exp")); // if (IntPtr.Zero.Equals(_ifcModel)) // { // throw new Exception("Error: incorrect file name"); // } //} //else //{ // throw new Exception("Error: incorrect file name"); //} #endregion }
public void init(String ifcFilePath) { if (!String.Empty.Equals(ifcFilePath)) { _ifcEngine = new IfcEngine(); path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location); // open model _ifcModel = _ifcEngine.OpenModel(IntPtr.Zero, @ifcFilePath, @String.Concat(path, @"/IFC2X3_TC1.exp")); if (IntPtr.Zero.Equals(_ifcModel)) { throw new Exception("Error: incorrect file name"); } } else { throw new Exception("Error: incorrect file name"); } }
public CIFCTreeData(IfcEngine ifcEngine) { _ifcEngine = ifcEngine; }