Inheritance: IfcGeometricRepresentationItem, IfcGeometricSetSelect
Beispiel #1
0
 internal IfcLinearPositioningElement(DatabaseIfc db, IfcLinearPositioningElement e, DuplicateOptions options) : base(db, e, options)
 {
     if (e.Axis != null)
     {
         Axis = db.Factory.Duplicate(e.Axis) as IfcCurve;
     }
 }
 internal override void ParseXml(XmlElement xml)
 {
     base.ParseXml(xml);
     foreach (XmlNode child in xml.ChildNodes)
     {
         string name = child.Name;
         if (string.Compare(name, "OuterBoundary") == 0)
         {
             OuterBoundary = mDatabase.ParseXml <IfcCurve>(child as XmlElement);
         }
         else if (string.Compare(name, "InnerBoundaries") == 0)
         {
             List <IfcCurve> inners = new List <IfcCurve>(child.ChildNodes.Count);
             foreach (XmlNode cn in child.ChildNodes)
             {
                 IfcCurve c = mDatabase.ParseXml <IfcCurve>(cn as XmlElement);
                 if (c != null)
                 {
                     inners.Add(c);
                 }
             }
             InnerBoundaries = inners;
         }
     }
 }
Beispiel #3
0
        public override Transform Transform()
        {
            double tol = mDatabase == null ? 1e-5 : mDatabase.Tolerance;
            IfcDistanceExpression distanceExpression = Distance;
            IfcCurve curve = PlacementMeasuredAlong;
            Plane    plane = Plane.Unset;

            plane = curve.planeAt(distanceExpression, false, tol);
            if (plane.IsValid)
            {
                Vector3d xAxis = Vector3d.CrossProduct(plane.ZAxis, Vector3d.ZAxis);
                plane = new Plane(plane.Origin, xAxis, plane.ZAxis);

                if (plane.IsValid)
                {
                    IfcOrientationExpression orientationExpression = Orientation;
                    if (orientationExpression != null)
                    {
                        Vector3d x = orientationExpression.LateralAxisDirection.Vector3d, z = orientationExpression.VerticalAxisDirection.Vector3d;
                        Vector3d y = Vector3d.CrossProduct(z, x);
                        plane = new Plane(plane.Origin, x, y);
                    }
                    return(Rhino.Geometry.Transform.ChangeBasis(plane, Plane.WorldXY));
                }
            }
            if (CartesianPosition != null)
            {
                return(CartesianPosition.Transform());
            }

            return(Rhino.Geometry.Transform.Unset);
        }
Beispiel #4
0
 internal override void ParseXml(XmlElement xml)
 {
     base.ParseXml(xml);
     foreach (XmlNode child in xml.ChildNodes)
     {
         string name = child.Name;
         if (string.Compare(name, "BasisSurface") == 0)
         {
             BasisSurface = mDatabase.ParseXml <IfcPlane>(child as XmlElement);
         }
         else if (string.Compare(name, "OuterBoundary") == 0)
         {
             OuterBoundary = mDatabase.ParseXml <IfcCurve>(child as XmlElement);
         }
         else if (string.Compare(name, "InnerBoundaries") == 0)
         {
             foreach (XmlNode cn in child.ChildNodes)
             {
                 IfcCurve c = mDatabase.ParseXml <IfcCurve>(cn as XmlElement);
                 if (c != null)
                 {
                     addInnerBoundary(c);
                 }
             }
         }
     }
 }
Beispiel #5
0
 public IfcGridAxis(string tag, IfcCurve axis, bool sameSense) : base(axis.mDatabase)
 {
     if (!string.IsNullOrEmpty(tag))
     {
         mAxisTag = tag.Replace("'", "");
     }
     AxisCurve = axis; mSameSense = sameSense;
 }
Beispiel #6
0
 internal IfcGridAxis(DatabaseIfc m, string tag, IfcCurve axis, bool sameSense) : base(m)
 {
     if (!string.IsNullOrEmpty(tag))
     {
         mAxisTag = tag.Replace("'", "");
     }
     mAxisCurve = axis.mIndex; mSameSense = sameSense;
 }
