Skip to content

Commit

Permalink
set up optionsSimple and optionsOcctShape so that threejs could run v…
Browse files Browse the repository at this point in the history
…isual scripts better
  • Loading branch information
matas-bitbybit-dev committed Dec 6, 2024
1 parent d1bcfc8 commit 532416a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/dev/threejs/lib/api/bitbybit/draw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,28 @@ export class Draw extends DrawCore {
return result;
}

/**
* Creates draw options for basic geometry types like points, lines, polylines, surfaces and jscad meshes
* @param inputs option definition
* @returns options
* @group options
* @shortname simple
*/
optionsSimple(inputs: Inputs.Draw.DrawBasicGeometryOptions): Inputs.Draw.DrawBasicGeometryOptions {
return inputs;
}

/**
* Creates draw options for occt shape geometry like edges, wires, faces, shells, solids and compounds
* @param inputs option definition
* @returns options
* @group options
* @shortname occt shape
*/
optionsOcctShape(inputs: Inputs.Draw.DrawOcctShapeOptions): Inputs.Draw.DrawOcctShapeOptions {
return inputs;
}

private handleJscadMesh(inputs: Inputs.Draw.DrawAny<THREEJS.Group>): Promise<THREEJS.Group> {
return this.handleAsync(inputs, this.defaultPolylineOptions, (options) => {
return this.drawHelper.drawSolidOrPolygonMesh({
Expand Down

0 comments on commit 532416a

Please sign in to comment.