opengeometry 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import * as THREE from "three";
2
2
  import { OGPolygon, Vector3 } from "../../opengeometry/pkg/opengeometry.js";
3
3
  import { Solid } from "./solid.js";
4
- import type { ShapeSubtractOperand, ShapeSubtractOptions, ShapeSubtractResult } from "./boolean-subtract.js";
4
+ import type { ShapeSubtractOperands, ShapeSubtractOptions, ShapeSubtractResult } from "./boolean-subtract.js";
5
5
  /**
6
6
  * Construction options for a planar polygon.
7
7
  */
@@ -74,6 +74,9 @@ export declare class Polygon extends THREE.Mesh {
74
74
  addHole(holeVertices: Vector3[]): void;
75
75
  /**
76
76
  * Builds a kernel-backed `Solid` by extruding this polygon face by `height`.
77
+ *
78
+ * This is the recommended public path when a browser CAD or AEC workflow
79
+ * starts from a planar profile and needs a boolean-ready solid.
77
80
  */
78
81
  extrude(height: number): Solid;
79
82
  /**
@@ -81,9 +84,9 @@ export declare class Polygon extends THREE.Mesh {
81
84
  */
82
85
  getBrepData(): string | null;
83
86
  /**
84
- * Subtracts another boolean operand from this polygon.
87
+ * Subtracts one or more boolean operands from this polygon.
85
88
  */
86
- subtract(operand: ShapeSubtractOperand, options?: ShapeSubtractOptions): ShapeSubtractResult;
89
+ subtract(operands: ShapeSubtractOperands, options?: ShapeSubtractOptions): ShapeSubtractResult;
87
90
  set outlineColor(color: number);
88
91
  get outlineColor(): number;
89
92
  set outline(enable: boolean);
@@ -2,7 +2,7 @@ import { Vector3 } from "../../opengeometry/pkg/opengeometry.js";
2
2
  import * as THREE from "three";
3
3
  import { type FreeformGeometry } from "../freeform.js";
4
4
  import type { FreeformSource } from "../freeform/types.js";
5
- import type { ShapeSubtractOperand, ShapeSubtractOptions, ShapeSubtractResult } from "./boolean-subtract.js";
5
+ import type { ShapeSubtractOperands, ShapeSubtractOptions, ShapeSubtractResult } from "./boolean-subtract.js";
6
6
  /**
7
7
  * Construction options for a generic BRep-backed solid.
8
8
  */
@@ -53,6 +53,8 @@ export declare class Solid extends THREE.Mesh {
53
53
  constructor(options: ISolidOptions);
54
54
  /**
55
55
  * Extrudes a face-like BRep source and wraps the result as a renderable solid.
56
+ *
57
+ * Prefer `polygon.extrude(height)` when the source is already a `Polygon`.
56
58
  */
57
59
  static extrude(source: FreeformSource, height: number, options: ExtrudeSolidOptions): Solid;
58
60
  /**
@@ -90,9 +92,12 @@ export declare class Solid extends THREE.Mesh {
90
92
  */
91
93
  getBrepData(): any;
92
94
  /**
93
- * Subtracts another boolean operand from this solid.
95
+ * Subtracts one or more boolean operands from this solid.
96
+ *
97
+ * This is the main shape-level boolean workflow after operations like
98
+ * `polygon.extrude(height)` or `Solid.extrude(...)`.
94
99
  */
95
- subtract(operand: ShapeSubtractOperand, options?: ShapeSubtractOptions): ShapeSubtractResult;
100
+ subtract(operands: ShapeSubtractOperands, options?: ShapeSubtractOptions): ShapeSubtractResult;
96
101
  /**
97
102
  * Rebuilds the visible mesh and outline from the current freeform geometry.
98
103
  */
@@ -2,7 +2,7 @@ import * as OGKernel from "../../opengeometry/pkg/opengeometry.js";
2
2
  import { Vector3 } from "../../opengeometry/pkg/opengeometry.js";
3
3
  import * as THREE from "three";
4
4
  import { ShapeOutlineMesh } from "./outline-utils.js";
5
- import type { ShapeSubtractOperand, ShapeSubtractOptions, ShapeSubtractResult } from "./boolean-subtract.js";
5
+ import type { ShapeSubtractOperands, ShapeSubtractOptions, ShapeSubtractResult } from "./boolean-subtract.js";
6
6
  /**
7
7
  * Construction options for a sphere shape.
8
8
  */
@@ -66,9 +66,9 @@ export declare class Sphere extends THREE.Mesh {
66
66
  generateGeometry(): void;
67
67
  getBrep(): any;
68
68
  /**
69
- * Subtracts another boolean operand, such as an Opening, from this sphere.
69
+ * Subtracts one or more boolean operands, such as Opening volumes, from this sphere.
70
70
  */
71
- subtract(operand: ShapeSubtractOperand, options?: ShapeSubtractOptions): ShapeSubtractResult;
71
+ subtract(operands: ShapeSubtractOperands, options?: ShapeSubtractOptions): ShapeSubtractResult;
72
72
  set outline(enable: boolean);
73
73
  get outline(): boolean;
74
74
  set fatOutlines(value: boolean);
@@ -1,7 +1,7 @@
1
1
  import * as OGKernel from "../../opengeometry/pkg/opengeometry.js";
2
2
  import { Vector3 } from "../../opengeometry/pkg/opengeometry.js";
3
3
  import * as THREE from "three";
4
- import type { ShapeSubtractOperand, ShapeSubtractOptions, ShapeSubtractResult } from "./boolean-subtract.js";
4
+ import type { ShapeSubtractOperands, ShapeSubtractOptions, ShapeSubtractResult } from "./boolean-subtract.js";
5
5
  /**
6
6
  * Construction options for a swept solid.
7
7
  */
@@ -66,9 +66,9 @@ export declare class Sweep extends THREE.Mesh {
66
66
  generateGeometry(): void;
67
67
  getBrep(): any;
68
68
  /**
69
- * Subtracts another boolean operand, such as an Opening, from this sweep.
69
+ * Subtracts one or more boolean operands, such as Opening volumes, from this sweep.
70
70
  */
71
- subtract(operand: ShapeSubtractOperand, options?: ShapeSubtractOptions): ShapeSubtractResult;
71
+ subtract(operands: ShapeSubtractOperands, options?: ShapeSubtractOptions): ShapeSubtractResult;
72
72
  set outline(enable: boolean);
73
73
  get outline(): boolean;
74
74
  set fatOutlines(value: boolean);
@@ -1,7 +1,7 @@
1
1
  import { Vector3 } from "../../opengeometry/pkg/opengeometry.js";
2
2
  import * as THREE from "three";
3
3
  import { ShapeOutlineMesh } from "./outline-utils.js";
4
- import type { ShapeSubtractOperand, ShapeSubtractOptions, ShapeSubtractResult } from "./boolean-subtract.js";
4
+ import type { ShapeSubtractOperands, ShapeSubtractOptions, ShapeSubtractResult } from "./boolean-subtract.js";
5
5
  /**
6
6
  * Construction options for a wedge/prism shape.
7
7
  */
@@ -64,9 +64,9 @@ export declare class Wedge extends THREE.Mesh {
64
64
  generateGeometry(): void;
65
65
  getBrepData(): any;
66
66
  /**
67
- * Subtracts another boolean operand, such as an Opening, from this wedge.
67
+ * Subtracts one or more boolean operands, such as Opening volumes, from this wedge.
68
68
  */
69
- subtract(operand: ShapeSubtractOperand, options?: ShapeSubtractOptions): ShapeSubtractResult;
69
+ subtract(operands: ShapeSubtractOperands, options?: ShapeSubtractOptions): ShapeSubtractResult;
70
70
  set outline(enable: boolean);
71
71
  get outline(): boolean;
72
72
  set fatOutlines(value: boolean);