コード例 #1
0
 public IXbimSolidSet CreateSolidSet(IIfcPolygonalFaceSet shell, ILogger logger)
 {
     using (new Tracer(LogHelper.CurrentFunctionName(), this._logger, shell))
     {
         return(_engine.CreateSolidSet(shell, logger));
     }
 }
コード例 #2
0
 public IXbimGeometryObjectSet CreateSurfaceModel(IIfcPolygonalFaceSet shell, ILogger logger = null)
 {
     using (new Tracer(LogHelper.CurrentFunctionName(), this._logger, shell))
     {
         return(_engine.CreateSurfaceModel(shell, logger));
     }
 }
コード例 #3
0
        private XbimShapeGeometry MeshPolyhedronBinary(IIfcPolygonalFaceSet tess)
        {
            var faces = new List <IList <IIfcFace> >();

            faces.Add(new XbimPolygonalFaceSet(tess));
            return(Mesh(faces, tess.EntityLabel, (float)tess.Model.ModelFactors.Precision));
        }
コード例 #4
0
ファイル: GeometryView.cs プロジェクト: wyh9462/XbimWindowsUI
        private static void Report(IIfcPolygonalFaceSet obj, TextHighliter sb)
        {
            // - Coordinates    Ifc4.GeometricModelResource.IfcCartesianPointList3D from: IfcTessellatedFaceSet
            // - Closed         Ifc4.MeasureResource.IfcBoolean(Nullable)
            // - Faces          Ifc4.GeometricModelResource.IfcIndexedPolygonalFace(IItemSet)
            // - PnIndex        Ifc4.MeasureResource.IfcPositiveInteger(IOptionalItemSet)

            // sb.Append($"-LAYER M {bound.Points.Count} ", Brushes.Black);
            if (obj.PnIndex != null && obj.PnIndex.Any())
            {
                // todo: implement PnIndex behaviour
                sb.Append("; Warning: PnIndex not implemented in mesher yet.", Brushes.Red);
            }

            foreach (var face in obj.Faces)
            {
                sb.Append("3DPOLY", Brushes.Black);
                foreach (var index in face.CoordIndex)
                {
                    if (index > int.MaxValue)
                    {
                        sb.Append($";value too long for int in face", Brushes.Black);
                        continue;
                    }
                    int asInt = (int)index;
                    var pt    = obj.Coordinates.CoordList[asInt - 1];
                    WritePointCoord(sb, pt);
                }
                sb.Append($"", Brushes.Black);
                sb.Append($"-HYPERLINK I O l  #{face.EntityLabel}", Brushes.Black);
                sb.Append($"", Brushes.Black);
                sb.Append($"", Brushes.Black);
            }
        }
コード例 #5
0
 public XbimShapeGeometry Mesh(IIfcPolygonalFaceSet triangulation)
 {
     if (_geometryType == XbimGeometryType.PolyhedronBinary)
     {
         return(MeshPolyhedronBinary(triangulation));
     }
     if (_geometryType == XbimGeometryType.Polyhedron)
     {
         return(MeshPolyhedronText(triangulation));
     }
     throw new Exception("Illegal Geometry type, " + _geometryType);
 }
コード例 #6
0
 private XbimShapeGeometry MeshPolyhedronText(IIfcPolygonalFaceSet triangulation)
 {
     throw new NotImplementedException();
 }
コード例 #7
0
 public XbimPolygonalFaceSet(IIfcPolygonalFaceSet faceSet)
 {
     _faceSet = faceSet;
 }