circuit-json-to-gltf 0.0.133 → 0.0.134
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/dist/index.d.ts +6 -34
- package/dist/index.js +503 -214
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CircuitJson, PcbBoard } from 'circuit-json';
|
|
1
|
+
import { PcbStiffener, CircuitJson, PcbBoard } from 'circuit-json';
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/** Circuit JSON bend geometry, board-local +Z up, millimeters. */
|
|
4
4
|
interface PcbBendRecord {
|
|
5
5
|
type: "pcb_bend";
|
|
6
6
|
pcb_bend_id: string;
|
|
@@ -20,36 +20,8 @@ interface PcbBendRecord {
|
|
|
20
20
|
bend_radius: number;
|
|
21
21
|
bend_side: "left" | "right";
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*/
|
|
26
|
-
type PcbStiffenerRecord = {
|
|
27
|
-
type: "pcb_stiffener";
|
|
28
|
-
pcb_stiffener_id: string;
|
|
29
|
-
pcb_board_id: string;
|
|
30
|
-
name?: string;
|
|
31
|
-
pcb_group_id?: string;
|
|
32
|
-
subcircuit_id?: string;
|
|
33
|
-
layer: "top" | "bottom";
|
|
34
|
-
material: "fr4" | "polyimide" | "stainless_steel" | "aluminum";
|
|
35
|
-
thickness: number;
|
|
36
|
-
adhesive_thickness?: number;
|
|
37
|
-
} & ({
|
|
38
|
-
shape: "rect";
|
|
39
|
-
center: {
|
|
40
|
-
x: number;
|
|
41
|
-
y: number;
|
|
42
|
-
};
|
|
43
|
-
width: number;
|
|
44
|
-
height: number;
|
|
45
|
-
rotation?: number;
|
|
46
|
-
} | {
|
|
47
|
-
shape: "polygon";
|
|
48
|
-
outline: {
|
|
49
|
-
x: number;
|
|
50
|
-
y: number;
|
|
51
|
-
}[];
|
|
52
|
-
});
|
|
23
|
+
|
|
24
|
+
type PcbStiffenerRecord = PcbStiffener;
|
|
53
25
|
|
|
54
26
|
/** Accept unreleased flex records alongside existing Circuit JSON elements. */
|
|
55
27
|
type CircuitJsonWithPcbFlex = (CircuitJson[number] | PcbBendRecord | PcbStiffenerRecord | (Omit<PcbBoard, "material"> & {
|
|
@@ -59,7 +31,7 @@ interface AuthHeaders extends Record<string, string> {
|
|
|
59
31
|
Authorization: string;
|
|
60
32
|
}
|
|
61
33
|
interface ConversionOptions {
|
|
62
|
-
/**
|
|
34
|
+
/** Override the render fold state. Undefined follows CAD is_on_folded_board in Circuit JSON. */
|
|
63
35
|
foldPcbs?: boolean;
|
|
64
36
|
format?: "gltf" | "glb";
|
|
65
37
|
boardTextureResolution?: number;
|
|
@@ -201,7 +173,7 @@ interface GLTFExportOptions {
|
|
|
201
173
|
includeCustomExtensions?: boolean;
|
|
202
174
|
}
|
|
203
175
|
interface CircuitTo3DOptions {
|
|
204
|
-
/**
|
|
176
|
+
/** Override folding for parallel, non-overlapping bends. Undefined follows CAD is_on_folded_board. */
|
|
205
177
|
foldPcbs?: boolean;
|
|
206
178
|
pcbColor?: Color;
|
|
207
179
|
boardSideColor?: Color;
|