Beispiel #7
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;
                            }
                        }
                    }
                }
            }
        }
        public override Curve Curve()
        {
            IfcCurve basisCurve = BasisCurve;
            IList <IfcDistanceExpression> offsets = OffsetValues;

            if (offsets.Count == 1)
            {
            }
            else
            {
                List <Point3d> points = new List <Point3d>();
            }

            return(null);
        }
        internal override void parse(string str, ref int pos, ReleaseVersion release, int len, ConcurrentDictionary <int, BaseClassIfc> dictionary)
        {
            base.parse(str, ref pos, release, len, dictionary);
            BaseClassIfc axis  = dictionary[ParserSTEP.StripLink(str, ref pos, len)];
            IfcCurve     curve = axis as IfcCurve;

            if (curve != null)
            {
                Axis = curve;
            }
            else
            {
                mAxis = axis as IfcLinearAxisSelect;
            }
        }
		//private List<int> mInnerCurves = new List<int>();// : SET [1:?] OF IfcCurve;
		internal override void ParseXml(XmlElement xml)
		{
			base.ParseXml(xml);
			foreach (XmlNode child in xml.ChildNodes)
			{
				string name = child.Name;
				if (string.Compare(name, "InnerCurves") == 0)
				{
					foreach (XmlNode cn in child.ChildNodes)
					{
						IfcCurve c = mDatabase.ParseXml<IfcCurve>(cn as XmlElement);
						if (c != null)
							addVoid(c);
					}
				}
			}
		}
Beispiel #11
0
		internal IfcCurveBoundedPlane(DatabaseIfc m, IfcPlane p, IfcCurve outer, List<IfcCurve> inner)
			: base(m) { mBasisSurface = p.mIndex; mOuterBoundary = outer.mIndex; mInnerBoundaries = inner.ConvertAll(x => x.mIndex); }
Beispiel #12
0
		internal IfcGridAxis(DatabaseIfc m, string tag, IfcCurve axis, bool sameSense) : base(m) { if (!string.IsNullOrEmpty(tag)) mAxisTag = tag.Replace("'", ""); mAxisCurve = axis.mIndex; mSameSense = sameSense; }
Beispiel #13
0
 public IfcLinearSpanPlacement(IfcCurve placementMeasuredAlong, IfcDistanceExpression distance, double span)
     : base(placementMeasuredAlong, distance)
 {
     Span = span;
 }
Beispiel #14
0
 public IfcLinearPlacementWithInclination(IfcCurve placementMeasuredAlong, IfcDistanceExpression distance, IfcAxisLateralInclination inclinating)
     : base(placementMeasuredAlong, distance)
 {
     Inclinating = inclinating;
 }
Beispiel #15
0
 public IfcLinearAxisWithInclination(DatabaseIfc db, IfcCurve directrix, IfcAxisLateralInclination inclinating)
     : base(db)
 {
     Directrix   = directrix;
     Inclinating = inclinating;
 }
Beispiel #16
0
		internal IfcPointOnCurve(DatabaseIfc m, IfcCurve c, double p) : base(m) { mBasisCurve = c.mIndex; mPointParameter = p; }
Beispiel #17
0
 internal IfcIntersectionCurve(IfcCurve curve, IfcPCurve p1, IfcPCurve p2, IfcPreferredSurfaceCurveRepresentation cr)
     : base(curve,p1,p2,cr)
 {
 }
Beispiel #18
0
 protected IfcLinearPositioningElement(DatabaseIfc db, IfcLinearPositioningElement e, DuplicateOptions options) : base(db, e, options)
 {
     Axis = db.Factory.Duplicate(e.Axis) as IfcCurve;
 }
Beispiel #19
0
 public IfcLinearPositioningElement(IfcSpatialStructureElement host, IfcCurve axis) : base(host)
 {
     Axis = axis;
 }
Beispiel #20
0
		public IfcAnnotationFillArea(IfcCurve outerBoundary) : base(outerBoundary.mDatabase) { OuterBoundary = outerBoundary; }
Beispiel #21
0
        internal double mStartParam = double.NaN; // : OPT IfcParameterValue;

        #endregion Fields

        #region Constructors

        public IfcFixedReferenceSweptAreaSolid(IfcProfileDef sweptArea, IfcCurve directrix, IfcDirection reference)
            : base(sweptArea)
        {
            Directrix = directrix;
            FixedReference = reference;
        }
