Draws an outline with a pen, from a start point through a list of moves, in a frame's plane.
Each command draws on from where the previous one ended, and lines and arcs come out as exact
lines and circles. makeFace turns a closed outline into a face facing along the frame's
normal; one that crosses itself is refused.
The commands, the start point, the frame and whether to make a face
The outline as a wire, or a face when makeFace is true
Draws an outline as pen does and reports which edges each command drew, so later steps can
find the edges and faces a command made by its id.
Edges are numbered as shapes.edge.getEdges numbers them on the result. A command without an
id is named by its position, and a command that drew nothing is left out.
The commands, the start point, the frame and whether to make a face
The outline and, per command, the edges it drew
Outlines a wire as if it were drawn with a pen of a given width, in a frame's plane.
Half of width lies to each side; cap finishes an open wire's ends and join its corners.
A closed wire gives a ring: a face with one hole, or its two wires in a compound without
makeFace.
The wire, the width, the end and corner styles, the frame and whether to make a face
The outline as a face, or as a wire or compound of wires when makeFace is false
Wraps vertices, straight edges and circular edges lying in a frame's plane in the tightest convex outline around them.
The outline is exact: straight where it spans between shapes, following a circle where a circle or an arc bulges out. Other curves are refused, as are shapes off the frame's plane or circles tilted out of it.
The shapes, the frame and whether to make a face
The hull as a face, or as a wire when makeFace is false
const left = await bitbybit.occt.shapes.wire.createCircleWire({ radius: 5, center: [0, 0, 0], direction: [0, 1, 0] });
const right = await bitbybit.occt.shapes.wire.createCircleWire({ radius: 2, center: [20, 0, 0], direction: [0, 1, 0] });
const lever = await bitbybit.occt.sketch.hull({ shapes: [left, right] });
Drawing flat outlines with a pen: a start point and a list of moves (lines, arcs, Bezier curves, rounded and beveled corners) become one exact wire, or a face when the outline closes, in the plane of a frame.
commandsmakes the moves one at a time;strokeandhulloutline wires and wrap shapes. A sketch's x axis is the frame's direction and its y axis the normal crossed with it.