RhinoCompute.NurbsSurface¶
-
RhinoCompute.NurbsSurface.
createSubDFriendly
(surface, multiple=false)¶ Create a bi-cubic SubD friendly surface from a surface.
Arguments: - surface (rhino3dm.Surface) – >Surface to rebuild as a SubD friendly surface.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A SubD friendly NURBS surface is successful, None otherwise.
Return type: NurbsSurface
-
RhinoCompute.NurbsSurface.
createFromPlane
(plane, uInterval, vInterval, uDegree, vDegree, uPointCount, vPointCount, multiple=false)¶ Creates a NURBS surface from a plane and additonal parameters.
Arguments: - plane (rhino3dm.Plane) – The plane.
- uInterval (rhino3dm.Interval) – The interval describing the extends of the output surface in the U direction.
- vInterval (rhino3dm.Interval) – The interval describing the extends of the output surface in the V direction.
- uDegree (int) – The degree of the output surface in the U direction.
- vDegree (int) – The degree of the output surface in the V direction.
- uPointCount (int) – The number of control points of the output surface in the U direction.
- vPointCount (int) – The number of control points of the output surface in the V direction.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A NURBS surface if successful, or None on failure.
Return type: NurbsSurface
-
RhinoCompute.NurbsSurface.
createCurveOnSurfacePoints
(surface, fixedPoints, tolerance, periodic, initCount, levels, multiple=false)¶ Computes a discrete spline curve on the surface. In other words, computes a sequence of points on the surface, each with a corresponding parameter value.
Arguments: - surface (rhino3dm.Surface) – The surface on which the curve is constructed. The surface should be G1 continuous. If the surface is closed in the u or v direction and is G1 at the seam, the function will construct point sequences that cross over the seam.
- fixedPoints (list[rhino3dm.Point2d]) – Surface points to interpolate given by parameters. These must be distinct.
- tolerance (float) – Relative tolerance used by the solver. When in doubt, use a tolerance of 0.0.
- periodic (bool) – When True constructs a smoothly closed curve.
- initCount (int) – Maximum number of points to insert between fixed points on the first level.
- levels (int) – The number of levels (between 1 and 3) to be used in multi-level solver. Use 1 for single level solve.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A sequence of surface points, given by surface parameters, if successful. The number of output points is approximately: 2 ^ (level-1) * initCount * fixedPoints.Count.
Return type: rhino3dm.Point2d[]
-
RhinoCompute.NurbsSurface.
createCurveOnSurface
(surface, points, tolerance, periodic, multiple=false)¶ Fit a sequence of 2d points on a surface to make a curve on the surface.
Arguments: - surface (rhino3dm.Surface) – Surface on which to construct curve.
- points (list[rhino3dm.Point2d]) – Parameter space coordinates of the points to interpolate.
- tolerance (float) – Curve should be within tolerance of surface and points.
- periodic (bool) – When True make a periodic curve.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A curve interpolating the points if successful, None on error.
Return type: rhino3dm.NurbsCurve
-
RhinoCompute.NurbsSurface.
makeCompatible
(surface0, surface1, multiple=false)¶ For expert use only. Makes a pair of compatible NURBS surfaces based on two input surfaces.
Arguments: - surface0 (rhino3dm.Surface) – The first surface.
- surface1 (rhino3dm.Surface) – The second surface.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: True if successful, False on failure.
Return type: bool
-
RhinoCompute.NurbsSurface.
createFromPoints
(points, uCount, vCount, uDegree, vDegree, multiple=false)¶ Constructs a NURBS surface from a 2D grid of control points.
Arguments: - points (list[rhino3dm.Point3d]) – Control point locations.
- uCount (int) – Number of points in U direction.
- vCount (int) – Number of points in V direction.
- uDegree (int) – Degree of surface in U direction.
- vDegree (int) – Degree of surface in V direction.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A NurbsSurface on success or None on failure.
Return type: NurbsSurface
-
RhinoCompute.NurbsSurface.
createThroughPoints
(points, uCount, vCount, uDegree, vDegree, uClosed, vClosed, multiple=false)¶ Constructs a NURBS surface from a 2D grid of points.
Arguments: - points (list[rhino3dm.Point3d]) – Control point locations.
- uCount (int) – Number of points in U direction.
- vCount (int) – Number of points in V direction.
- uDegree (int) – Degree of surface in U direction.
- vDegree (int) – Degree of surface in V direction.
- uClosed (bool) – True if the surface should be closed in the U direction.
- vClosed (bool) – True if the surface should be closed in the V direction.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A NurbsSurface on success or None on failure.
Return type: NurbsSurface
-
RhinoCompute.NurbsSurface.
createFromCorners
(corner1, corner2, corner3, corner4, multiple=false)¶ Makes a surface from 4 corner points. This is the same as calling with tolerance 0.
Arguments: - corner1 (rhino3dm.Point3d) – The first corner.
- corner2 (rhino3dm.Point3d) – The second corner.
- corner3 (rhino3dm.Point3d) – The third corner.
- corner4 (rhino3dm.Point3d) – The fourth corner.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: the resulting surface or None on error.
Return type: NurbsSurface
-
RhinoCompute.NurbsSurface.
createFromCorners1
(corner1, corner2, corner3, corner4, tolerance, multiple=false)¶ Makes a surface from 4 corner points.
Arguments: - corner1 (rhino3dm.Point3d) – The first corner.
- corner2 (rhino3dm.Point3d) – The second corner.
- corner3 (rhino3dm.Point3d) – The third corner.
- corner4 (rhino3dm.Point3d) – The fourth corner.
- tolerance (float) – Minimum edge length without collapsing to a singularity.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: The resulting surface or None on error.
Return type: NurbsSurface
-
RhinoCompute.NurbsSurface.
createFromCorners2
(corner1, corner2, corner3, multiple=false)¶ Makes a surface from 3 corner points.
Arguments: - corner1 (rhino3dm.Point3d) – The first corner.
- corner2 (rhino3dm.Point3d) – The second corner.
- corner3 (rhino3dm.Point3d) – The third corner.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: The resulting surface or None on error.
Return type: NurbsSurface
-
RhinoCompute.NurbsSurface.
createRailRevolvedSurface
(profile, rail, axis, scaleHeight, multiple=false)¶ Constructs a railed Surface-of-Revolution.
Arguments: - profile (rhino3dm.Curve) – Profile curve for revolution.
- rail (rhino3dm.Curve) – Rail curve for revolution.
- axis (Line) – Axis of revolution.
- scaleHeight (bool) – If true, surface will be locally scaled.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A NurbsSurface or None on failure.
Return type: NurbsSurface
-
RhinoCompute.NurbsSurface.
createNetworkSurface
(uCurves, uContinuityStart, uContinuityEnd, vCurves, vContinuityStart, vContinuityEnd, edgeTolerance, interiorTolerance, angleTolerance, multiple=false)¶ Builds a surface from an ordered network of curves/edges.
Arguments: - uCurves (list[rhino3dm.Curve]) – An array, a list or any enumerable set of U curves.
- uContinuityStart (int) – continuity at first U segment, 0 = loose, 1 = position, 2 = tan, 3 = curvature.
- uContinuityEnd (int) – continuity at last U segment, 0 = loose, 1 = position, 2 = tan, 3 = curvature.
- vCurves (list[rhino3dm.Curve]) – An array, a list or any enumerable set of V curves.
- vContinuityStart (int) – continuity at first V segment, 0 = loose, 1 = position, 2 = tan, 3 = curvature.
- vContinuityEnd (int) – continuity at last V segment, 0 = loose, 1 = position, 2 = tan, 3 = curvature.
- edgeTolerance (float) – tolerance to use along network surface edge.
- interiorTolerance (float) – tolerance to use for the interior curves.
- angleTolerance (float) – angle tolerance to use.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A NurbsSurface or None on failure.
Return type: NurbsSurface
-
RhinoCompute.NurbsSurface.
createNetworkSurface1
(curves, continuity, edgeTolerance, interiorTolerance, angleTolerance, multiple=false)¶ Builds a surface from an auto-sorted network of curves/edges.
Arguments: - curves (list[rhino3dm.Curve]) – An array, a list or any enumerable set of curves/edges, sorted automatically into U and V curves.
- continuity (int) – continuity along edges, 0 = loose, 1 = position, 2 = tan, 3 = curvature.
- edgeTolerance (float) – tolerance to use along network surface edge.
- interiorTolerance (float) – tolerance to use for the interior curves.
- angleTolerance (float) – angle tolerance to use.
- multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A NurbsSurface or None on failure.
Return type: NurbsSurface