Skip to content
brep-conformancegithub

loft_through

Constructors · api.md § loft_through · all operations

loft_through(frame: Frame, profiles: list<Profile>, heights: list<Length>) -> Solid

Makes the smooth solid through two or more sections. Section k is profile k drawn in the frame's xy plane and moved heights[k] up the frame's z, and the heights rise. The solid's section at each of those heights is that profile, the solid's ends are the first and last profiles, and its side passes smoothly from one section to the next. How the side runs between sections is open: tools interpolate differently, and no tool's interpolation is the answer.

There must be two or more profiles and one height for each profile, and every height must be above the one before. Each profile is one loop; sections with holes are not yet specified.

A section means the profile's region, not the way the profile's loop is written. The result does not depend on which segment a loop starts with, nor on how a curve is cut into segments, so the side has no twist that the regions do not ask for. When every section is the same profile, the result is that profile's extrusion from the first height to the last, wherever each loop starts.

Smoothly means that the side has a tangent plane at every point between the first section and the last, including the points at the heights of the inner sections. The side has no crease along a section and no crease across one.

Example.

> {"cmd": "loft_through", "frame": {"origin": [0, 0, 0], "x": [1, 0, 0], "y": [0, 1, 0],
   "z": [0, 0, 1]}, "profiles": [[[{"line": [[-5, -5], [5, -5]]}, {"line": [[5, -5], [5, 5]]},
   {"line": [[5, 5], [-5, 5]]}, {"line": [[-5, 5], [-5, -5]]}]], [[{"line": [[-3, -3], [3, -3]]},
   {"line": [[3, -3], [3, 3]]}, {"line": [[3, 3], [-3, 3]]}, {"line": [[-3, 3], [-3, -3]]}]]],
   "heights": [0, 10]}
< {"ok": 1}
FunctionFieldsReturns
boxframe, sizeSolid
cylinderframe, radius, heightSolid
sphereframe, radiusSolid
torusframe, major, minorSolid
coneframe, bottom, top, heightSolid
extrudeframe, profile, heightSolid
revolveframe, profile, angleSolid
screwframe, profile, rise, angleSolid
loftframe, profile, scale, height, topSolid
loft_throughframe, profiles, heightsSolid
sweepframe, profile, pathSolid
sweep_pathframe, profile, path, twistSolid
slabframe, size, knots_u, knots_v, heightsSolid