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