circuit-json-to-step 0.0.27 → 0.0.28

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.js CHANGED
@@ -762,7 +762,7 @@ function normalizeStepNumericExponents(stepText) {
762
762
  var package_default = {
763
763
  name: "circuit-json-to-step",
764
764
  main: "dist/index.js",
765
- version: "0.0.23",
765
+ version: "0.0.27",
766
766
  type: "module",
767
767
  scripts: {
768
768
  "pull-reference": `git clone https://github.com/tscircuit/circuit-json.git && find circuit-json/tests -name '*.test.ts' -exec bash -c 'mv "$0" "\${0%.test.ts}.ts"' {} \\; && git clone https://github.com/tscircuit/stepts.git && find stepts/tests -name '*.test.ts' -exec bash -c 'mv "$0" "\${0%.test.ts}.ts"' {} \\;`,
@@ -780,7 +780,7 @@ var package_default = {
780
780
  "@resvg/resvg-wasm": "^2.6.2",
781
781
  "@tscircuit/circuit-json-util": "^0.0.75",
782
782
  "@types/bun": "latest",
783
- "circuit-json": "^0.0.406",
783
+ "circuit-json": "^0.0.425",
784
784
  "looks-same": "^10.0.1",
785
785
  "occt-import-js": "^0.0.23",
786
786
  poppygl: "^0.0.17",
@@ -792,8 +792,8 @@ var package_default = {
792
792
  },
793
793
  dependencies: {
794
794
  "circuit-json-to-connectivity-map": "^0.0.22",
795
- "circuit-json-to-gltf": "^0.0.93",
796
- "circuit-to-svg": "^0.0.327",
795
+ "circuit-json-to-gltf": "^0.0.100",
796
+ "circuit-to-svg": "^0.0.345",
797
797
  "schematic-symbols": "^0.0.202",
798
798
  stepts: "^0.0.4"
799
799
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "circuit-json-to-step",
3
3
  "main": "dist/index.js",
4
- "version": "0.0.27",
4
+ "version": "0.0.28",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "pull-reference": "git clone https://github.com/tscircuit/circuit-json.git && find circuit-json/tests -name '*.test.ts' -exec bash -c 'mv \"$0\" \"${0%.test.ts}.ts\"' {} \\; && git clone https://github.com/tscircuit/stepts.git && find stepts/tests -name '*.test.ts' -exec bash -c 'mv \"$0\" \"${0%.test.ts}.ts\"' {} \\;",
@@ -19,7 +19,7 @@
19
19
  "@resvg/resvg-wasm": "^2.6.2",
20
20
  "@tscircuit/circuit-json-util": "^0.0.75",
21
21
  "@types/bun": "latest",
22
- "circuit-json": "^0.0.406",
22
+ "circuit-json": "^0.0.425",
23
23
  "looks-same": "^10.0.1",
24
24
  "occt-import-js": "^0.0.23",
25
25
  "poppygl": "^0.0.17",
@@ -31,8 +31,8 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "circuit-json-to-connectivity-map": "^0.0.22",
34
- "circuit-json-to-gltf": "^0.0.93",
35
- "circuit-to-svg": "^0.0.327",
34
+ "circuit-json-to-gltf": "^0.0.100",
35
+ "circuit-to-svg": "^0.0.345",
36
36
  "schematic-symbols": "^0.0.202",
37
37
  "stepts": "^0.0.4"
38
38
  }
@@ -32,6 +32,17 @@
32
32
  "layer": "top",
33
33
  "rotation": 0
34
34
  },
35
+ {
36
+ "type": "cad_component",
37
+ "cad_component_id": "cad_component_1",
38
+ "pcb_component_id": "pcb_component_1",
39
+ "source_component_id": "source_component_1",
40
+ "position": { "x": 15, "y": 10, "z": 0.8 },
41
+ "rotation": { "x": 0, "y": 0, "z": 0 },
42
+ "model_origin_alignment": "center_of_component_on_board_surface",
43
+ "anchor_alignment": "center_of_component_on_board_surface",
44
+ "show_as_bounding_box": true
45
+ },
35
46
  {
36
47
  "type": "source_component",
37
48
  "source_component_id": "source_component_2",
@@ -48,5 +59,16 @@
48
59
  "height": 1.25,
49
60
  "layer": "top",
50
61
  "rotation": 90
62
+ },
63
+ {
64
+ "type": "cad_component",
65
+ "cad_component_id": "cad_component_2",
66
+ "pcb_component_id": "pcb_component_2",
67
+ "source_component_id": "source_component_2",
68
+ "position": { "x": 20, "y": 10, "z": 0.8 },
69
+ "rotation": { "x": 0, "y": 0, "z": 90 },
70
+ "model_origin_alignment": "center_of_component_on_board_surface",
71
+ "anchor_alignment": "center_of_component_on_board_surface",
72
+ "show_as_bounding_box": true
51
73
  }
52
74
  ]
@@ -2479,6 +2479,7 @@
2479
2479
  },
2480
2480
  "pcb_component_id": "pcb_component_0",
2481
2481
  "source_component_id": "source_component_0",
2482
+ "show_as_bounding_box": true,
2482
2483
  "model_obj_url": "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=2a4bc2358b36497d9ab2a66ab6419ba3&pn=C165948&cachebust_origin="
2483
2484
  },
2484
2485
  {
@@ -4,6 +4,9 @@ import { importStepWithOcct } from "../../utils/occt/importer"
4
4
  import circuitJson from "./repro01.json"
5
5
 
6
6
  test("basics04: convert circuit json with components to STEP", async () => {
7
+ // This fixture intentionally marks the OBJ cad_component as a fallback box in its circuit-json so
8
+ // the test stays local and deterministic. Core should not emit
9
+ // show_as_bounding_box together with a real model URL.
7
10
  const stepText = await circuitJsonToStep(circuitJson as any, {
8
11
  includeComponents: true,
9
12
  productName: "TestPCB_with_components",
@@ -16,8 +16,8 @@ test("repro03: reproduces fallback boxes for hole wrapper components", async ()
16
16
 
17
17
  // Current repro behavior: these are fallback boxes for wrapper components,
18
18
  // not intended physical component models.
19
- expect(stepText).toContain("Xpattern1")
20
- expect(stepText).toContain("Xpattern4")
19
+ expect(stepText).not.toContain("Xpattern1")
20
+ expect(stepText).not.toContain("Xpattern4")
21
21
 
22
22
  const outputPath = "debug-output/repro03.step"
23
23
  await Bun.write(outputPath, stepText)