public static RevSurface ToRhino(this DB.ConicalSurface surface, DB.BoundingBoxUV bboxUV) { var ctol = Revit.ShortCurveTolerance; var atol = Revit.AngleTolerance * 10.0; 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 dir = zdir + xdir * Math.Tan(surface.HalfAngle); dir.Unitize(); var curve = new LineCurve ( new Line ( surface.Origin.ToRhino() + (dir * vv.Min), surface.Origin.ToRhino() + (dir * vv.Max) ), vv.Min, vv.Max ); return(RevSurface.Create(curve, axis, uu.Min, uu.Max)); }
public static RevSurface ToRhino(this DB.ConicalSurface surface, DB.BoundingBoxUV bboxUV) => FromConicalSurface ( surface.Origin, surface.XDir, surface.YDir, surface.Axis, surface.HalfAngle, bboxUV );
public static RevSurface ToRhino(this DB.ConicalSurface surface, DB.BoundingBoxUV bboxUV) => RawDecoder.ToRhino(surface, bboxUV);