@tscircuit/copper-pour-solver 0.0.33 → 0.0.34

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.
@@ -8,7 +8,6 @@ import type {
8
8
  PcbCopperPourBRep,
9
9
  SourceNet,
10
10
  } from "circuit-json"
11
- import { getFullConnectivityMapFromCircuitJson } from "circuit-json-to-connectivity-map"
12
11
  import { convertCircuitJsonToPcbSvg } from "circuit-to-svg"
13
12
  import type { Point } from "@tscircuit/math-utils"
14
13
 
@@ -30,7 +29,6 @@ export const runSolverAndRenderToSvg = (
30
29
  ? pour_options
31
30
  : [pour_options]
32
31
 
33
- const connectivityMap = getFullConnectivityMapFromCircuitJson(circuitJson)
34
32
  const allCopperPours: PcbCopperPourBRep[] = []
35
33
 
36
34
  for (const options of pourOptionsArray) {
@@ -43,21 +41,15 @@ export const runSolverAndRenderToSvg = (
43
41
  throw new Error(`Net with name "${options.net_name}" not found`)
44
42
  }
45
43
 
46
- let pour_connectivity_key = connectivityMap.getNetConnectedToId(
47
- source_net.source_net_id,
48
- )
49
-
50
- if (!pour_connectivity_key && source_net.subcircuit_connectivity_map_key) {
51
- pour_connectivity_key = source_net.subcircuit_connectivity_map_key
52
- }
53
-
54
- if (!pour_connectivity_key) {
55
- throw new Error(`Net "${options.net_name}" has no connectivity mapping`)
44
+ if (!source_net.subcircuit_connectivity_map_key) {
45
+ throw new Error(
46
+ `Net "${options.net_name}" has no subcircuit_connectivity_map_key`,
47
+ )
56
48
  }
57
49
 
58
50
  const inputProblem = convertCircuitJsonToInputProblem(circuitJson, {
59
51
  ...options,
60
- pour_connectivity_key,
52
+ source_net_id: source_net.source_net_id,
61
53
  })
62
54
 
63
55
  const solver = new CopperPourPipelineSolver(inputProblem)
package/vercel.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "buildCommand": "npm run build:site",
3
+ "outputDirectory": "cosmos-export",
4
+ "framework": null
5
+ }