add_sketch
Draw a fully defined sketch of lines, arcs, and splines on a plane, ready to extrude or cut.
Instructions
Draw a sketch of lines, arcs and splines on a plane, fully defined, to extrude or cut.
plane: "front", "top", "right" or a plane by name (add_plane). Points are [u, v] in the plane's own axes, which the result gives (origin_mm + u x_axis + v y_axis): front is (x, y), top (x, -z), right (-z, y). The outline starts at start_mm; each segment runs on from where the last ended: {"line": [u, v]}; {"arc": [u, v], "through": [u, v]} (an arc through a middle point); {"arc": [u, v], "tangent": true} (an arc flowing on from the segment before); {"spline": [[u, v], ..., [u, v]]} (through the points, ending at the last). "tangent": true on a line checks that it flows on. End on start_mm to close the outline. Segments that meet smoothly get a tangent relation, the rest is dimensioned from the origin: x/y for the i-th point given (points_mm lists them; start_mm is 0), r for the radius of segment k. Then extrude_sketch / cut_sketch the returned sketch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| plane | Yes | ||
| segments | Yes | ||
| start_mm | Yes |