//-------------------------------------------------------------------------------------------------- void _CreateLayer(List <VectorExportLayer> layers, VectorExportLayerType layerTypeType, HlrEdgeType edgeType1, HlrEdgeType edgeType2, HlrBRepAlgoBase hlrAlgo) { var shape1 = _IncludeEdgeTypes.Contains(edgeType1) ? hlrAlgo.GetResult(edgeType1) : null; var shape2 = _IncludeEdgeTypes.Contains(edgeType2) ? hlrAlgo.GetResult(edgeType2) : null; if (shape1 != null && shape2 != null) { var builder = new BRep_Builder(); var compound = new TopoDS_Compound(); builder.MakeCompound(compound); builder.Add(compound, hlrAlgo.GetResult(edgeType1)); builder.Add(compound, hlrAlgo.GetResult(edgeType2)); layers.Add(new VectorExportLayer(layerTypeType, compound)); } else if (shape1 != null) { layers.Add(new VectorExportLayer(layerTypeType, shape1)); } else if (shape2 != null) { layers.Add(new VectorExportLayer(layerTypeType, shape2)); } }
public VectorExportLayer(VectorExportLayerType type, TopoDS_Shape bRep) { Type = type; BRep = bRep; Name = type.ToString(); }
public VectorExportLayer(VectorExportLayerType type, string name, TopoDS_Shape bRep) { Type = type; Name = name; BRep = bRep; }