/// <summary> /// Return geometry for a particular representation item. /// </summary> /// <param name="shapeEditScope">The shape edit scope.</param> /// <param name="lcs">Local coordinate system for the geometry, without scale.</param> /// <param name="scaledLcs">Local coordinate system for the geometry, including scale, potentially non-uniform.</param> /// <param name="guid">The guid of an element for which represntation is being created.</param> /// <returns>The created geometry.</returns> protected override IList<GeometryObject> CreateGeometryInternal( IFCImportShapeEditScope shapeEditScope, Transform lcs, Transform scaledLcs, string guid) { shapeEditScope.StartCollectingFaceSet(); Outer.CreateShape(shapeEditScope, lcs, scaledLcs, guid); IList<GeometryObject> geomObjs = shapeEditScope.CreateGeometry(guid); if (geomObjs == null || geomObjs.Count == 0) return null; return geomObjs; }
/// <summary> /// Return geometry for a particular representation item. /// </summary> /// <param name="shapeEditScope">The shape edit scope.</param> /// <param name="lcs">Local coordinate system for the geometry, without scale.</param> /// <param name="scaledLcs">Local coordinate system for the geometry, including scale, potentially non-uniform.</param> /// <param name="guid">The guid of an element for which represntation is being created.</param> /// <returns>The created geometry.</returns> /// <remarks>As this doesn't inherit from IfcSolidModel, this is a non-virtual CreateSolid function.</remarks> protected IList<GeometryObject> CreateGeometry( IFCImportShapeEditScope shapeEditScope, Transform lcs, Transform scaledLcs, string guid) { if (Shells.Count == 0) return null; shapeEditScope.StartCollectingFaceSet(); foreach (IFCConnectedFaceSet faceSet in Shells) faceSet.CreateShape(shapeEditScope, lcs, scaledLcs, guid); IList<GeometryObject> geomObjs = shapeEditScope.CreateGeometry(guid); if (geomObjs == null || geomObjs.Count == 0) return null; return geomObjs; }
/// <summary> /// Return geometry for a particular representation item. /// </summary> /// <param name="shapeEditScope">The shape edit scope.</param> /// <param name="lcs">Local coordinate system for the geometry, without scale.</param> /// <param name="scaledLcs">Local coordinate system for the geometry, including scale, potentially non-uniform.</param> /// <param name="guid">The guid of an element for which represntation is being created.</param> /// <returns>The created geometry.</returns> /// <remarks>As this doesn't inherit from IfcSolidModel, this is a non-virtual CreateGeometry function.</remarks> protected IList<GeometryObject> CreateGeometry(IFCImportShapeEditScope shapeEditScope, Transform lcs, Transform scaledLcs, string guid) { if (Shells.Count == 0) return null; using (IFCImportShapeEditScope.IFCTargetSetter setter = new IFCImportShapeEditScope.IFCTargetSetter(shapeEditScope, TessellatedShapeBuilderTarget.AnyGeometry, TessellatedShapeBuilderFallback.Mesh)) { shapeEditScope.StartCollectingFaceSet(); foreach (IFCConnectedFaceSet faceSet in Shells) faceSet.CreateShape(shapeEditScope, lcs, scaledLcs, guid); IList<GeometryObject> geomObjs = shapeEditScope.CreateGeometry(guid); if (geomObjs == null || geomObjs.Count == 0) return null; return geomObjs; } }