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() );
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 );
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()); }
public static RevSurface ToRhinoSurface(this DB.RevolvedFace face, double relativeTolerance) => RawDecoder.ToRhinoSurface(face, relativeTolerance);