Commit c03fd1f
authored
refactor: consolidate redundant layer transition features in getIntraNodeCrossings (#438)
- Simplified getIntraNodeCrossings: Removed the redundant numTransitions return value and the manual numEntryExitLayerChanges counter. Both are now consolidated into a single numEntryExitLayerChanges field derived directly from transitionPairPoints.length.
- Updated MultiHeadPolyLineIntraNodeSolver: Aligned the solver with these changes by renaming its internal usage of numTransitions to numEntryExitLayerChanges.
- Improved Maintainability: The logic now has a single source of truth for layer-change counts, reducing the risk of divergent values.1 parent da6816e commit c03fd1f
File tree
2 files changed
+4
-9
lines changed- lib
- solvers/HighDensitySolver/MultiHeadPolyLineIntraNodeSolver
- utils
2 files changed
+4
-9
lines changedlib/solvers/HighDensitySolver/MultiHeadPolyLineIntraNodeSolver/MultiHeadPolyLineIntraNodeSolver.ts
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 110 | + | |
| 111 | + | |
113 | 112 | | |
114 | | - | |
| 113 | + | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
| |||
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | | - | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
| |||
86 | 83 | | |
87 | 84 | | |
88 | 85 | | |
89 | | - | |
| 86 | + | |
90 | 87 | | |
91 | | - | |
92 | 88 | | |
93 | 89 | | |
0 commit comments