brepjs 4.0.2 → 4.14.0
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.
- package/README.md +5 -8
- package/dist/2d/blueprints/Blueprint.d.ts +50 -0
- package/dist/2d/blueprints/Blueprint.d.ts.map +1 -0
- package/dist/2d/blueprints/Blueprints.d.ts +34 -0
- package/dist/2d/blueprints/Blueprints.d.ts.map +1 -0
- package/dist/2d/blueprints/CompoundBlueprint.d.ts +34 -0
- package/dist/2d/blueprints/CompoundBlueprint.d.ts.map +1 -0
- package/dist/2d/blueprints/approximations.d.ts +4 -0
- package/dist/2d/blueprints/approximations.d.ts.map +1 -0
- package/dist/2d/blueprints/blueprintFns.d.ts +31 -0
- package/dist/2d/blueprints/blueprintFns.d.ts.map +1 -0
- package/dist/2d/blueprints/boolean2D.d.ts +8 -0
- package/dist/2d/blueprints/boolean2D.d.ts.map +1 -0
- package/dist/2d/blueprints/boolean2dFns.d.ts +11 -0
- package/dist/2d/blueprints/boolean2dFns.d.ts.map +1 -0
- package/dist/2d/blueprints/booleanOperations.d.ts +6 -0
- package/dist/2d/blueprints/booleanOperations.d.ts.map +1 -0
- package/dist/2d/blueprints/cannedBlueprints.d.ts +7 -0
- package/dist/2d/blueprints/cannedBlueprints.d.ts.map +1 -0
- package/dist/2d/blueprints/customCorners.d.ts +5 -0
- package/dist/2d/blueprints/customCorners.d.ts.map +1 -0
- package/dist/2d/blueprints/index.d.ts +15 -0
- package/dist/2d/blueprints/index.d.ts.map +1 -0
- package/dist/2d/blueprints/lib.d.ts +67 -0
- package/dist/2d/blueprints/lib.d.ts.map +1 -0
- package/dist/2d/blueprints/offset.d.ts +10 -0
- package/dist/2d/blueprints/offset.d.ts.map +1 -0
- package/dist/2d/blueprints/svg.d.ts +4 -0
- package/dist/2d/blueprints/svg.d.ts.map +1 -0
- package/dist/2d/curves.d.ts +22 -0
- package/dist/2d/curves.d.ts.map +1 -0
- package/dist/2d/lib/BoundingBox2d.d.ts +16 -0
- package/dist/2d/lib/BoundingBox2d.d.ts.map +1 -0
- package/dist/2d/lib/Curve2D.d.ts +34 -0
- package/dist/2d/lib/Curve2D.d.ts.map +1 -0
- package/dist/2d/lib/approximations.d.ts +11 -0
- package/dist/2d/lib/approximations.d.ts.map +1 -0
- package/dist/2d/lib/curve2dFns.d.ts +23 -0
- package/dist/2d/lib/curve2dFns.d.ts.map +1 -0
- package/dist/2d/lib/customCorners.d.ts +5 -0
- package/dist/2d/lib/customCorners.d.ts.map +1 -0
- package/dist/2d/lib/definitions.d.ts +5 -0
- package/dist/2d/lib/definitions.d.ts.map +1 -0
- package/dist/2d/lib/index.d.ts +15 -0
- package/dist/2d/lib/index.d.ts.map +1 -0
- package/dist/2d/lib/intersections.d.ts +12 -0
- package/dist/2d/lib/intersections.d.ts.map +1 -0
- package/dist/2d/lib/makeCurves.d.ts +113 -0
- package/dist/2d/lib/makeCurves.d.ts.map +1 -0
- package/dist/2d/lib/ocWrapper.d.ts +7 -0
- package/dist/2d/lib/ocWrapper.d.ts.map +1 -0
- package/dist/2d/lib/offset.d.ts +8 -0
- package/dist/2d/lib/offset.d.ts.map +1 -0
- package/dist/2d/lib/precision.d.ts +15 -0
- package/dist/2d/lib/precision.d.ts.map +1 -0
- package/dist/2d/lib/stitching.d.ts +3 -0
- package/dist/2d/lib/stitching.d.ts.map +1 -0
- package/dist/2d/lib/svgPath.d.ts +4 -0
- package/dist/2d/lib/svgPath.d.ts.map +1 -0
- package/dist/2d/lib/utils.d.ts +4 -0
- package/dist/2d/lib/utils.d.ts.map +1 -0
- package/dist/2d/lib/vectorOperations.d.ts +17 -0
- package/dist/2d/lib/vectorOperations.d.ts.map +1 -0
- package/dist/brepjs.cjs +2422 -5341
- package/dist/brepjs.js +2364 -5279
- package/dist/core/constants.d.ts +5 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/definitionMaps.d.ts +4 -0
- package/dist/core/definitionMaps.d.ts.map +1 -0
- package/dist/core/disposal.d.ts +42 -0
- package/dist/core/disposal.d.ts.map +1 -0
- package/dist/core/errors.d.ts +74 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/geometry.d.ts +28 -0
- package/dist/core/geometry.d.ts.map +1 -0
- package/dist/core/geometryHelpers.d.ts +15 -0
- package/dist/core/geometryHelpers.d.ts.map +1 -0
- package/dist/core/memory.d.ts +20 -0
- package/dist/core/memory.d.ts.map +1 -0
- package/dist/core/occtBoundary.d.ts +32 -0
- package/dist/core/occtBoundary.d.ts.map +1 -0
- package/dist/core/planeOps.d.ts +26 -0
- package/dist/core/planeOps.d.ts.map +1 -0
- package/dist/core/planeTypes.d.ts +11 -0
- package/dist/core/planeTypes.d.ts.map +1 -0
- package/dist/core/result.d.ts +45 -0
- package/dist/core/result.d.ts.map +1 -0
- package/dist/core/shapeTypes.d.ts +57 -0
- package/dist/core/shapeTypes.d.ts.map +1 -0
- package/dist/core/types.d.ts +23 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/vecOps.d.ts +27 -0
- package/dist/core/vecOps.d.ts.map +1 -0
- package/dist/core-Bcze7hxV.js +169 -0
- package/dist/core-C4AndVCI.cjs +168 -0
- package/dist/core.cjs +73 -0
- package/dist/core.d.ts +17 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +73 -0
- package/dist/index.d.ts +93 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/io/dxfExportFns.d.ts +33 -0
- package/dist/io/dxfExportFns.d.ts.map +1 -0
- package/dist/io/gltfExportFns.d.ts +27 -0
- package/dist/io/gltfExportFns.d.ts.map +1 -0
- package/dist/io/importFns.d.ts +9 -0
- package/dist/io/importFns.d.ts.map +1 -0
- package/dist/io/importers.d.ts +5 -0
- package/dist/io/importers.d.ts.map +1 -0
- package/dist/io/objExportFns.d.ts +8 -0
- package/dist/io/objExportFns.d.ts.map +1 -0
- package/dist/kernel/booleanOps.d.ts +42 -0
- package/dist/kernel/booleanOps.d.ts.map +1 -0
- package/dist/kernel/constructorOps.d.ts +39 -0
- package/dist/kernel/constructorOps.d.ts.map +1 -0
- package/dist/kernel/healingOps.d.ts +18 -0
- package/dist/kernel/healingOps.d.ts.map +1 -0
- package/dist/kernel/index.d.ts +5 -0
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/ioOps.d.ts +26 -0
- package/dist/kernel/ioOps.d.ts.map +1 -0
- package/dist/kernel/measureOps.d.ts +62 -0
- package/dist/kernel/measureOps.d.ts.map +1 -0
- package/dist/kernel/meshOps.d.ts +26 -0
- package/dist/kernel/meshOps.d.ts.map +1 -0
- package/dist/kernel/modifierOps.d.ts +37 -0
- package/dist/kernel/modifierOps.d.ts.map +1 -0
- package/dist/kernel/occtAdapter.d.ts +75 -0
- package/dist/kernel/occtAdapter.d.ts.map +1 -0
- package/dist/kernel/sweepOps.d.ts +20 -0
- package/dist/kernel/sweepOps.d.ts.map +1 -0
- package/dist/kernel/topologyOps.d.ts +34 -0
- package/dist/kernel/topologyOps.d.ts.map +1 -0
- package/dist/kernel/transformOps.d.ts +26 -0
- package/dist/kernel/transformOps.d.ts.map +1 -0
- package/dist/kernel/types.d.ts +112 -0
- package/dist/kernel/types.d.ts.map +1 -0
- package/dist/measurement/interferenceFns.d.ts +37 -0
- package/dist/measurement/interferenceFns.d.ts.map +1 -0
- package/dist/measurement/measureFns.d.ts +54 -0
- package/dist/measurement/measureFns.d.ts.map +1 -0
- package/dist/measurement/measureShape.d.ts +37 -0
- package/dist/measurement/measureShape.d.ts.map +1 -0
- package/dist/measurement-B4Ijoi7R.cjs +415 -0
- package/dist/measurement-BdhJgmWm.js +416 -0
- package/dist/measurement.cjs +11 -0
- package/dist/measurement.d.ts +5 -0
- package/dist/measurement.d.ts.map +1 -0
- package/dist/measurement.js +11 -0
- package/dist/oclib.d.ts +4 -0
- package/dist/oclib.d.ts.map +1 -0
- package/dist/operations/assemblyFns.d.ts +39 -0
- package/dist/operations/assemblyFns.d.ts.map +1 -0
- package/dist/operations/batchBooleans.d.ts +6 -0
- package/dist/operations/batchBooleans.d.ts.map +1 -0
- package/dist/operations/exporterFns.d.ts +16 -0
- package/dist/operations/exporterFns.d.ts.map +1 -0
- package/dist/operations/exporterUtils.d.ts +20 -0
- package/dist/operations/exporterUtils.d.ts.map +1 -0
- package/dist/operations/exporters.d.ts +20 -0
- package/dist/operations/exporters.d.ts.map +1 -0
- package/dist/operations/extrude.d.ts +24 -0
- package/dist/operations/extrude.d.ts.map +1 -0
- package/dist/operations/extrudeFns.d.ts +23 -0
- package/dist/operations/extrudeFns.d.ts.map +1 -0
- package/dist/operations/extrudeUtils.d.ts +39 -0
- package/dist/operations/extrudeUtils.d.ts.map +1 -0
- package/dist/operations/historyFns.d.ts +31 -0
- package/dist/operations/historyFns.d.ts.map +1 -0
- package/dist/operations/loft.d.ts +10 -0
- package/dist/operations/loft.d.ts.map +1 -0
- package/dist/operations/loftFns.d.ts +11 -0
- package/dist/operations/loftFns.d.ts.map +1 -0
- package/dist/operations/patternFns.d.ts +28 -0
- package/dist/operations/patternFns.d.ts.map +1 -0
- package/dist/projection/ProjectionCamera.d.ts +21 -0
- package/dist/projection/ProjectionCamera.d.ts.map +1 -0
- package/dist/projection/cameraFns.d.ts +25 -0
- package/dist/projection/cameraFns.d.ts.map +1 -0
- package/dist/projection/makeProjectedEdges.d.ts +7 -0
- package/dist/projection/makeProjectedEdges.d.ts.map +1 -0
- package/dist/projection/projectionPlanes.d.ts +10 -0
- package/dist/projection/projectionPlanes.d.ts.map +1 -0
- package/dist/query/cornerFinder.d.ts +52 -0
- package/dist/query/cornerFinder.d.ts.map +1 -0
- package/dist/query/definitions.d.ts +71 -0
- package/dist/query/definitions.d.ts.map +1 -0
- package/dist/query/edgeFinder.d.ts +52 -0
- package/dist/query/edgeFinder.d.ts.map +1 -0
- package/dist/query/faceFinder.d.ts +44 -0
- package/dist/query/faceFinder.d.ts.map +1 -0
- package/dist/query/finderFns.d.ts +63 -0
- package/dist/query/finderFns.d.ts.map +1 -0
- package/dist/query/generic3dfinder.d.ts +83 -0
- package/dist/query/generic3dfinder.d.ts.map +1 -0
- package/dist/query/helpers.d.ts +6 -0
- package/dist/query/helpers.d.ts.map +1 -0
- package/dist/query/index.d.ts +20 -0
- package/dist/query/index.d.ts.map +1 -0
- package/dist/query-C2GHAGcZ.cjs +2618 -0
- package/dist/query-G8HjGFrd.js +2619 -0
- package/dist/query.cjs +10 -0
- package/dist/query.d.ts +10 -0
- package/dist/query.d.ts.map +1 -0
- package/dist/query.js +10 -0
- package/dist/shapeTypes-6zmcuhqh.cjs +2080 -0
- package/dist/shapeTypes-DLb5tn_G.js +2081 -0
- package/dist/sketching/CompoundSketch.d.ts +38 -0
- package/dist/sketching/CompoundSketch.d.ts.map +1 -0
- package/dist/sketching/Sketch.d.ts +83 -0
- package/dist/sketching/Sketch.d.ts.map +1 -0
- package/dist/sketching/Sketcher.d.ts +65 -0
- package/dist/sketching/Sketcher.d.ts.map +1 -0
- package/dist/sketching/Sketcher2d.d.ts +124 -0
- package/dist/sketching/Sketcher2d.d.ts.map +1 -0
- package/dist/sketching/Sketches.d.ts +35 -0
- package/dist/sketching/Sketches.d.ts.map +1 -0
- package/dist/sketching/cannedSketches.d.ts +78 -0
- package/dist/sketching/cannedSketches.d.ts.map +1 -0
- package/dist/sketching/draw.d.ts +218 -0
- package/dist/sketching/draw.d.ts.map +1 -0
- package/dist/sketching/drawFns.d.ts +27 -0
- package/dist/sketching/drawFns.d.ts.map +1 -0
- package/dist/sketching/shortcuts.d.ts +3 -0
- package/dist/sketching/shortcuts.d.ts.map +1 -0
- package/dist/sketching/sketchFns.d.ts +41 -0
- package/dist/sketching/sketchFns.d.ts.map +1 -0
- package/dist/sketching/sketchLib.d.ts +46 -0
- package/dist/sketching/sketchLib.d.ts.map +1 -0
- package/dist/sketching/sketchUtils.d.ts +8 -0
- package/dist/sketching/sketchUtils.d.ts.map +1 -0
- package/dist/sketching/sketcherlib.d.ts +313 -0
- package/dist/sketching/sketcherlib.d.ts.map +1 -0
- package/dist/text/textBlueprints.d.ts +22 -0
- package/dist/text/textBlueprints.d.ts.map +1 -0
- package/dist/topology/adjacencyFns.d.ts +30 -0
- package/dist/topology/adjacencyFns.d.ts.map +1 -0
- package/dist/topology/booleanFns.d.ts +50 -0
- package/dist/topology/booleanFns.d.ts.map +1 -0
- package/dist/topology/cast.d.ts +21 -0
- package/dist/topology/cast.d.ts.map +1 -0
- package/dist/topology/chamferAngleFns.d.ts +15 -0
- package/dist/topology/chamferAngleFns.d.ts.map +1 -0
- package/dist/topology/curveFns.d.ts +29 -0
- package/dist/topology/curveFns.d.ts.map +1 -0
- package/dist/topology/faceFns.d.ts +51 -0
- package/dist/topology/faceFns.d.ts.map +1 -0
- package/dist/topology/healingFns.d.ts +52 -0
- package/dist/topology/healingFns.d.ts.map +1 -0
- package/dist/topology/index.d.ts +17 -0
- package/dist/topology/index.d.ts.map +1 -0
- package/dist/topology/meshCache.d.ts +56 -0
- package/dist/topology/meshCache.d.ts.map +1 -0
- package/dist/topology/meshFns.d.ts +46 -0
- package/dist/topology/meshFns.d.ts.map +1 -0
- package/dist/topology/modifierFns.d.ts +44 -0
- package/dist/topology/modifierFns.d.ts.map +1 -0
- package/dist/topology/pipeFns.d.ts +26 -0
- package/dist/topology/pipeFns.d.ts.map +1 -0
- package/dist/topology/shapeBooleans.d.ts +34 -0
- package/dist/topology/shapeBooleans.d.ts.map +1 -0
- package/dist/topology/shapeFns.d.ts +54 -0
- package/dist/topology/shapeFns.d.ts.map +1 -0
- package/dist/topology/shapeHelpers.d.ts +82 -0
- package/dist/topology/shapeHelpers.d.ts.map +1 -0
- package/dist/topology/shapeModifiers.d.ts +42 -0
- package/dist/topology/shapeModifiers.d.ts.map +1 -0
- package/dist/topology/shapes.d.ts +273 -0
- package/dist/topology/shapes.d.ts.map +1 -0
- package/dist/topology/threeHelpers.d.ts +38 -0
- package/dist/topology/threeHelpers.d.ts.map +1 -0
- package/dist/utils/bug.d.ts +14 -0
- package/dist/utils/bug.d.ts.map +1 -0
- package/dist/utils/ioFilename.d.ts +5 -0
- package/dist/utils/ioFilename.d.ts.map +1 -0
- package/dist/utils/precisionRound.d.ts +2 -0
- package/dist/utils/precisionRound.d.ts.map +1 -0
- package/dist/utils/range.d.ts +2 -0
- package/dist/utils/range.d.ts.map +1 -0
- package/dist/utils/round2.d.ts +2 -0
- package/dist/utils/round2.d.ts.map +1 -0
- package/dist/utils/round5.d.ts +2 -0
- package/dist/utils/round5.d.ts.map +1 -0
- package/dist/utils/uuid.d.ts +2 -0
- package/dist/utils/uuid.d.ts.map +1 -0
- package/dist/utils/zip.d.ts +4 -0
- package/dist/utils/zip.d.ts.map +1 -0
- package/dist/worker/index.d.ts +9 -0
- package/dist/worker/index.d.ts.map +1 -0
- package/dist/worker/protocol.d.ts +42 -0
- package/dist/worker/protocol.d.ts.map +1 -0
- package/dist/worker/taskQueue.d.ts +29 -0
- package/dist/worker/taskQueue.d.ts.map +1 -0
- package/dist/worker.cjs +55 -0
- package/dist/worker.d.ts +5 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +55 -0
- package/package.json +46 -6
- package/dist/brepjs.d.ts +0 -3111
package/README.md
CHANGED
|
@@ -81,21 +81,18 @@ Layer 0: kernel/, utils/ (WASM bindings)
|
|
|
81
81
|
|
|
82
82
|
See [docs/architecture.md](./docs/architecture.md) for the full diagram.
|
|
83
83
|
|
|
84
|
-
## API
|
|
84
|
+
## API Style
|
|
85
85
|
|
|
86
|
-
brepjs
|
|
86
|
+
brepjs uses an immutable functional API:
|
|
87
87
|
|
|
88
|
-
**Functional API (recommended):**
|
|
89
88
|
```typescript
|
|
90
89
|
const box = castShape(makeBox([0, 0, 0], [10, 10, 10]).wrapped);
|
|
91
90
|
const moved = translateShape(box, [5, 0, 0]); // Returns new shape
|
|
92
91
|
```
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
box.translate([5, 0, 0]); // Mutates in place
|
|
98
|
-
```
|
|
93
|
+
## Projects Using brepjs
|
|
94
|
+
|
|
95
|
+
- [Gridfinity Layout Tool](https://github.com/andymai/gridfinity-layout-tool) — Web-based layout generator for Gridfinity storage systems
|
|
99
96
|
|
|
100
97
|
## Development
|
|
101
98
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ScaleMode } from '../curves.js';
|
|
2
|
+
import { Point2D, BoundingBox2d, Curve2D } from '../lib/index.js';
|
|
3
|
+
import { AnyShape, Face } from '../../topology/shapes.js';
|
|
4
|
+
import { Plane, PlaneName } from '../../core/planeTypes.js';
|
|
5
|
+
import { PointInput } from '../../core/types.js';
|
|
6
|
+
import { DrawingInterface, SketchData } from './lib.js';
|
|
7
|
+
import { SingleFace } from '../../query/helpers.js';
|
|
8
|
+
/**
|
|
9
|
+
* A Blueprint is an abstract Sketch, a 2D set of curves that can then be
|
|
10
|
+
* sketched on different surfaces (faces or planes)
|
|
11
|
+
*
|
|
12
|
+
* You should create them by "sketching" with a `BlueprintSketcher`
|
|
13
|
+
*/
|
|
14
|
+
export default class Blueprint implements DrawingInterface {
|
|
15
|
+
curves: Curve2D[];
|
|
16
|
+
protected _boundingBox: null | BoundingBox2d;
|
|
17
|
+
private readonly _orientation;
|
|
18
|
+
private _guessedOrientation;
|
|
19
|
+
constructor(curves: Curve2D[]);
|
|
20
|
+
delete(): void;
|
|
21
|
+
clone(): Blueprint;
|
|
22
|
+
get repr(): string;
|
|
23
|
+
get boundingBox(): BoundingBox2d;
|
|
24
|
+
get orientation(): 'clockwise' | 'counterClockwise';
|
|
25
|
+
stretch(ratio: number, direction: Point2D, origin?: Point2D): Blueprint;
|
|
26
|
+
scale(scaleFactor: number, center?: Point2D): Blueprint;
|
|
27
|
+
rotate(angle: number, center?: Point2D): Blueprint;
|
|
28
|
+
translate(xDist: number, yDist: number): Blueprint;
|
|
29
|
+
translate(translationVector: Point2D): Blueprint;
|
|
30
|
+
mirror(centerOrDirection: Point2D, origin?: Point2D, mode?: 'center' | 'plane'): Blueprint;
|
|
31
|
+
sketchOnPlane(inputPlane?: PlaneName | Plane, origin?: PointInput | number): SketchData;
|
|
32
|
+
sketchOnFace(face: Face, scaleMode?: ScaleMode): SketchData;
|
|
33
|
+
subFace(face: Face, origin?: PointInput | null): Face;
|
|
34
|
+
punchHole(shape: AnyShape, face: SingleFace, { height, origin, draftAngle, }?: {
|
|
35
|
+
height?: number | null;
|
|
36
|
+
origin?: PointInput | null;
|
|
37
|
+
draftAngle?: number;
|
|
38
|
+
}): AnyShape;
|
|
39
|
+
toSVGPathD(): string;
|
|
40
|
+
toSVGPath(): string;
|
|
41
|
+
toSVGViewBox(margin?: number): string;
|
|
42
|
+
toSVGPaths(): string[];
|
|
43
|
+
toSVG(margin?: number): string;
|
|
44
|
+
get firstPoint(): Point2D;
|
|
45
|
+
get lastPoint(): Point2D;
|
|
46
|
+
isInside(point: Point2D): boolean;
|
|
47
|
+
isClosed(): boolean;
|
|
48
|
+
intersects(other: Blueprint): boolean;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=Blueprint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blueprint.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/Blueprint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAW9C,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAQvE,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAO/D,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAgB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IAAI,EAAE,UAAU,EAChB,EACE,MAAa,EACb,MAAa,EACb,UAAc,GACf,GAAE;QACD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;QAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;KAChB;IA0BR,UAAU;IAeV,SAAS;IAIT,YAAY,CAAC,MAAM,SAAI;IAIvB,UAAU;IAIV,KAAK,CAAC,MAAM,SAAI;IAIhB,IAAI,UAAU,IAAI,OAAO,CAGxB;IAED,IAAI,SAAS,IAAI,OAAO,CAGvB;IAED,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAyBjC,QAAQ;IAIR,UAAU,CAAC,KAAK,EAAE,SAAS;CAoB5B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Point2D, BoundingBox2d } from '../lib/index.js';
|
|
2
|
+
import { default as Blueprint } from './Blueprint.js';
|
|
3
|
+
import { default as CompoundBlueprint } from './CompoundBlueprint.js';
|
|
4
|
+
import { DrawingInterface, SketchData } from './lib.js';
|
|
5
|
+
import { AnyShape, Face } from '../../topology/shapes.js';
|
|
6
|
+
import { Plane, PlaneName } from '../../core/planeTypes.js';
|
|
7
|
+
import { PointInput } from '../../core/types.js';
|
|
8
|
+
import { ScaleMode } from '../curves.js';
|
|
9
|
+
import { SingleFace } from '../../query/helpers.js';
|
|
10
|
+
export default class Blueprints implements DrawingInterface {
|
|
11
|
+
blueprints: Array<Blueprint | CompoundBlueprint>;
|
|
12
|
+
protected _boundingBox: BoundingBox2d | null;
|
|
13
|
+
constructor(blueprints: Array<Blueprint | CompoundBlueprint>);
|
|
14
|
+
get repr(): string;
|
|
15
|
+
clone(): Blueprints;
|
|
16
|
+
get boundingBox(): BoundingBox2d;
|
|
17
|
+
stretch(ratio: number, direction: Point2D, origin: Point2D): Blueprints;
|
|
18
|
+
rotate(angle: number, center?: Point2D): Blueprints;
|
|
19
|
+
scale(scaleFactor: number, center?: Point2D): Blueprints;
|
|
20
|
+
translate(xDist: number, yDist: number): Blueprints;
|
|
21
|
+
translate(translationVector: Point2D): Blueprints;
|
|
22
|
+
mirror(centerOrDirection: Point2D, origin?: Point2D, mode?: 'center' | 'plane'): Blueprints;
|
|
23
|
+
sketchOnPlane(plane?: PlaneName | Plane, origin?: PointInput | number): (SketchData | SketchData[])[];
|
|
24
|
+
sketchOnFace(face: Face, scaleMode?: ScaleMode): (SketchData | SketchData[])[];
|
|
25
|
+
punchHole(shape: AnyShape, face: SingleFace, options?: {
|
|
26
|
+
height?: number;
|
|
27
|
+
origin?: PointInput;
|
|
28
|
+
draftAngle?: number;
|
|
29
|
+
}): AnyShape;
|
|
30
|
+
toSVGViewBox(margin?: number): string;
|
|
31
|
+
toSVGPaths(): string[][];
|
|
32
|
+
toSVG(margin?: number): string;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=Blueprints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blueprints.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/Blueprints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,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QAChB,MAAM,CAAC,EAAE,UAAU,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KAChB;IASR,YAAY,CAAC,MAAM,SAAI;IAIvB,UAAU;IAIV,KAAK,CAAC,MAAM,SAAI;CAQjB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Point2D, BoundingBox2d } from '../lib/index.js';
|
|
2
|
+
import { default as Blueprint } from './Blueprint.js';
|
|
3
|
+
import { DrawingInterface, SketchData } from './lib.js';
|
|
4
|
+
import { AnyShape, Face } from '../../topology/shapes.js';
|
|
5
|
+
import { Plane, PlaneName } from '../../core/planeTypes.js';
|
|
6
|
+
import { PointInput } from '../../core/types.js';
|
|
7
|
+
import { ScaleMode } from '../curves.js';
|
|
8
|
+
import { SingleFace } from '../../query/helpers.js';
|
|
9
|
+
export default class CompoundBlueprint implements DrawingInterface {
|
|
10
|
+
blueprints: Blueprint[];
|
|
11
|
+
protected _boundingBox: BoundingBox2d | null;
|
|
12
|
+
constructor(blueprints: Blueprint[]);
|
|
13
|
+
clone(): CompoundBlueprint;
|
|
14
|
+
get boundingBox(): BoundingBox2d;
|
|
15
|
+
get repr(): string;
|
|
16
|
+
stretch(ratio: number, direction: Point2D, origin: Point2D): CompoundBlueprint;
|
|
17
|
+
rotate(angle: number, center?: Point2D): CompoundBlueprint;
|
|
18
|
+
scale(scaleFactor: number, center?: Point2D): CompoundBlueprint;
|
|
19
|
+
translate(xDist: number, yDist: number): CompoundBlueprint;
|
|
20
|
+
translate(translationVector: Point2D): CompoundBlueprint;
|
|
21
|
+
mirror(centerOrDirection: Point2D, origin?: Point2D, mode?: 'center' | 'plane'): CompoundBlueprint;
|
|
22
|
+
sketchOnPlane(plane?: PlaneName | Plane, origin?: PointInput | number): SketchData[];
|
|
23
|
+
sketchOnFace(face: Face, scaleMode?: ScaleMode): SketchData[];
|
|
24
|
+
punchHole(shape: AnyShape, face: SingleFace, options?: {
|
|
25
|
+
height?: number;
|
|
26
|
+
origin?: PointInput;
|
|
27
|
+
draftAngle?: number;
|
|
28
|
+
}): AnyShape;
|
|
29
|
+
toSVGViewBox(margin?: number): string;
|
|
30
|
+
toSVGPaths(): string[];
|
|
31
|
+
toSVGGroup(): string;
|
|
32
|
+
toSVG(margin?: number): string;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=CompoundBlueprint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompoundBlueprint.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/CompoundBlueprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,CAAC,OAAO,OAAO,iBAAkB,YAAW,gBAAgB;IAChE,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,SAAS,CAAC,YAAY,EAAE,aAAa,GAAG,IAAI,CAAC;gBAEjC,UAAU,EAAE,SAAS,EAAE;IAQnC,KAAK,IAAI,iBAAiB;IAI1B,IAAI,WAAW,IAAI,aAAa,CAS/B;IAED,IAAI,IAAI,WASP;IAED,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OA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AE,CAAC,EAAE,OAAO,EAAE,oBAAoB,GAAG,CAAC,CAS5F"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Point2D, BoundingBox2d } from '../lib/index.js';
|
|
2
|
+
import { default as Blueprint } from './Blueprint.js';
|
|
3
|
+
import { PointInput } from '../../core/types.js';
|
|
4
|
+
import { Plane, PlaneName } from '../../core/planeTypes.js';
|
|
5
|
+
import { Face } from '../../topology/shapes.js';
|
|
6
|
+
import { ScaleMode } from '../curves.js';
|
|
7
|
+
/** Create a new Blueprint from curves. */
|
|
8
|
+
export declare function createBlueprint(curves: Blueprint['curves']): Blueprint;
|
|
9
|
+
/** Get the bounding box of a blueprint. */
|
|
10
|
+
export declare function blueprintBoundingBox(bp: Blueprint): BoundingBox2d;
|
|
11
|
+
/** Get the orientation (winding direction) of a blueprint. */
|
|
12
|
+
export declare function blueprintOrientation(bp: Blueprint): 'clockwise' | 'counterClockwise';
|
|
13
|
+
/** Translate a blueprint by (dx, dy). Returns a new Blueprint. */
|
|
14
|
+
export declare function translateBlueprint(bp: Blueprint, dx: number, dy: number): Blueprint;
|
|
15
|
+
/** Rotate a blueprint by angle degrees around an optional center. Returns a new Blueprint. */
|
|
16
|
+
export declare function rotateBlueprint(bp: Blueprint, angle: number, center?: Point2D): Blueprint;
|
|
17
|
+
/** Scale a blueprint by a factor around an optional center. Returns a new Blueprint. */
|
|
18
|
+
export declare function scaleBlueprint(bp: Blueprint, factor: number, center?: Point2D): Blueprint;
|
|
19
|
+
/** Mirror a blueprint. Returns a new Blueprint. */
|
|
20
|
+
export declare function mirrorBlueprint(bp: Blueprint, centerOrDirection: Point2D, origin?: Point2D, mode?: 'center' | 'plane'): Blueprint;
|
|
21
|
+
/** Stretch a blueprint. Returns a new Blueprint. */
|
|
22
|
+
export declare function stretchBlueprint(bp: Blueprint, ratio: number, direction: Point2D, origin?: Point2D): Blueprint;
|
|
23
|
+
/** Convert a blueprint to an SVG path data string. */
|
|
24
|
+
export declare function blueprintToSVGPathD(bp: Blueprint): string;
|
|
25
|
+
/** Check if a 2D point is inside the blueprint. */
|
|
26
|
+
export declare function blueprintIsInside(bp: Blueprint, point: Point2D): boolean;
|
|
27
|
+
/** Sketch a blueprint on a plane. */
|
|
28
|
+
export declare function sketchBlueprintOnPlane(bp: Blueprint, inputPlane?: PlaneName | Plane, origin?: PointInput | number): any;
|
|
29
|
+
/** Sketch a blueprint on a face. */
|
|
30
|
+
export declare function sketchBlueprintOnFace(bp: Blueprint, face: Face, scaleMode?: ScaleMode): any;
|
|
31
|
+
//# sourceMappingURL=blueprintFns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blueprintFns.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/blueprintFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,0CAA0C;AAC1C,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,SAAS,CAEtE;AAED,2CAA2C;AAC3C,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,SAAS,GAAG,aAAa,CAEjE;AAED,8DAA8D;AAC9D,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,SAAS,GAAG,WAAW,GAAG,kBAAkB,CAEpF;AAED,kEAAkE;AAClE,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,CAEnF;AAED,8FAA8F;AAC9F,wBAAgB,eAAe,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAEzF;AAED,wFAAwF;AACxF,wBAAgB,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAEzF;AAED,mDAAmD;AACnD,wBAAgB,eAAe,CAC7B,EAAE,EAAE,SAAS,EACb,iBAAiB,EAAE,OAAO,EAC1B,MAAM,CAAC,EAAE,OAAO,EAChB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GACxB,SAAS,CAEX;AAED,oDAAoD;AACpD,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,SAAS,EACb,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,OAAO,EAClB,MAAM,CAAC,EAAE,OAAO,GACf,SAAS,CAEX;AAED,sDAAsD;AACtD,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,CAEzD;AAED,mDAAmD;AACnD,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAExE;AAED,qCAAqC;AAErC,wBAAgB,sBAAsB,CACpC,EAAE,EAAE,SAAS,EACb,UAAU,CAAC,EAAE,SAAS,GAAG,KAAK,EAC9B,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,GAE3B,GAAG,CAEL;AAED,oCAAoC;AACpC,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,SAAS,EACb,IAAI,EAAE,IAAI,EACV,SAAS,CAAC,EAAE,SAAS,GAGpB,GAAG,CAEL"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as Blueprint } from './Blueprint.js';
|
|
2
|
+
import { default as Blueprints } from './Blueprints.js';
|
|
3
|
+
import { default as CompoundBlueprint } from './CompoundBlueprint.js';
|
|
4
|
+
export type Shape2D = Blueprint | Blueprints | CompoundBlueprint | null;
|
|
5
|
+
export declare const fuse2D: (first: Shape2D, second: Shape2D) => Blueprint | Blueprints | CompoundBlueprint | null;
|
|
6
|
+
export declare const cut2D: (first: Shape2D, second: Shape2D) => Blueprint | Blueprints | CompoundBlueprint | null;
|
|
7
|
+
export declare function intersect2D(first: Shape2D, second: Shape2D): Blueprint | Blueprints | CompoundBlueprint | null;
|
|
8
|
+
//# sourceMappingURL=boolean2D.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean2D.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/boolean2D.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAMvD,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,iBAAiB,GAAG,IAAI,CAAC;AA2LxE,eAAO,MAAM,MAAM,GACjB,OAAO,OAAO,EACd,QAAQ,OAAO,KACd,SAAS,GAAG,UAAU,GAAG,iBAAiB,GAAG,IAoD/C,CAAC;AAcF,eAAO,MAAM,KAAK,GAChB,OAAO,OAAO,EACd,QAAQ,OAAO,KACd,SAAS,GAAG,UAAU,GAAG,iBAAiB,GAAG,IA8C/C,CAAC;AAEF,wBAAgB,WAAW,CACzB,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,OAAO,GACd,SAAS,GAAG,UAAU,GAAG,iBAAiB,GAAG,IAAI,CAwDnD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as Blueprint } from './Blueprint.js';
|
|
2
|
+
import { default as Blueprints } from './Blueprints.js';
|
|
3
|
+
import { default as CompoundBlueprint } from './CompoundBlueprint.js';
|
|
4
|
+
import { Shape2D } from './boolean2D.js';
|
|
5
|
+
/** Fuse (union) two 2D shapes. */
|
|
6
|
+
export declare function fuseBlueprint2D(a: Blueprint | CompoundBlueprint | Blueprints, b: Blueprint | CompoundBlueprint | Blueprints): Shape2D;
|
|
7
|
+
/** Cut (difference) a 2D shape from another. */
|
|
8
|
+
export declare function cutBlueprint2D(base: Blueprint | CompoundBlueprint | Blueprints, tool: Blueprint | CompoundBlueprint | Blueprints): Shape2D;
|
|
9
|
+
/** Intersect two 2D shapes. */
|
|
10
|
+
export declare function intersectBlueprint2D(a: Blueprint | CompoundBlueprint | Blueprints, b: Blueprint | CompoundBlueprint | Blueprints): Shape2D;
|
|
11
|
+
//# sourceMappingURL=boolean2dFns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean2dFns.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/boolean2dFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAA8B,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE1E,kCAAkC;AAClC,wBAAgB,eAAe,CAC7B,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,UAAU,EAC7C,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,UAAU,GAC5C,OAAO,CAET;AAED,gDAAgD;AAChD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,SAAS,GAAG,iBAAiB,GAAG,UAAU,EAChD,IAAI,EAAE,SAAS,GAAG,iBAAiB,GAAG,UAAU,GAC/C,OAAO,CAET;AAED,+BAA+B;AAC/B,wBAAgB,oBAAoB,CAClC,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,UAAU,EAC7C,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,UAAU,GAC5C,OAAO,CAET"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as Blueprint } from './Blueprint.js';
|
|
2
|
+
import { default as Blueprints } from './Blueprints.js';
|
|
3
|
+
export declare const fuseBlueprints: (first: Blueprint, second: Blueprint) => null | Blueprint | Blueprints;
|
|
4
|
+
export declare const cutBlueprints: (first: Blueprint, second: Blueprint) => null | Blueprint | Blueprints;
|
|
5
|
+
export declare const intersectBlueprints: (first: Blueprint, second: Blueprint) => null | Blueprint | Blueprints;
|
|
6
|
+
//# sourceMappingURL=booleanOperations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"booleanOperations.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/booleanOperations.ts"],"names":[],"mappings":"AAWA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,UAAU,MAAM,iBAAiB,CAAC;AA4ezC,eAAO,MAAM,cAAc,GACzB,OAAO,SAAS,EAChB,QAAQ,SAAS,KAChB,IAAI,GAAG,SAAS,GAAG,UAqBrB,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,OAAO,SAAS,EAChB,QAAQ,SAAS,KAChB,IAAI,GAAG,SAAS,GAAG,UAqBrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,OAAO,SAAS,EAChB,QAAQ,SAAS,KAChB,IAAI,GAAG,SAAS,GAAG,UAqBrB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as Blueprint } from './Blueprint.js';
|
|
2
|
+
export declare const polysidesBlueprint: (radius: number, sidesCount: number, sagitta?: number) => Blueprint;
|
|
3
|
+
export declare const roundedRectangleBlueprint: (width: number, height: number, r?: number | {
|
|
4
|
+
rx?: number;
|
|
5
|
+
ry?: number;
|
|
6
|
+
}) => Blueprint;
|
|
7
|
+
//# sourceMappingURL=cannedBlueprints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cannedBlueprints.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/cannedBlueprints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAG5C,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,YAAY,MAAM,EAAE,gBAAW,KAAG,SAkBpF,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,OAAO,MAAM,EACb,QAAQ,MAAM,EACd,IAAG,MAAM,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAM,cAwC7C,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CornerFinder } from '../../query/cornerFinder.js';
|
|
2
|
+
import { Shape2D } from './boolean2D.js';
|
|
3
|
+
export declare function fillet2D(shape: Shape2D, radius: number, finder?: CornerFinder): Shape2D;
|
|
4
|
+
export declare function chamfer2D(shape: Shape2D, radius: number, finder?: CornerFinder): Shape2D;
|
|
5
|
+
//# sourceMappingURL=customCorners.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customCorners.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/customCorners.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAKxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAgF9C,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,WAE7E;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,WAE9E"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as Blueprint } from './Blueprint.js';
|
|
2
|
+
import { default as CompoundBlueprint } from './CompoundBlueprint.js';
|
|
3
|
+
import { default as Blueprints } from './Blueprints.js';
|
|
4
|
+
import { DrawingInterface, organiseBlueprints } from './lib.js';
|
|
5
|
+
import { ScaleMode } from '../curves.js';
|
|
6
|
+
import { default as offset } from './offset.js';
|
|
7
|
+
export { Blueprint, CompoundBlueprint, Blueprints, organiseBlueprints, offset };
|
|
8
|
+
export type { DrawingInterface, ScaleMode };
|
|
9
|
+
export * from './cannedBlueprints.js';
|
|
10
|
+
export * from './booleanOperations.js';
|
|
11
|
+
export * from './boolean2D.js';
|
|
12
|
+
export * from './approximations.js';
|
|
13
|
+
export * from './offset.js';
|
|
14
|
+
export * from './customCorners.js';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC;AAEhF,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Point2D, BoundingBox2d } from '../lib/index.js';
|
|
2
|
+
import { Face, Wire } from '../../topology/shapes.js';
|
|
3
|
+
import { Plane, PlaneName } from '../../core/planeTypes.js';
|
|
4
|
+
import { Vec3, PointInput } from '../../core/types.js';
|
|
5
|
+
import { ScaleMode } from '../curves.js';
|
|
6
|
+
import { default as Blueprint } from './Blueprint.js';
|
|
7
|
+
import { default as Blueprints } from './Blueprints.js';
|
|
8
|
+
/**
|
|
9
|
+
* Groups an array of blueprints such that blueprints that correspond to holes
|
|
10
|
+
* in other blueprints are set in a `CompoundBlueprint`.
|
|
11
|
+
*
|
|
12
|
+
* The current algorithm does not handle cases where blueprints cross each
|
|
13
|
+
* other
|
|
14
|
+
*/
|
|
15
|
+
export declare const organiseBlueprints: (blueprints: Blueprint[]) => Blueprints;
|
|
16
|
+
/** Plain data returned by blueprint sketchOnPlane/sketchOnFace (Layer 2).
|
|
17
|
+
* Layer 3 wraps this in a Sketch class. */
|
|
18
|
+
export interface SketchData {
|
|
19
|
+
wire: Wire;
|
|
20
|
+
defaultOrigin?: Vec3;
|
|
21
|
+
defaultDirection?: Vec3;
|
|
22
|
+
baseFace?: Face | null;
|
|
23
|
+
}
|
|
24
|
+
export interface DrawingInterface {
|
|
25
|
+
clone(): DrawingInterface;
|
|
26
|
+
boundingBox: BoundingBox2d;
|
|
27
|
+
stretch(ratio: number, direction: Point2D, origin: Point2D): DrawingInterface;
|
|
28
|
+
rotate(angle: number, center: Point2D): DrawingInterface;
|
|
29
|
+
translate(xDist: number, yDist: number): DrawingInterface;
|
|
30
|
+
translate(translationVector: Point2D): DrawingInterface;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the mirror image of this drawing made with a single point (in
|
|
33
|
+
* center mode, the default, or a plane, (plane mode, with both direction and
|
|
34
|
+
* origin of the plane).
|
|
35
|
+
*/
|
|
36
|
+
mirror(centerOrDirection: Point2D, origin?: Point2D, mode?: 'center' | 'plane'): DrawingInterface;
|
|
37
|
+
/**
|
|
38
|
+
* Returns sketch data for the drawing on a plane.
|
|
39
|
+
*/
|
|
40
|
+
sketchOnPlane(inputPlane?: PlaneName | Plane, origin?: PointInput | number): SketchData | SketchData[] | (SketchData | SketchData[])[];
|
|
41
|
+
/**
|
|
42
|
+
* Returns sketch data for the drawing on a face.
|
|
43
|
+
*
|
|
44
|
+
* The scale mode corresponds to the way the coordinates of the drawing are
|
|
45
|
+
* interpreted match with the face:
|
|
46
|
+
*
|
|
47
|
+
* - `original` uses global coordinates (1mm in the drawing is 1mm on the
|
|
48
|
+
* face). This is the default, but currently supported only for planar
|
|
49
|
+
* and circular faces
|
|
50
|
+
* - `bounds` normalises the UV parameters on the face to [0,1] intervals.
|
|
51
|
+
* - `native` uses the default UV parameters of opencascade
|
|
52
|
+
*/
|
|
53
|
+
sketchOnFace(face: Face, scaleMode: ScaleMode): SketchData | SketchData[] | (SketchData | SketchData[])[];
|
|
54
|
+
/**
|
|
55
|
+
* Formats the drawing as an SVG image
|
|
56
|
+
*/
|
|
57
|
+
toSVG(margin: number): string;
|
|
58
|
+
/**
|
|
59
|
+
* Returns the SVG viewbox that corresponds to this drawing
|
|
60
|
+
*/
|
|
61
|
+
toSVGViewBox(margin?: number): string;
|
|
62
|
+
/**
|
|
63
|
+
* Formats the drawing as a list of SVG paths
|
|
64
|
+
*/
|
|
65
|
+
toSVGPaths(): string[] | string[][];
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/lib.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,KAAK,EAAE,SA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AAE,SAAS,GACnB,UAAU,GAAG,UAAU,EAAE,GAAG,CAAC,UAAU,GAAG,UAAU,EAAE,CAAC,EAAE,CAAC;IAE7D;;OAEG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAE9B;;OAEG;IACH,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtC;;OAEG;IACH,UAAU,IAAI,MAAM,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC;CACrC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Curve2D } from '../lib/index.js';
|
|
2
|
+
import { default as Blueprint } from './Blueprint.js';
|
|
3
|
+
import { Shape2D } from './boolean2D.js';
|
|
4
|
+
export declare function rawOffsets(blueprint: Blueprint, offset: number, offsetConfig?: Offset2DConfig): Curve2D[];
|
|
5
|
+
export interface Offset2DConfig {
|
|
6
|
+
lineJoinType?: 'miter' | 'bevel' | 'round';
|
|
7
|
+
}
|
|
8
|
+
export declare function offsetBlueprint(blueprint: Blueprint, offset: number, offsetConfig?: Offset2DConfig): Shape2D;
|
|
9
|
+
export default function offset(bp: Shape2D, offsetDistance: number, offsetConfig?: Offset2DConfig): Shape2D;
|
|
10
|
+
//# sourceMappingURL=offset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offset.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/offset.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,OAAO,EAQR,MAAM,iBAAiB,CAAC;AACzB,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAGvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AA2G9C,wBAAgB,UAAU,CACxB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,YAAY,GAAE,cAAmB,GAChC,OAAO,EAAE,CA6HX;AAOD,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;CAC5C;AAED,wBAAgB,eAAe,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,YAAY,GAAE,cAAmB,GAChC,OAAO,CAqGT;AAYD,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,EAAE,EAAE,OAAO,EACX,cAAc,EAAE,MAAM,EACtB,YAAY,GAAE,cAAmB,GAChC,OAAO,CAgBT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/svg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,eAAO,MAAM,OAAO,GAAI,MAAM,aAAa,EAAE,eAAU,WAKtD,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,EAAE,aAAa,aAAa,EAAE,eAAU,WAKzE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OcType } from '../kernel/types.js';
|
|
2
|
+
import { WrappingObj } from '../core/memory.js';
|
|
3
|
+
import { Plane } from '../core/planeTypes.js';
|
|
4
|
+
import { Face, Edge } from '../topology/shapes.js';
|
|
5
|
+
import { Result } from '../core/result.js';
|
|
6
|
+
import { Point2D, BoundingBox2d, Curve2D } from './lib/index.js';
|
|
7
|
+
export declare const curvesBoundingBox: (curves: Curve2D[]) => BoundingBox2d;
|
|
8
|
+
export declare function curvesAsEdgesOnPlane(curves: Curve2D[], plane: Plane): Edge[];
|
|
9
|
+
export declare const curvesAsEdgesOnSurface: (curves: Curve2D[], geomSurf: OcType) => Edge[];
|
|
10
|
+
export declare const transformCurves: (curves: Curve2D[], transformation: OcType) => Curve2D[];
|
|
11
|
+
export declare class Transformation2D extends WrappingObj<OcType> {
|
|
12
|
+
transformCurves(curves: Curve2D[]): Curve2D[];
|
|
13
|
+
}
|
|
14
|
+
export declare const stretchTransform2d: (ratio: number, direction: Point2D, origin?: Point2D) => Transformation2D;
|
|
15
|
+
export declare const translationTransform2d: (translation: Point2D) => Transformation2D;
|
|
16
|
+
export declare const mirrorTransform2d: (centerOrDirection: Point2D, origin?: Point2D, mode?: string) => Transformation2D;
|
|
17
|
+
export declare const rotateTransform2d: (angle: number, center?: Point2D) => Transformation2D;
|
|
18
|
+
export declare const scaleTransform2d: (scaleFactor: number, center?: Point2D) => Transformation2D;
|
|
19
|
+
export type ScaleMode = 'original' | 'bounds' | 'native';
|
|
20
|
+
export declare function curvesAsEdgesOnFace(curves: Curve2D[], face: Face, scale?: ScaleMode): Result<Edge[]>;
|
|
21
|
+
export declare function edgeToCurve(e: Edge, face: Face): Curve2D;
|
|
22
|
+
//# sourceMappingURL=curves.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"curves.d.ts","sourceRoot":"","sources":["../../src/2d/curves.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAwB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAoB,aAAa,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE1E,eAAO,MAAM,iBAAiB,GAAI,QAAQ,OAAO,EAAE,KAAG,aASrD,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,CAc5E;AAED,eAAO,MAAM,sBAAsB,GAAI,QAAQ,OAAO,EAAE,EAAE,UAAU,MAAM,KAAG,IAAI,EAWhF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,QAAQ,OAAO,EAAE,EAAE,gBAAgB,MAAM,KAAG,OAAO,EASlF,CAAC;AAEF,qBAAa,gBAAiB,SAAQ,WAAW,CAAC,MAAM,CAAC;IACvD,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE;CAG9C;AAED,eAAO,MAAM,kBAAkB,GAC7B,OAAO,MAAM,EACb,WAAW,OAAO,EAClB,SAAQ,OAAgB,KACvB,gBAQF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,aAAa,OAAO,KAAG,gBAU7D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,mBAAmB,OAAO,EAC1B,SAAQ,OAAgB,EACxB,aAAe,KACd,gBAcF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,EAAE,SAAQ,OAAgB,KAAG,gBAU3E,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,aAAa,MAAM,EACnB,SAAQ,OAAgB,KACvB,gBAUF,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEzD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,OAAO,EAAE,EACjB,IAAI,EAAE,IAAI,EACV,KAAK,GAAE,SAAsB,GAC5B,MAAM,CAAC,IAAI,EAAE,CAAC,CAwDhB;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAmBxD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WrappingObj } from '../../core/memory.js';
|
|
2
|
+
import { OcType } from '../../kernel/types.js';
|
|
3
|
+
import { Point2D } from './definitions.js';
|
|
4
|
+
export declare class BoundingBox2d extends WrappingObj<OcType> {
|
|
5
|
+
constructor(wrapped?: OcType);
|
|
6
|
+
get repr(): string;
|
|
7
|
+
get bounds(): [Point2D, Point2D];
|
|
8
|
+
get center(): Point2D;
|
|
9
|
+
get width(): number;
|
|
10
|
+
get height(): number;
|
|
11
|
+
outsidePoint(paddingPercent?: number): Point2D;
|
|
12
|
+
add(other: BoundingBox2d): void;
|
|
13
|
+
isOut(other: BoundingBox2d): boolean;
|
|
14
|
+
containsPoint(other: Point2D): boolean;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=BoundingBox2d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoundingBox2d.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/BoundingBox2d.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,sBAAsB,CAAC;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,qBAAa,aAAc,SAAQ,WAAW,CAAC,MAAM,CAAC;gBACxC,OAAO,CAAC,EAAE,MAAM;IAS5B,IAAI,IAAI,IAAI,MAAM,CAGjB;IAED,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAW/B;IAED,IAAI,MAAM,IAAI,OAAO,CAGpB;IAED,IAAI,KAAK,IAAI,MAAM,CAGlB;IAED,IAAI,MAAM,IAAI,MAAM,CAGnB;IAED,YAAY,CAAC,cAAc,SAAI,GAAG,OAAO;IAWzC,GAAG,CAAC,KAAK,EAAE,aAAa;IAIxB,KAAK,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;IAIpC,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;CAKvC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { OcType } from '../../kernel/types.js';
|
|
2
|
+
import { CurveType } from '../../core/definitionMaps.js';
|
|
3
|
+
import { Result } from '../../core/result.js';
|
|
4
|
+
import { WrappingObj } from '../../core/memory.js';
|
|
5
|
+
import { BoundingBox2d } from './BoundingBox2d.js';
|
|
6
|
+
import { Point2D } from './definitions.js';
|
|
7
|
+
export declare function deserializeCurve2D(data: string): Curve2D;
|
|
8
|
+
export declare class Curve2D extends WrappingObj<OcType> {
|
|
9
|
+
_boundingBox: null | BoundingBox2d;
|
|
10
|
+
private _firstPoint;
|
|
11
|
+
private _lastPoint;
|
|
12
|
+
constructor(handle: OcType);
|
|
13
|
+
get boundingBox(): BoundingBox2d;
|
|
14
|
+
get repr(): string;
|
|
15
|
+
get innerCurve(): OcType;
|
|
16
|
+
serialize(): string;
|
|
17
|
+
value(parameter: number): Point2D;
|
|
18
|
+
get firstPoint(): Point2D;
|
|
19
|
+
get lastPoint(): Point2D;
|
|
20
|
+
get firstParameter(): number;
|
|
21
|
+
get lastParameter(): number;
|
|
22
|
+
adaptor(): OcType;
|
|
23
|
+
get geomType(): CurveType;
|
|
24
|
+
clone(): Curve2D;
|
|
25
|
+
reverse(): void;
|
|
26
|
+
private distanceFromPoint;
|
|
27
|
+
private distanceFromCurve;
|
|
28
|
+
distanceFrom(element: Curve2D | Point2D): number;
|
|
29
|
+
isOnCurve(point: Point2D): boolean;
|
|
30
|
+
parameter(point: Point2D, precision?: number): Result<number>;
|
|
31
|
+
tangentAt(index: number | Point2D): Point2D;
|
|
32
|
+
splitAt(points: Point2D[] | number[], precision?: number): Curve2D[];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=Curve2D.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Curve2D.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/Curve2D.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,KAAK,MAAM,EAAmB,MAAM,sBAAsB,CAAC;AAIpE,OAA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gEnE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OcType } from '../../kernel/types.js';
|
|
2
|
+
import { Curve2D } from './Curve2D.js';
|
|
3
|
+
export declare const approximateAsBSpline: (adaptor: OcType, tolerance?: number, continuity?: "C0" | "C1" | "C2" | "C3", maxSegments?: number) => Curve2D;
|
|
4
|
+
export declare const BSplineToBezier: (adaptor: OcType) => Curve2D[];
|
|
5
|
+
export interface ApproximationOptions {
|
|
6
|
+
tolerance?: number;
|
|
7
|
+
continuity?: 'C0' | 'C1' | 'C2' | 'C3';
|
|
8
|
+
maxSegments?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function approximateAsSvgCompatibleCurve(curves: Curve2D[], options?: ApproximationOptions): Curve2D[];
|
|
11
|
+
//# sourceMappingURL=approximations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approximations.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/approximations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAMpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,EACf,kBAAgB,EAChB,aAAY,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAW,EAC5C,oBAAiB,KAChB,OAsBF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,KAAG,OAAO,EAsBxD,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,OAAO,EAAE,EACjB,OAAO,GAAE,oBAIR,GACA,OAAO,EAAE,CAwCX"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Point2D } from './definitions.js';
|
|
2
|
+
import { BoundingBox2d } from './BoundingBox2d.js';
|
|
3
|
+
import { Curve2D } from './Curve2D.js';
|
|
4
|
+
import { Result } from '../../core/result.js';
|
|
5
|
+
/** Return a reversed copy of the curve (non-mutating). */
|
|
6
|
+
export declare function reverseCurve(curve: Curve2D): Curve2D;
|
|
7
|
+
/** Get the bounding box of a 2D curve. */
|
|
8
|
+
export declare function curve2dBoundingBox(curve: Curve2D): BoundingBox2d;
|
|
9
|
+
/** Get the first point of a 2D curve. */
|
|
10
|
+
export declare function curve2dFirstPoint(curve: Curve2D): Point2D;
|
|
11
|
+
/** Get the last point of a 2D curve. */
|
|
12
|
+
export declare function curve2dLastPoint(curve: Curve2D): Point2D;
|
|
13
|
+
/** Split a curve at the given parameters or points. */
|
|
14
|
+
export declare function curve2dSplitAt(curve: Curve2D, params: Point2D[] | number[], precision?: number): Curve2D[];
|
|
15
|
+
/** Find the parameter on the curve closest to the given point. */
|
|
16
|
+
export declare function curve2dParameter(curve: Curve2D, point: Point2D, precision?: number): Result<number>;
|
|
17
|
+
/** Get the tangent vector at a parameter position on the curve. */
|
|
18
|
+
export declare function curve2dTangentAt(curve: Curve2D, param: number | Point2D): Point2D;
|
|
19
|
+
/** Check if a point lies on the curve. */
|
|
20
|
+
export declare function curve2dIsOnCurve(curve: Curve2D, point: Point2D): boolean;
|
|
21
|
+
/** Compute the distance from a point to the curve. */
|
|
22
|
+
export declare function curve2dDistanceFrom(curve: Curve2D, point: Point2D): number;
|
|
23
|
+
//# sourceMappingURL=curve2dFns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"curve2dFns.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/curve2dFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAIpD;AAED,0CAA0C;AAC1C,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,CAEhE;AAED,yCAAyC;AACzC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED,wCAAwC;AACxC,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAExD;AAED,uDAAuD;AACvD,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,EAC5B,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,EAAE,CAEX;AAED,kEAAkE;AAClE,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,OAAO,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,CAAC,CAEhB;AAED,mEAAmE;AACnE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAEjF;AAED,0CAA0C;AAC1C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAExE;AAED,sDAAsD;AACtD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAE1E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Curve2D } from './Curve2D.js';
|
|
2
|
+
export declare function filletCurves(firstCurve: Curve2D, secondCurve: Curve2D, radius: number): Curve2D[];
|
|
3
|
+
export declare function chamferCurves(firstCurve: Curve2D, secondCurve: Curve2D, radius: number): Curve2D[];
|
|
4
|
+
export declare function dogboneFilletCurves(firstCurve: Curve2D, secondCurve: Curve2D, radius: number): Curve2D[];
|
|
5
|
+
//# sourceMappingURL=customCorners.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customCorners.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/customCorners.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAuDvC,wBAAgB,YAAY,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aASrF;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aAStF;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aAgD5F"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type Point2D = [number, number];
|
|
2
|
+
export declare function isPoint2D(point: unknown): point is Point2D;
|
|
3
|
+
export type Matrix2X2 = [[number, number], [number, number]];
|
|
4
|
+
export declare function isMatrix2X2(matrix: unknown): matrix is Matrix2X2;
|
|
5
|
+
//# sourceMappingURL=definitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/definitions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEvC,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAO1D;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7D,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,SAAS,CAYhE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './precision.js';
|
|
2
|
+
export * from './definitions.js';
|
|
3
|
+
export * from './approximations.js';
|
|
4
|
+
export * from './BoundingBox2d.js';
|
|
5
|
+
export * from './ocWrapper.js';
|
|
6
|
+
export * from './vectorOperations.js';
|
|
7
|
+
export * from './intersections.js';
|
|
8
|
+
export * from './Curve2D.js';
|
|
9
|
+
export * from './customCorners.js';
|
|
10
|
+
export * from './makeCurves.js';
|
|
11
|
+
export * from './utils.js';
|
|
12
|
+
export * from './offset.js';
|
|
13
|
+
export * from './stitching.js';
|
|
14
|
+
export * from './svgPath.js';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Curve2D } from './Curve2D.js';
|
|
2
|
+
import { Point2D } from './definitions.js';
|
|
3
|
+
import { Result } from '../../core/result.js';
|
|
4
|
+
interface IntersectionResult {
|
|
5
|
+
intersections: Point2D[];
|
|
6
|
+
commonSegments: Curve2D[];
|
|
7
|
+
commonSegmentsPoints: Point2D[];
|
|
8
|
+
}
|
|
9
|
+
export declare const intersectCurves: (first: Curve2D, second: Curve2D, precision?: number) => Result<IntersectionResult>;
|
|
10
|
+
export declare const selfIntersections: (curve: Curve2D, precision?: number) => Result<Point2D[]>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=intersections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intersections.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/intersections.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,sBAAsB,CAAC;AAsC5D,UAAU,kBAAkB;IAC1B,aAAa,EAAE,OAAO,EAAE,CAAC;IACzB,cAAc,EAAE,OAAO,EAAE,CAAC;IAC1B,oBAAoB,EAAE,OAAO,EAAE,CAAC;CACjC;AAED,eAAO,MAAM,eAAe,GAC1B,OAAO,OAAO,EACd,QAAQ,OAAO,EACf,kBAAgB,KACf,MAAM,CAAC,kBAAkB,CAiC3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,EAAE,kBAAgB,KAAG,MAAM,CAAC,OAAO,EAAE,CAiBpF,CAAC"}
|