示例#1
0
 public static RevSurface ToRhinoSurface(this DB.RevolvedFace face) => FromRevolvedSurface
 (
     face.Origin,
     face.get_Radius(0),
     face.get_Radius(1),
     face.Axis,
     face.Curve,
     face.GetBoundingBox()
 );
示例#2
0
 public static RevSurface ToRhinoSurface(DB.RevolvedFace face, double relativeTolerance) => FromRevolvedSurface
 (
     face.Origin,
     face.get_Radius(0),
     face.get_Radius(1),
     face.Axis,
     face.Curve,
     face.GetBoundingBox(),
     relativeTolerance
 );
示例#3
0
        public static Surface ExtractSurface(Autodesk.Revit.DB.RevolvedFace face, IEnumerable <PolyCurve> edgeLoops)
        {
            var crv  = face.Curve.ToProtoType();
            var axis = face.Axis.ToVector();
            var o    = face.Origin.ToVector();
            var x    = face.get_Radius(0).ToVector();
            var y    = face.get_Radius(1).ToVector();

            // Note: The profile curve is represented in the coordinate system of the revolve
            //       so we need to transform it into the global coordinate system
            var revolveCs = CoordinateSystem.Identity();
            var globalCs  = CoordinateSystem.ByOriginVectors(o.AsPoint(), x, y);

            crv = (Autodesk.DesignScript.Geometry.Curve)crv.Transform(revolveCs, globalCs);

            return(Surface.ByRevolve(crv, o.AsPoint(), axis.Normalized(), 0, 360).FlipNormalDirection());
        }
示例#4
0
 public static RevSurface ToRhinoSurface(this DB.RevolvedFace face, double relativeTolerance) => RawDecoder.ToRhinoSurface(face, relativeTolerance);