Extend any surface: natural, tangent and curvature, up to a target (#760) (#1166)

Extend works on any surface: natural (continuing the face's own surface), tangent (G1 run-off) or curvature (G2 run-off), by a distance, up to a plane or face, or back to the surface's bounds, with neighbouring edges lengthened to meet. Untrim and Extend share face parameter-loop helpers. The new SurfaceExtend fields are noted under format 21. Closes #760.
This commit is contained in:
Irakli Kourtis authored and GitHub committed 2026-10-14 22:46:29 -04:00
1 parent 41f0c3d0c6
commit b4edf05373
18 files changed
+2271 -263

No files matched your search

@@ -153,6 +153,14 @@ pub(super) fn fixtures() -> Vec<(&'static str, Value)> {
("reverse_normal", json!({"type": "reverse_normal", "body": "B"})),
("surface_untrim", json!({"type": "surface_untrim", "face": {"body": "B", "point": o}, "holes": [o], "outer": true})),
("surface_extend", json!({"type": "surface_extend", "body": "B", "edges": [o], "distance": "extend.distance"})),
(
"surface_extend_to_plane",
json!({"type": "surface_extend", "body": "B", "edges": [o], "distance": "extend.distance", "mode": "curvature", "up_to": {"plane": plane("extend")}}),
),
(
"surface_extend_to_face",
json!({"type": "surface_extend", "body": "B", "edges": [o], "distance": "extend.distance", "up_to": {"face": {"body": "B", "point": o}}, "neighbours": false}),
),
(
"surface_ruled",
json!({"type": "surface_ruled", "body": "B", "edges": [o], "distance": "ruled.distance", "mode": "angle", "angle": "ruled.angle",
@@ -330,6 +330,16 @@ surface_extend
inputs:
Distance = extend.distance (Length)
expressions: extend.distance
surface_extend_to_plane
inputs:
Distance = extend.distance (Length)
Angle = extend.angle (Angle)
Offset = extend.offset (Length)
expressions: extend.distance, extend.angle, extend.offset
surface_extend_to_face
inputs:
Distance = extend.distance (Length)
expressions: extend.distance
surface_ruled
inputs:
Distance = ruled.distance (Length)
@@ -155,6 +155,10 @@ surface_untrim
face points: [0, 0, 0]
surface_extend
moves: edges[0][0], edges[0][1], edges[0][2]
surface_extend_to_plane
moves: edges[0][0], edges[0][1], edges[0][2], up_to.plane.axis_dir[0], up_to.plane.axis_dir[1], up_to.plane.axis_origin[0], up_to.plane.axis_origin[1], up_to.plane.axis_origin[2]
surface_extend_to_face
moves: edges[0][0], edges[0][1], edges[0][2], up_to.face.point[0], up_to.face.point[1], up_to.face.point[2]
surface_ruled
moves: direction[0], direction[2], edges[0][0], edges[0][1], edges[0][2], face[1], face[2]
face points: [1, 0, 0]
@@ -172,6 +172,11 @@ surface_untrim
remap_bodies: face.body
surface_extend
remap_bodies: body
surface_extend_to_plane
remap_refs: up_to.plane.base.base.name
remap_bodies: body
surface_extend_to_face
remap_bodies: body, up_to.face.body
surface_ruled
remap_bodies: body
surface_trim