Esempio n. 1
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);
        }
Esempio n. 2
0
 public IfcLinearSpanPlacement(IfcCurve placementMeasuredAlong, IfcDistanceExpression distance, double span)
     : base(placementMeasuredAlong, distance)
 {
     Span = span;
 }
Esempio n. 3
0
 public IfcLinearPlacementWithInclination(IfcCurve placementMeasuredAlong, IfcDistanceExpression distance, IfcAxisLateralInclination inclinating)
     : base(placementMeasuredAlong, distance)
 {
     Inclinating = inclinating;
 }
Esempio n. 4
0
 public IfcLinearPlacement(IfcCurve placementMeasuredAlong, IfcDistanceExpression distance)
     : base(placementMeasuredAlong.Database)
 {
     PlacementMeasuredAlong = placementMeasuredAlong;
     Distance = distance;
 }
 internal virtual Plane planeAt(IfcDistanceExpression distanceExpression, bool vertical, double tol)
 {
     throw new Exception("PlaneAt DistanceExpression not implemented for " + this.StepClassName);
 }