BetaBuilds the drawing options for an assembly document, as occt.assembly.manager.loadStepToDoc
returns it: how it turns, how finely it is meshed, and whether its edges and its dimensions,
tolerances and datums are drawn, with defaults for what is left out.
Faces show the document's own colors, an uncolored part grey; the annotations
occt.assembly.query.getDocumentAnnotations reads take these options too.
The options to start from
The drawing options
const document = await bitbybit.occt.assembly.manager.loadStepToDoc({ stepData });
const meshing = bitbybit.draw.optionsMeshing({ precision: 0.05 });
const annotations = bitbybit.draw.optionsAnnotations({ annotationColour: "#0047ab", annotationsFilled: true });
const options = bitbybit.draw.optionsOcctDocument({ upAxis: Bit.Inputs.Base.upAxisConversionEnum.zUpToYUp, meshing, drawAnnotations: true, annotations });
const drawn = await bitbybit.draw.drawAnyAsync({ entity: document, options });
BetaBuilds how finely an assembly document is meshed for drawing, for the meshing of
optionsOcctDocument, with defaults for what is left out.
The meshing settings to start from
The meshing settings
BetaBuilds the color, width and opacity of the edge lines, for the edges of
optionsOcctDocument and optionsHatchedSection, with defaults for what is left out.
The edge settings to start from
The edge settings
BetaBuilds which of a document's dimensions, tolerances and datums are drawn and how, for the
annotations of optionsOcctDocument, with defaults for what is left out.
The annotation settings to start from
The annotation settings
BetaBuilds the drawing options for a hatched section, as occt.operations.hatchedSectionByFrame
returns it: the cut faces in faceColour, their outlines as edges sets them, and the hatch
lines in their own color and width, with defaults for what is left out.
The options to start from
The drawing options
Drawing anything into the scene: kernel shapes, points, lines, polylines, frames, curves, meshes and tags all go through
drawAnyAsync, which picks the right renderer for the entity and returns the drawn object. Theoptionsmethods build the drawing options with defaults for each kind of entity,createPBRMaterialandcreateTexturemake materials for the face slots, and a drawn object can be redrawn in place by passing it back.