@code3d/core 0.0.1-alpha.0 → 0.0.1-alpha.3
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 +223 -786
- package/THIRD_PARTY.md +40 -0
- package/bld/THIRD_PARTY_NOTICES.txt +182 -0
- package/bld/chunks/chunk-BF55AIEQ.js +31 -0
- package/bld/chunks/chunk-BF55AIEQ.js.map +7 -0
- package/bld/chunks/chunk-P5VGKAEM.js +30 -0
- package/bld/chunks/chunk-P5VGKAEM.js.map +7 -0
- package/bld/chunks/chunk-RPY2WVCB.js +24834 -0
- package/bld/chunks/chunk-RPY2WVCB.js.map +7 -0
- package/bld/chunks/chunk-TJIN6S4R.js +1 -0
- package/bld/chunks/chunk-TJIN6S4R.js.map +7 -0
- package/bld/chunks/chunk-U5G2VU2I.js +19 -0
- package/bld/chunks/chunk-U5G2VU2I.js.map +7 -0
- package/bld/library/cached.d.ts +33 -0
- package/bld/library/cached.d.ts.map +1 -0
- package/bld/library/font.d.ts +39 -0
- package/bld/library/font.d.ts.map +1 -0
- package/bld/library/google-font.d.ts +14 -0
- package/bld/library/google-font.d.ts.map +1 -0
- package/bld/library/index.d.ts +8 -2
- package/bld/library/index.d.ts.map +1 -1
- package/bld/library/index.js +60 -3
- package/bld/library/index.js.map +7 -1
- package/bld/library/kernel-artifact-codec.d.ts.map +1 -1
- package/bld/library/kernel-cache.d.ts +24 -6
- package/bld/library/kernel-cache.d.ts.map +1 -1
- package/bld/library/material.d.ts +1 -1
- package/bld/library/material.d.ts.map +1 -1
- package/bld/library/open-cascade.d.ts +4 -0
- package/bld/library/open-cascade.d.ts.map +1 -0
- package/bld/library/replicad.d.ts +3 -2
- package/bld/library/replicad.d.ts.map +1 -1
- package/bld/library/replicad.js +10 -24
- package/bld/library/replicad.js.map +7 -1
- package/bld/library/retained-memory.d.ts.map +1 -1
- package/bld/library/runtime.d.ts +146 -80
- package/bld/library/runtime.d.ts.map +1 -1
- package/bld/library/sketch-solver.d.ts +1 -1
- package/bld/library/sketch-solver.d.ts.map +1 -1
- package/bld/library/sketch.d.ts +9 -1
- package/bld/library/sketch.d.ts.map +1 -1
- package/bld/library/text.d.ts +53 -0
- package/bld/library/text.d.ts.map +1 -0
- package/bld/library/three.js +3 -3
- package/bld/library/three.js.map +7 -1
- package/bld/library/topology.d.ts.map +1 -1
- package/bld/node/index.d.ts.map +1 -1
- package/bld/node/index.js +62 -14
- package/bld/node/index.js.map +7 -1
- package/bld/node/replicad.js +13 -3
- package/bld/node/replicad.js.map +7 -1
- package/bld/tooling/index.d.ts +17 -15
- package/bld/tooling/index.d.ts.map +1 -1
- package/bld/tooling/index.js +147 -19
- package/bld/tooling/index.js.map +7 -1
- package/package.json +18 -6
- package/src/library/cached.ts +132 -0
- package/src/library/font.ts +186 -0
- package/src/library/google-font.ts +97 -0
- package/src/library/index.ts +8 -3
- package/src/library/kernel-artifact-codec.ts +129 -20
- package/src/library/kernel-cache.ts +128 -34
- package/src/library/loft.ts +4 -0
- package/src/library/material.ts +3 -4
- package/src/library/open-cascade.ts +13 -0
- package/src/library/replicad.ts +5 -5
- package/src/library/retained-memory.ts +6 -1
- package/src/library/runtime.ts +2064 -1730
- package/src/library/sketch-solver.ts +3 -1
- package/src/library/sketch.ts +81 -13
- package/src/library/text.ts +477 -0
- package/src/library/topology.ts +24 -0
- package/src/library/tsconfig.json +2 -1
- package/src/node/index.ts +14 -3
- package/src/node/tsconfig.json +2 -1
- package/src/tooling/index.ts +48 -46
- package/src/tooling/tsconfig.json +2 -1
- package/bld/library/alignment-geometry.js +0 -322
- package/bld/library/alignment-geometry.js.map +0 -1
- package/bld/library/bound-solver.js +0 -252
- package/bld/library/bound-solver.js.map +0 -1
- package/bld/library/extrude.js +0 -28
- package/bld/library/extrude.js.map +0 -1
- package/bld/library/kernel-artifact-codec.js +0 -148
- package/bld/library/kernel-artifact-codec.js.map +0 -1
- package/bld/library/kernel-cache.js +0 -245
- package/bld/library/kernel-cache.js.map +0 -1
- package/bld/library/kernel-shapes.js +0 -108
- package/bld/library/kernel-shapes.js.map +0 -1
- package/bld/library/loft.js +0 -161
- package/bld/library/loft.js.map +0 -1
- package/bld/library/material.js +0 -176
- package/bld/library/material.js.map +0 -1
- package/bld/library/model-color.js +0 -36
- package/bld/library/model-color.js.map +0 -1
- package/bld/library/open-cascade-error.js +0 -22
- package/bld/library/open-cascade-error.js.map +0 -1
- package/bld/library/relation-solver.js +0 -258
- package/bld/library/relation-solver.js.map +0 -1
- package/bld/library/retained-memory.js +0 -27
- package/bld/library/retained-memory.js.map +0 -1
- package/bld/library/runtime.js +0 -2954
- package/bld/library/runtime.js.map +0 -1
- package/bld/library/shell.js +0 -221
- package/bld/library/shell.js.map +0 -1
- package/bld/library/sketch-curve-intersections.js +0 -117
- package/bld/library/sketch-curve-intersections.js.map +0 -1
- package/bld/library/sketch-curves.js +0 -89
- package/bld/library/sketch-curves.js.map +0 -1
- package/bld/library/sketch-drag-rules.js +0 -522
- package/bld/library/sketch-drag-rules.js.map +0 -1
- package/bld/library/sketch-face.js +0 -72
- package/bld/library/sketch-face.js.map +0 -1
- package/bld/library/sketch-incidence.js +0 -114
- package/bld/library/sketch-incidence.js.map +0 -1
- package/bld/library/sketch-precision.js +0 -55
- package/bld/library/sketch-precision.js.map +0 -1
- package/bld/library/sketch-regions.js +0 -193
- package/bld/library/sketch-regions.js.map +0 -1
- package/bld/library/sketch-solver.js +0 -578
- package/bld/library/sketch-solver.js.map +0 -1
- package/bld/library/sketch.js +0 -650
- package/bld/library/sketch.js.map +0 -1
- package/bld/library/spatial.js +0 -195
- package/bld/library/spatial.js.map +0 -1
- package/bld/library/topology-id.js +0 -67
- package/bld/library/topology-id.js.map +0 -1
- package/bld/library/topology-inspection.js +0 -267
- package/bld/library/topology-inspection.js.map +0 -1
- package/bld/library/topology.js +0 -455
- package/bld/library/topology.js.map +0 -1
package/THIRD_PARTY.md
CHANGED
|
@@ -18,6 +18,10 @@ The App's built-in package distribution includes the dependency's own LICENSE,
|
|
|
18
18
|
source files, README, JS loader and separate WASM asset through the ordinary
|
|
19
19
|
package file manifest. Installed projects resolve the same files from their
|
|
20
20
|
own dependencies; Node uses the dependency's unmodified module initializer.
|
|
21
|
+
The workspace supplies the missing `dist/planegcs_dist/planegcs.d.ts` through
|
|
22
|
+
`patches/@salusoft89+planegcs+1.2.0.patch`, including the heap/handle observation
|
|
23
|
+
types used by tests. This affects declarations only. Core's published types use
|
|
24
|
+
the upstream source declaration path, so consumers do not need the patch.
|
|
21
25
|
The linked source revision contains the upstream native build scripts and
|
|
22
26
|
instructions. This change consumes the published artifact, not a locally
|
|
23
27
|
rebuilt binary. The archive SHA-1 is
|
|
@@ -26,3 +30,39 @@ rebuilt binary. The archive SHA-1 is
|
|
|
26
30
|
`@code3d/solver` / OndselSolver remains an independent workspace package.
|
|
27
31
|
Current core/App directional-bound relations solve translations directly and
|
|
28
32
|
do not depend on or initialize that package.
|
|
33
|
+
|
|
34
|
+
# Fonts and text
|
|
35
|
+
|
|
36
|
+
Font parsing, shaping and variable-font outlines use `harfbuzzjs` 1.6.1 (MIT).
|
|
37
|
+
The Node entry and App model engine initialize its WebAssembly runtime; Code3D
|
|
38
|
+
owns immutable font values instead of Replicad's global font registry. Google CSS
|
|
39
|
+
subsets are resolved by the App, which uses `woff2-encoder` 2.0.0 (MIT), its
|
|
40
|
+
decompress-only entry and bundled WASM to decode downloaded WOFF2 files.
|
|
41
|
+
|
|
42
|
+
Overlapping glyph contours use `flo-boolean` 5.0.8 (MIT), preserving Bezier curves
|
|
43
|
+
and the non-zero winding rule with no minimum-area filtering. Version 5 avoids
|
|
44
|
+
the unconditionally used `Map.getOrInsert` in version 6, which is unavailable in
|
|
45
|
+
our Node runtime. Its transitive `squares-rng` 2.0.4 has a workspace patch in
|
|
46
|
+
`patches/squares-rng+2.0.4.patch`: its original window/Node test misclassifies Web
|
|
47
|
+
Workers, so base64 decoding now uses the shared `globalThis.atob` API. The RNG
|
|
48
|
+
algorithm and embedded WASM are unchanged. Core prebundles this patched computation
|
|
49
|
+
dependency, so npm installations and the App's built-in package files contain the
|
|
50
|
+
same Worker-compatible code without requiring consumers to apply a patch.
|
|
51
|
+
|
|
52
|
+
The ESM bundles inline `flo-boolean`, its reached mathematical dependencies and
|
|
53
|
+
`@ctrl/tinycolor`. Their notices and full license text are collected in
|
|
54
|
+
`bld/THIRD_PARTY_NOTICES.txt`, including ordinary source copyright comments that
|
|
55
|
+
esbuild would otherwise remove. Explicit legal comments are also retained by
|
|
56
|
+
esbuild. Where an upstream npm archive supplies only an MIT
|
|
57
|
+
identifier and author, the notices include those metadata with the standard MIT
|
|
58
|
+
permission text. HarfBuzz, Replicad, Three.js and native/WASM runtimes remain
|
|
59
|
+
separate dependencies rather than being duplicated between public Core entries.
|
|
60
|
+
|
|
61
|
+
The dependencies' distributed licenses accompany the built-in dependency closure.
|
|
62
|
+
Text contours use Replicad/OpenCascade curves. Code3D groups nested glyph contours
|
|
63
|
+
explicitly to avoid the multi-hole grouping bug tracked in Replicad PR 278 and
|
|
64
|
+
Code3D issue 85; this is not a patched Replicad distribution.
|
|
65
|
+
|
|
66
|
+
The App example includes unmodified DejaVu Sans with the adjacent Bitstream Vera
|
|
67
|
+
license notice. Tests also include Noto Sans CJK OTF and Roboto variable TTF subsets
|
|
68
|
+
under their adjacent SIL Open Font Licenses; see `test/fonts/README.md` for provenance.
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
@ctrl/tinycolor 4.2.0 (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Scott Cooper <scttcper@gmail.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
big-float-ts 4.0.4 (MIT)
|
|
13
|
+
|
|
14
|
+
Copyright (c) Floris Steenkamp
|
|
15
|
+
git+https://github.com/FlorisSteenkamp/big-float.git
|
|
16
|
+
|
|
17
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
19
|
+
in the Software without restriction, including without limitation the rights
|
|
20
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
22
|
+
furnished to do so, subject to the following conditions:
|
|
23
|
+
|
|
24
|
+
The above copyright notice and this permission notice shall be included in
|
|
25
|
+
all copies or substantial portions of the Software.
|
|
26
|
+
|
|
27
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
30
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
33
|
+
THE SOFTWARE.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
double-double 3.0.4 (MIT)
|
|
37
|
+
|
|
38
|
+
## License
|
|
39
|
+
MIT
|
|
40
|
+
|
|
41
|
+
flo-bezier3 8.1.1 (MIT)
|
|
42
|
+
|
|
43
|
+
## License
|
|
44
|
+
|
|
45
|
+
The MIT License (MIT)
|
|
46
|
+
|
|
47
|
+
Copyright © 2026 Floris Steenkamp
|
|
48
|
+
|
|
49
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
50
|
+
|
|
51
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
52
|
+
|
|
53
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
flo-boolean 5.0.8 (MIT)
|
|
57
|
+
|
|
58
|
+
# License
|
|
59
|
+
The MIT License (MIT)
|
|
60
|
+
|
|
61
|
+
Copyright © 2025 Floris Steenkamp
|
|
62
|
+
|
|
63
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
64
|
+
|
|
65
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
66
|
+
|
|
67
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
68
|
+
|
|
69
|
+
flo-graham-scan 4.0.2 (MIT)
|
|
70
|
+
|
|
71
|
+
Copyright (c) Floris Steenkamp
|
|
72
|
+
git+https://github.com/FlorisSteenkamp/FloGrahamScan.git
|
|
73
|
+
|
|
74
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
75
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
76
|
+
in the Software without restriction, including without limitation the rights
|
|
77
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
78
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
79
|
+
furnished to do so, subject to the following conditions:
|
|
80
|
+
|
|
81
|
+
The above copyright notice and this permission notice shall be included in
|
|
82
|
+
all copies or substantial portions of the Software.
|
|
83
|
+
|
|
84
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
85
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
86
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
87
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
88
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
89
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
90
|
+
THE SOFTWARE.
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
flo-memoize 2.0.1 (MIT)
|
|
94
|
+
|
|
95
|
+
Copyright (c) Floris Steenkamp
|
|
96
|
+
git+https://github.com/FlorisSteenkamp/FloMemoize.git
|
|
97
|
+
|
|
98
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
99
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
100
|
+
in the Software without restriction, including without limitation the rights
|
|
101
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
102
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
103
|
+
furnished to do so, subject to the following conditions:
|
|
104
|
+
|
|
105
|
+
The above copyright notice and this permission notice shall be included in
|
|
106
|
+
all copies or substantial portions of the Software.
|
|
107
|
+
|
|
108
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
109
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
110
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
111
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
112
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
113
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
114
|
+
THE SOFTWARE.
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
flo-poly 8.1.4 (MIT)
|
|
118
|
+
|
|
119
|
+
Copyright (c) Floris Steenkamp
|
|
120
|
+
git+https://github.com/FlorisSteenkamp/FloPoly.git
|
|
121
|
+
|
|
122
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
123
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
124
|
+
in the Software without restriction, including without limitation the rights
|
|
125
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
126
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
127
|
+
furnished to do so, subject to the following conditions:
|
|
128
|
+
|
|
129
|
+
The above copyright notice and this permission notice shall be included in
|
|
130
|
+
all copies or substantial portions of the Software.
|
|
131
|
+
|
|
132
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
133
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
134
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
135
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
136
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
137
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
138
|
+
THE SOFTWARE.
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
flo-vector2d 4.0.6 (MIT)
|
|
142
|
+
|
|
143
|
+
Copyright (c) Floris Steenkamp
|
|
144
|
+
git+https://github.com/FlorisSteenkamp/FloVector2d.git
|
|
145
|
+
|
|
146
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
147
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
148
|
+
in the Software without restriction, including without limitation the rights
|
|
149
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
150
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
151
|
+
furnished to do so, subject to the following conditions:
|
|
152
|
+
|
|
153
|
+
The above copyright notice and this permission notice shall be included in
|
|
154
|
+
all copies or substantial portions of the Software.
|
|
155
|
+
|
|
156
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
157
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
158
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
159
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
160
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
161
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
162
|
+
THE SOFTWARE.
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
squares-rng 2.0.4 (MIT)
|
|
166
|
+
|
|
167
|
+
# License
|
|
168
|
+
The MIT License (MIT)
|
|
169
|
+
|
|
170
|
+
Copyright © 2020 Floris Steenkamp
|
|
171
|
+
|
|
172
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
173
|
+
|
|
174
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
175
|
+
|
|
176
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
177
|
+
|
|
178
|
+
node_modules/big-float-ts/node/double-representation/double-to-octets.js
|
|
179
|
+
Copyright 2013 Bartek Szopka (original author)
|
|
180
|
+
|
|
181
|
+
node_modules/big-float-ts/node/double-representation/parse-double.js
|
|
182
|
+
Copyright 2013 Bartek Szopka (original author)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
installOpenCascade
|
|
3
|
+
} from "./chunk-U5G2VU2I.js";
|
|
4
|
+
import {
|
|
5
|
+
__name,
|
|
6
|
+
installFontEngine,
|
|
7
|
+
installModelResourceReader,
|
|
8
|
+
installSketchSolver
|
|
9
|
+
} from "./chunk-RPY2WVCB.js";
|
|
10
|
+
|
|
11
|
+
// packages/core/src/node/index.ts
|
|
12
|
+
import initOpenCascade from "@code3d/opencascade";
|
|
13
|
+
import { init_planegcs_module as initializeSketchSolver } from "@salusoft89/planegcs";
|
|
14
|
+
import * as fontEngine from "harfbuzzjs";
|
|
15
|
+
import { readFileSync } from "node:fs";
|
|
16
|
+
import { fileURLToPath } from "node:url";
|
|
17
|
+
installModelResourceReader(
|
|
18
|
+
(url) => url.protocol === "file:" ? readFileSync(url) : void 0
|
|
19
|
+
);
|
|
20
|
+
installFontEngine(fontEngine);
|
|
21
|
+
var wasmPath = fileURLToPath(import.meta.resolve("@code3d/opencascade/wasm"));
|
|
22
|
+
var openCascade = await initOpenCascade({ locateFile: /* @__PURE__ */ __name(() => wasmPath, "locateFile") });
|
|
23
|
+
installOpenCascade(openCascade);
|
|
24
|
+
installSketchSolver(
|
|
25
|
+
await initializeSketchSolver({
|
|
26
|
+
locateFile: /* @__PURE__ */ __name(() => fileURLToPath(
|
|
27
|
+
import.meta.resolve("@salusoft89/planegcs/dist/planegcs_dist/planegcs.wasm")
|
|
28
|
+
), "locateFile")
|
|
29
|
+
})
|
|
30
|
+
);
|
|
31
|
+
//# sourceMappingURL=chunk-BF55AIEQ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/node/index.ts"],
|
|
4
|
+
"sourcesContent": ["import initOpenCascade from '@code3d/opencascade';\nimport {init_planegcs_module as initializeSketchSolver} from '@salusoft89/planegcs';\nimport * as fontEngine from 'harfbuzzjs';\nimport {readFileSync} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport {\n installFontEngine,\n installModelResourceReader,\n} from '../library/font.js';\nimport {installOpenCascade} from '../library/open-cascade.js';\nimport {installSketchSolver} from '../library/sketch-solver.js';\n\ninstallModelResourceReader(url =>\n url.protocol === 'file:' ? readFileSync(url) : undefined,\n);\ninstallFontEngine(fontEngine);\n\nconst wasmPath = fileURLToPath(import.meta.resolve('@code3d/opencascade/wasm'));\nconst openCascade = await initOpenCascade({locateFile: () => wasmPath});\ninstallOpenCascade(openCascade);\ninstallSketchSolver(\n await initializeSketchSolver({\n locateFile: () =>\n fileURLToPath(\n import.meta\n .resolve('@salusoft89/planegcs/dist/planegcs_dist/planegcs.wasm'),\n ),\n }),\n);\n\nexport * from '../library/index.js';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAAA,OAAO,qBAAqB;AAC5B,SAAQ,wBAAwB,8BAA6B;AAC7D,YAAY,gBAAgB;AAC5B,SAAQ,oBAAmB;AAC3B,SAAQ,qBAAoB;AAQ5B;AAAA,EAA2B,SACzB,IAAI,aAAa,UAAU,aAAa,GAAG,IAAI;AACjD;AACA,kBAAkB,UAAU;AAE5B,IAAM,WAAW,cAAc,YAAY,QAAQ,0BAA0B,CAAC;AAC9E,IAAM,cAAc,MAAM,gBAAgB,EAAC,YAAY,6BAAM,UAAN,cAAc,CAAC;AACtE,mBAAmB,WAAW;AAC9B;AAAA,EACE,MAAM,uBAAuB;AAAA,IAC3B,YAAY,6BACV;AAAA,MACE,YACG,QAAQ,uDAAuD;AAAA,IACpE,GAJU;AAAA,EAKd,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name,
|
|
3
|
+
castOwnedShape,
|
|
4
|
+
primitiveConstructor
|
|
5
|
+
} from "./chunk-RPY2WVCB.js";
|
|
6
|
+
|
|
7
|
+
// packages/core/src/library/replicad.ts
|
|
8
|
+
import * as replicadModule from "replicad";
|
|
9
|
+
var {
|
|
10
|
+
getOC: _getOC,
|
|
11
|
+
setOC: _setOC,
|
|
12
|
+
deserializeShape: _deserializeShape,
|
|
13
|
+
...authorReplicad
|
|
14
|
+
} = replicadModule;
|
|
15
|
+
var replicad = Object.freeze({
|
|
16
|
+
...authorReplicad,
|
|
17
|
+
deserializeShape(data) {
|
|
18
|
+
return castOwnedShape(replicadModule.getOC().BRepToolsWrapper.Read(data));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
function definePrimitive(build) {
|
|
22
|
+
return primitiveConstructor(build);
|
|
23
|
+
}
|
|
24
|
+
__name(definePrimitive, "definePrimitive");
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
replicad,
|
|
28
|
+
definePrimitive
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk-P5VGKAEM.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/library/replicad.ts"],
|
|
4
|
+
"sourcesContent": ["import * as replicadModule from 'replicad';\nimport {primitiveConstructor} from './runtime.js';\nimport {castOwnedShape} from './kernel-shapes.js';\nimport type {SolidModel} from './index.js';\nimport type {Shape3D} from 'replicad';\n\nexport type * from 'replicad';\n\nexport type Replicad = Omit<typeof replicadModule, 'getOC' | 'setOC'>;\n\nconst {\n getOC: _getOC,\n setOC: _setOC,\n deserializeShape: _deserializeShape,\n ...authorReplicad\n} = replicadModule;\n\n/**\n * The Replicad API bound to the OpenCascade runtime owned by code3d. Kernel\n * installation remains a tooling responsibility and is intentionally omitted.\n */\nexport const replicad: Replicad = Object.freeze({\n ...authorReplicad,\n deserializeShape(data: string) {\n // The native reader owns a raw shape; casting acquires another handle.\n return castOwnedShape(replicadModule.getOC().BRepToolsWrapper.Read(data));\n },\n});\n\n/**\n * Defines a synchronous model constructor with the builder's parameters.\n * Reuses deterministic geometry by arguments; pass changing captured state as\n * explicit parameters. Each invocation creates a fresh model. The builder\n * transfers its returned solid to code3d and owns its intermediate shapes.\n */\nexport function definePrimitive<\n Builder extends (...arguments_: never[]) => Shape3D,\n>(build: Builder): (...arguments_: Parameters<Builder>) => SolidModel {\n return primitiveConstructor(build);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAAA,YAAY,oBAAoB;AAUhC,IAAM;AAAA,EACJ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,kBAAkB;AAAA,EAClB,GAAG;AACL,IAAI;AAMG,IAAM,WAAqB,OAAO,OAAO;AAAA,EAC9C,GAAG;AAAA,EACH,iBAAiB,MAAc;AAE7B,WAAO,eAA8B,qBAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAAA,EAC1E;AACF,CAAC;AAQM,SAAS,gBAEd,OAAoE;AACpE,SAAO,qBAAqB,KAAK;AACnC;AAJgB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|