private void setShapeRep(List <IfcGridAxis> axis) { if (axis == null || axis.Count == 0) { return; } IfcProductDefinitionShape pds = Representation as IfcProductDefinitionShape; if (pds == null) { Representation = new IfcProductDefinitionShape(new IfcShapeRepresentation(new IfcGeometricCurveSet(axis.ConvertAll(x => (IfcGeometricSetSelect)x.AxisCurve)))); } else { foreach (IfcShapeModel sm in pds.Representations) { IfcShapeRepresentation sr = sm as IfcShapeRepresentation; if (sr != null) { foreach (IfcRepresentationItem gri in sr.Items) { IfcGeometricCurveSet curveSet = gri as IfcGeometricCurveSet; if (curveSet != null) { curveSet.addElements(axis.ConvertAll(x => (IfcGeometricSetSelect)x.AxisCurve)); return; } } } } } }
private void removeExistingFromShapeRep(List <IfcGridAxis> axis) { if (axis == null || axis.Count == 0) { return; } IfcProductDefinitionShape pds = Representation as IfcProductDefinitionShape; if (pds != null) { foreach (IfcShapeModel sm in pds.Representations) { IfcShapeRepresentation sr = sm as IfcShapeRepresentation; if (sr != null) { foreach (IfcRepresentationItem gri in sr.Items) { IfcGeometricCurveSet curveSet = gri as IfcGeometricCurveSet; if (curveSet != null) { axis.ForEach(x => curveSet.Elements.Remove(x.AxisCurve)); } } } } } }
private void setShapeRep(List <IfcGridAxis> axis) { if (axis == null || axis.Count == 0) { return; } IfcProductDefinitionShape pds = Representation as IfcProductDefinitionShape; if (pds == null) { List <IfcGeometricSetSelect> set = new List <IfcGeometricSetSelect>(); foreach (IfcGridAxis a in axis) { IfcCurve c = a.AxisCurve; if (c != null) { set.Add(c); } } if (set.Count > 0) { Representation = new IfcProductDefinitionShape(new IfcShapeRepresentation(mDatabase.Factory.SubContext(IfcGeometricRepresentationSubContext.SubContextIdentifier.FootPrint), new IfcGeometricCurveSet(set), ShapeRepresentationType.GeometricCurveSet)); } } else { foreach (IfcShapeModel sm in pds.Representations) { IfcShapeRepresentation sr = sm as IfcShapeRepresentation; if (sr != null) { foreach (IfcRepresentationItem gri in sr.Items) { IfcGeometricCurveSet curveSet = gri as IfcGeometricCurveSet; if (curveSet != null) { foreach (IfcGridAxis a in axis) { IfcCurve c = a.AxisCurve; if (c != null && !curveSet.Elements.Contains(c)) { curveSet.Elements.Add(c); } } return; } } } } } }
internal IfcGeometricCurveSet(DatabaseIfc db, IfcGeometricCurveSet s, DuplicateOptions options) : base(db, s, options) { }
internal new static IfcGeometricCurveSet Parse(string strDef) { IfcGeometricCurveSet s = new IfcGeometricCurveSet(); int ipos = 0; parseFields(s, ParserSTEP.SplitLineFields(strDef), ref ipos); return s; }
internal static void parseFields(IfcGeometricCurveSet s, List<string> arrFields, ref int ipos) { IfcGeometricSet.parseFields(s, arrFields, ref ipos); }
internal IfcGeometricCurveSet(IfcGeometricCurveSet p) : base(p) { }
internal new static IfcGeometricCurveSet Parse(string strDef) { IfcGeometricCurveSet s = new IfcGeometricCurveSet(); int ipos = 0; parseFields(s, ParserSTEP.SplitLineFields(strDef), ref ipos); return(s); }
internal static void parseFields(IfcGeometricCurveSet s, List <string> arrFields, ref int ipos) { IfcGeometricSet.parseFields(s, arrFields, ref ipos); }
internal IfcGeometricCurveSet(DatabaseIfc db, IfcGeometricCurveSet s) : base(db, s) { }
internal new static IfcGeometricCurveSet Parse(string str) { IfcGeometricCurveSet s = new IfcGeometricCurveSet(); s.parse(str); return(s); }
internal static new IfcGeometricCurveSet Parse(string str) { IfcGeometricCurveSet s = new IfcGeometricCurveSet(); s.parse(str); return s; }
internal IfcGeometricCurveSet(DatabaseIfc db, IfcGeometricCurveSet s) : base(db,s) { }
internal static IfcShapeRepresentation getRowRep(DatabaseIfc m, IfcGeometricCurveSet cs) { return new IfcShapeRepresentation(cs) { RepresentationIdentifier = "Row", RepresentationType = "GeometricCurveSet" }; }