Beispiel #22
0
 internal IfcGridAxis(DatabaseIfc db, IfcGridAxis a) : base(db)
 {
     mAxisTag = a.mAxisTag; AxisCurve = db.Factory.Duplicate(a.AxisCurve) as IfcCurve; mSameSense = a.mSameSense;
 }
Beispiel #23
0
 public IfcFixedReferenceSweptAreaSolid(IfcProfileDef sweptArea, IfcCurve directrix, IfcDirection reference) : base(sweptArea)
 {
     Directrix      = directrix;
     FixedReference = reference;
 }
Beispiel #24
0
 internal static void parseFields(IfcLine l, List <string> arrFields, ref int ipos)
 {
     IfcCurve.parseFields(l, arrFields, ref ipos); l.mPnt = ParserSTEP.ParseLink(arrFields[ipos++]); l.mDir = ParserSTEP.ParseLink(arrFields[ipos++]);
 }
Beispiel #25
0
		internal IfcArbitraryProfileDefWithVoids(string name, IfcBoundedCurve perim, IfcCurve inner) : base(name, perim) { mInnerCurves.Add(inner.mIndex); }
Beispiel #26
0
 public IfcLinearPlacement(IfcCurve placementMeasuredAlong, IfcDistanceExpression distance)
     : base(placementMeasuredAlong.Database)
 {
     PlacementMeasuredAlong = placementMeasuredAlong;
     Distance = distance;
 }
Beispiel #27
0
		internal IfcTrimmedCurve(IfcCurve basis, IfcTrimmingSelect start, IfcTrimmingSelect end, bool senseAgreement, IfcTrimmingPreference tp) : base(basis.mDatabase)
		{
			mBasisCurve = basis.mIndex;
			mTrim1 = start;
			mTrim2 = end;
			mSenseAgreement = senseAgreement;
			mMasterRepresentation = tp;
		}
Beispiel #28
0
 protected IfcLinearPositioningElement(IfcSite host, IfcCurve axis) : base(host)
 {
     Axis = axis;
 }
Beispiel #29
0
		internal static IfcShapeRepresentation getProfileRep(DatabaseIfc m, IfcCurve c) { return new IfcShapeRepresentation(c) { RepresentationIdentifier = "Profile", RepresentationType = "Curve3D" }; }
Beispiel #30
0
 public IfcInclinedReferenceSweptAreaSolid(IfcProfileDef sweptArea, IfcCurve directrix, IfcAxisLateralInclination inclinating)
     : base(sweptArea, directrix)
 {
     Inclinating = inclinating;
 }
Beispiel #31
0
		protected static void parseFields(IfcCurve c, List<string> arrFields, ref int ipos) { IfcGeometricRepresentationItem.parseFields(c, arrFields, ref ipos); }
Beispiel #32
0
		public IfcEdgeCurve(IfcVertexPoint start, IfcVertexPoint end, IfcCurve edge, bool sense) : base(start, end) { mEdgeGeometry = edge.mIndex; mSameSense = sense; }
Beispiel #33
0
		public IfcAnnotationFillArea(IfcCurve outerBoundary, List<IfcCurve> innerBoundaries) : this(outerBoundary) { InnerBoundaries = innerBoundaries; }
Beispiel #34
0
 internal IfcIntersectionCurve(IfcCurve curve, IfcPCurve p1, IfcPCurve p2, IfcPreferredSurfaceCurveRepresentation cr) : base(curve, p1, p2, cr)
 {
 }
Beispiel #35
0
 protected IfcLinearPositioningElement(DatabaseIfc db, IfcLinearPositioningElement e, IfcOwnerHistory ownerHistory, bool downStream) : base(db, e, ownerHistory, downStream)
 {
     Axis = db.Factory.Duplicate(e.Axis) as IfcCurve;
 }
Beispiel #36
0
		protected IfcCurve(IfcCurve c) : base(c) { }
Beispiel #37
0
		public IfcSweptDiskSolid(IfcCurve directrix, double radius, double innerRadius) : base(directrix.mDatabase) { Directrix = directrix; mRadius = radius; mInnerRadius = innerRadius; }