public static RevSurface ToRhino(this DB.CylindricalSurface surface, DB.BoundingBoxUV bboxUV) { var ctol = Revit.ShortCurveTolerance; var atol = Revit.AngleTolerance; var uu = new Interval(bboxUV.Min.U - atol, bboxUV.Max.U + atol); var vv = new Interval(bboxUV.Min.V - ctol, bboxUV.Max.V + ctol); var origin = surface.Origin.ToRhino(); var xdir = (Vector3d)surface.XDir.ToRhino(); var zdir = (Vector3d)surface.Axis.ToRhino(); var axis = new Line(origin, origin + zdir); var curve = new LineCurve ( new Line ( origin + (xdir * surface.Radius) + (zdir * vv.Min), origin + (xdir * surface.Radius) + (zdir * vv.Max) ), vv.Min, vv.Max ); return(RevSurface.Create(curve, axis, uu.Min, uu.Max)); }
public static RevSurface ToRhino(this DB.CylindricalSurface surface, DB.BoundingBoxUV bboxUV) => FromCylindricalSurface ( surface.Origin, surface.XDir, surface.YDir, surface.Axis, surface.Radius, bboxUV );
public static RevSurface ToRhino(this DB.CylindricalSurface surface, DB.BoundingBoxUV bboxUV) => RawDecoder.ToRhino(surface, bboxUV);