Offset G2/G3 corner blend NURBS curves using a point projection algorithm. Works in both Grasshopper and standalone Rhino.
Standard curve offset tools (Rhino's OffsetCrv, Grasshopper's Offset Curve) produce precise approximations but don't preserve the control vertex structure of the original curve or degrade curve's quality. This tool offsets corner blend curves by projecting each CV through a computed center point onto offset edge lines, preserving the NURBS structure exactly.
The optimal projection center is found automatically via bisection search. The result is a clean NURBS curve with the same degree, knot structure, and weight distribution as the input, offset by a specified distance.
- 8 control vertices arranged as a corner blend
- CVs 0–3 collinear on one edge, CVs 4–7 collinear on the perpendicular edge
- 45-degree symmetry (the two edges are perpendicular)
- Add a GhPython Script component to your canvas
- Copy the contents of
grasshopper/projection_offset.pyinto the component - Set up inputs and outputs as described in the script header
- Connect a curve and offset distance slider
Or, if a .ghuser file is provided in Releases, drop it into your Grasshopper UserObjects folder — see grasshopper/CREATE_GHUSER.md for details.
- Open Rhino
- Run
EditPythonScriptor_RunPythonScript - Open
rhino/projection_offset_cmd.py - Run the script — it will prompt you to select a curve and enter values
- The offset curve and projection point are added directly to the document
| Name | Type | Description |
|---|---|---|
curve |
Curve | 8-CV corner blend NURBS curve |
offset_distance |
Float | Distance to offset (positive = outward from corner) |
projection_offset |
Float | Shifts the projection point along the curve's axis of symmetry. 0 = optimal. Positive = away from curve, negative = toward it. |
| Name | Type | Description |
|---|---|---|
offset_curve |
Curve | Resulting offset NURBS curve |
projection_point |
Point3d | The projection center used (for visualization) |
d_opt |
Float | Optimal projection center displacement found by bisection |
deviation |
Float | Offset deviation at curve midpoint, in document units |
diagnostics |
String | Diagnostic log (Grasshopper version only) |
-
Extract geometry from the input curve: edge directions, symmetry axis, and center of curvature at the midpoint.
-
Bisection search finds the optimal projection center displacement (
d_opt) along the symmetry axis. This is the point where projecting CVs produces an offset curve whose midpoint lands exactly at the target distance. -
Project CVs: from the projection center, cast a ray through each original CV to the corresponding offset edge line. The ray-line intersection gives the new CV position.
-
Build the offset curve using the original knot vector and weights with the new CV positions.
The projection_offset input lets you manually shift the projection center away from optimal — useful for exploring how the projection geometry affects the result, or for artistic control.
Typical deviation at the curve midpoint is under 0.0002 units for a 1.0 unit offset (with projection_offset = 0). The bisection converges in roughly 20 iterations.
MIT — see LICENSE.