Inheritance: IfcConic
        internal IfcTrimmedCurve(DatabaseIfc db, Arc a, bool twoD, IfcCartesianPoint optStrt, out IfcCartesianPoint end) : base(db)
        {
            Point3d  o = a.Plane.Origin, s = a.StartPoint, e = a.EndPoint;
            Vector3d x = s - o;

            mSenseAgreement = true;
            if (optStrt == null)
            {
                optStrt = twoD ? new IfcCartesianPoint(db, new Point2d(s.X, s.Y)) : new IfcCartesianPoint(db, s);
            }
            end = twoD ? new IfcCartesianPoint(db, new Point2d(e.X, e.Y)) : new IfcCartesianPoint(db, e);
            double angleFactor = mDatabase.mContext.UnitsInContext.getScaleSI(IfcUnitEnum.PLANEANGLEUNIT);

            if (twoD)
            {
                if (a.Plane.ZAxis.Z < 0)
                {
                    mSenseAgreement = false;
                    x = e - o;
                    IfcAxis2Placement2D ap = new IfcAxis2Placement2D(db, new Point2d(o.X, o.Y), new Vector2d(x.X, x.Y));
                    BasisCurve = new IfcCircle(ap, a.Radius);
                    mTrim1     = new IfcTrimmingSelect(a.Angle / angleFactor, optStrt);
                    mTrim2     = new IfcTrimmingSelect(0, end);
                }
                else
                {
                    IfcAxis2Placement2D ap = new IfcAxis2Placement2D(db, new Point2d(o.X, o.Y), new Vector2d(x.X, x.Y));
                    BasisCurve = new IfcCircle(ap, a.Radius);
                    mTrim1     = new IfcTrimmingSelect(0, optStrt);
                    mTrim2     = new IfcTrimmingSelect(a.Angle / angleFactor, end);
                }
            }
            else
            {
                Vector3d            y  = Vector3d.CrossProduct(a.Plane.ZAxis, x);
                Plane               pl = new Plane(o, x, y);
                IfcAxis2Placement3D ap = new IfcAxis2Placement3D(db, pl);
                BasisCurve = new IfcCircle(ap, a.Radius);
                mTrim1     = new IfcTrimmingSelect(0, optStrt);
                mTrim2     = new IfcTrimmingSelect(a.Angle / angleFactor, end);
            }
            mMasterRepresentation = IfcTrimmingPreference.PARAMETER;
        }
Exemplo n.º 2
0
 internal IfcTrimmedCurve(DatabaseIfc db, Arc a, bool twoD, IfcCartesianPoint optStrt, out IfcCartesianPoint end)
     : base(db)
 {
     Point3d o = a.Plane.Origin, s = a.StartPoint, e = a.EndPoint;
     Vector3d x = s - o;
     mSenseAgreement = true;
     if (optStrt == null)
         optStrt = twoD ? new IfcCartesianPoint(db, new Point2d(s.X, s.Y)) : new IfcCartesianPoint(db, s);
     end = twoD ? new IfcCartesianPoint(db, new Point2d(e.X, e.Y)) : new IfcCartesianPoint(db,e);
     double angleFactor = mDatabase.mContext.UnitsInContext.getScaleSI(IfcUnitEnum.PLANEANGLEUNIT);
     if (twoD)
     {
         if (a.Plane.ZAxis.Z < 0)
         {
             mSenseAgreement = false;
             x = e - o;
             IfcAxis2Placement2D ap = new IfcAxis2Placement2D(db, new Point2d(o.X, o.Y), new Vector2d(x.X, x.Y));
             BasisCurve = new IfcCircle(ap, a.Radius);
             mTrim1 = new IfcTrimmingSelect(a.Angle / angleFactor, optStrt);
             mTrim2 = new IfcTrimmingSelect(0, end);
         }
         else
         {
             IfcAxis2Placement2D ap = new IfcAxis2Placement2D(db, new Point2d(o.X, o.Y), new Vector2d(x.X, x.Y));
             BasisCurve = new IfcCircle(ap, a.Radius);
             mTrim1 = new IfcTrimmingSelect(0, optStrt);
             mTrim2 = new IfcTrimmingSelect(a.Angle / angleFactor, end);
         }
     }
     else
     {
         Vector3d y = Vector3d.CrossProduct(a.Plane.ZAxis, x);
         Plane pl = new Plane(o, x, y);
         IfcAxis2Placement3D ap = new IfcAxis2Placement3D(db, pl);
         BasisCurve = new IfcCircle(ap, a.Radius);
         mTrim1 = new IfcTrimmingSelect(0, optStrt);
         mTrim2 = new IfcTrimmingSelect(a.Angle / angleFactor, end);
     }
     mMasterRepresentation = IfcTrimmingPreference.PARAMETER;
 }
Exemplo n.º 3
0
		internal static void parseFields(IfcCircle c, List<string> arrFields, ref int ipos) { IfcConic.parseFields(c, arrFields, ref ipos); c.mRadius = ParserSTEP.ParseDouble(arrFields[ipos++]); }
Exemplo n.º 4
0
		internal static IfcCircle Parse(string strDef) { IfcCircle c = new IfcCircle(); int ipos = 0; parseFields(c, ParserSTEP.SplitLineFields(strDef), ref ipos); return c; }
Exemplo n.º 5
0
		internal IfcCircle(IfcCircle el) : base(el) { mRadius = el.mRadius; }