opengeometry 2.0.11 → 2.0.13

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.
@@ -0,0 +1,66 @@
1
+ import { Vector3 } from "../../opengeometry/pkg/opengeometry.js";
2
+ import * as THREE from "three";
3
+ /**
4
+ * Construction options for an elliptical arc primitive.
5
+ */
6
+ export interface IEllipticalArcOptions {
7
+ ogid?: string;
8
+ center: Vector3;
9
+ radiusX: number;
10
+ radiusZ: number;
11
+ startAngle: number;
12
+ endAngle: number;
13
+ segments: number;
14
+ color: number;
15
+ fatLines?: boolean;
16
+ width?: number;
17
+ translation?: Vector3;
18
+ rotation?: Vector3;
19
+ scale?: Vector3;
20
+ }
21
+ /**
22
+ * Placement updates accepted by `EllipticalArc`.
23
+ */
24
+ export interface EllipticalArcPlacementOptions {
25
+ translation?: Vector3;
26
+ rotation?: Vector3;
27
+ scale?: Vector3;
28
+ }
29
+ /**
30
+ * Partial config payload accepted by `EllipticalArc.setConfig(...)`.
31
+ */
32
+ export type EllipticalArcConfigUpdate = Partial<Omit<IEllipticalArcOptions, "translation" | "rotation" | "scale">>;
33
+ /**
34
+ * Alias for `EllipticalArc` placement updates.
35
+ */
36
+ export type EllipticalArcPlacementUpdate = EllipticalArcPlacementOptions;
37
+ /**
38
+ * EllipticalArc wrapper backed by the kernel OGEllipticalArc primitive.
39
+ */
40
+ export declare class EllipticalArc extends THREE.Line {
41
+ ogid: string;
42
+ options: IEllipticalArcOptions;
43
+ private ellipticalArc;
44
+ private fatLine;
45
+ set color(color: number);
46
+ constructor(options?: IEllipticalArcOptions);
47
+ validateOptions(): void;
48
+ setConfig(options: EllipticalArcConfigUpdate): void;
49
+ getAnchor(): Vector3;
50
+ setPlacement(placement: EllipticalArcPlacementUpdate): void;
51
+ setTransform(translation: Vector3, rotation: Vector3, scale: Vector3): void;
52
+ setTranslation(translation: Vector3): void;
53
+ setRotation(rotation: Vector3): void;
54
+ setScale(scale: Vector3): void;
55
+ getConfig(): IEllipticalArcOptions;
56
+ getPlacement(): import("../editor.js").ParametricPlacement;
57
+ getEditCapabilities(): import("../editor.js").ParametricEditCapabilities;
58
+ canConvertToFreeform(): boolean;
59
+ toFreeform(id?: string): import("../freeform.js").FreeformGeometry;
60
+ private getCurrentPositions;
61
+ private updateRenderStyle;
62
+ private generateGeometry;
63
+ getBrep(): any;
64
+ discardGeometry(): void;
65
+ private writePositionsToGeometry;
66
+ }
@@ -6,3 +6,4 @@ export * from './polyline.js';
6
6
  export * from './arc.js';
7
7
  export * from './rectangle.js';
8
8
  export * from './curve.js';
9
+ export * from "./elliptical_arc.js";
@@ -1,4 +0,0 @@
1
- /**
2
- * Domain (BIM) builders on top of the generic geometry kernel.
3
- */
4
- export * from "./wall.js";
@@ -1,40 +0,0 @@
1
- /** A point of a returned wall footprint ring (kernel `Vector3` shape). */
2
- export interface WallFootprintPoint {
3
- x: number;
4
- y: number;
5
- z: number;
6
- }
7
- /** One footprint region: a CW outer ring + its CCW inner-void hole rings. */
8
- export interface WallFootprintRegion {
9
- /** Outer ring (CW, canonical start). */
10
- outer: WallFootprintPoint[];
11
- /** Inner-void hole rings (CCW), e.g. the room void of a closed wall. */
12
- holes: WallFootprintPoint[][];
13
- }
14
- /**
15
- * Build the base 2D wall footprint as one or more REGIONS from a centreline, via
16
- * the deterministic analytic offset — miters / flat bevels at `miterLimit`,
17
- * concave trims, and nonzero-winding resolution of reflex / closed loops. NO
18
- * boolean union (so it is deterministic, unlike the 3D-mesh CSG path). Normal walls
19
- * return one region; a self-crossing closed wall (e.g. a figure-8) returns one per
20
- * simple sub-loop. Returns an EMPTY array for a genuinely unbuildable wall (does
21
- * not throw, so it never looks like a kernel crash). Rings are CW-outer / CCW-holes.
22
- *
23
- * @param centrelineFlat centreline points as `[x,y,z, …]`.
24
- * @param miterLimit SVG stroke-miterlimit; corners sharper than this bevel. Default 4.
25
- */
26
- export declare function buildWallFootprint(centrelineFlat: number[] | Float64Array, thickness: number, closed: boolean, miterLimit?: number): WallFootprintRegion[];
27
- /** One wall in a junction group: centreline `[x,y,z, …]`, thickness, closed flag. */
28
- export interface WallGroupMember {
29
- centreline: number[];
30
- thickness: number;
31
- closed: boolean;
32
- }
33
- /**
34
- * Merge a GROUP of separate walls (a cross-wall T / X / L junction) into one clean
35
- * 2D footprint by nonzero-winding union of their mitered bands — the overlapping
36
- * walls merge into a single region with mitered/bevelled corners, no internal edges.
37
- * Returns CW-outer / CCW-hole regions (one or more); empty if nothing is buildable.
38
- * No CSG. Used to render/extrude a junction as one joined mass in both views.
39
- */
40
- export declare function buildWallGroupFootprint(walls: WallGroupMember[]): WallFootprintRegion[];