Inheritance: IfcGeometricSet
Beispiel #1
0
        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;
                            }
                        }
                    }
                }
            }
        }
Beispiel #2
0
        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));
                            }
                        }
                    }
                }
            }
        }
Beispiel #3
0
        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;
                            }
                        }
                    }
                }
            }
        }
Beispiel #4
0
 internal IfcGeometricCurveSet(DatabaseIfc db, IfcGeometricCurveSet s, DuplicateOptions options) : base(db, s, options)
 {
 }
Beispiel #5
0
		internal new static IfcGeometricCurveSet Parse(string strDef) { IfcGeometricCurveSet s = new IfcGeometricCurveSet(); int ipos = 0; parseFields(s, ParserSTEP.SplitLineFields(strDef), ref ipos); return s; }
Beispiel #6
0
		internal static void parseFields(IfcGeometricCurveSet s, List<string> arrFields, ref int ipos) { IfcGeometricSet.parseFields(s, arrFields, ref ipos); }
Beispiel #7
0
		internal IfcGeometricCurveSet(IfcGeometricCurveSet p) : base(p) { }
Beispiel #8
0
 internal new static IfcGeometricCurveSet Parse(string strDef)
 {
     IfcGeometricCurveSet s = new IfcGeometricCurveSet(); int ipos = 0; parseFields(s, ParserSTEP.SplitLineFields(strDef), ref ipos); return(s);
 }
Beispiel #9
0
 internal static void parseFields(IfcGeometricCurveSet s, List <string> arrFields, ref int ipos)
 {
     IfcGeometricSet.parseFields(s, arrFields, ref ipos);
 }
Beispiel #10
0
 internal IfcGeometricCurveSet(DatabaseIfc db, IfcGeometricCurveSet s) : base(db, s)
 {
 }
Beispiel #11
0
 internal IfcGeometricCurveSet(IfcGeometricCurveSet p) : base(p)
 {
 }
Beispiel #12
0
 internal new static IfcGeometricCurveSet Parse(string str)
 {
     IfcGeometricCurveSet s = new IfcGeometricCurveSet(); s.parse(str); return(s);
 }
Beispiel #13
0
 internal static new IfcGeometricCurveSet Parse(string str)
 {
     IfcGeometricCurveSet s = new IfcGeometricCurveSet(); s.parse(str); return s;
 }
Beispiel #14
0
 internal IfcGeometricCurveSet(DatabaseIfc db, IfcGeometricCurveSet s)
     : base(db,s)
 {
 }
Beispiel #15
0
		internal static IfcShapeRepresentation getRowRep(DatabaseIfc m, IfcGeometricCurveSet cs) { return new IfcShapeRepresentation(cs) { RepresentationIdentifier = "Row", RepresentationType = "GeometricCurveSet" }; }