altium-to-circuit-json 0.0.95 → 0.0.97
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 +7 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1919,10 +1919,8 @@ function convertSchematicRecord({
|
|
|
1919
1919
|
const kind = record.recordKind;
|
|
1920
1920
|
const scale5 = context.scale;
|
|
1921
1921
|
const color = altiumColorToCss(record.getCaseInsensitive("COLOR"), "#1f2937");
|
|
1922
|
-
const
|
|
1923
|
-
|
|
1924
|
-
0.05
|
|
1925
|
-
);
|
|
1922
|
+
const widthEnum = record.getNumber("LINEWIDTH") ?? 0;
|
|
1923
|
+
const strokeWidth = scaleLength([1, 1, 3, 5][widthEnum] ?? 1, scale5);
|
|
1926
1924
|
if (record instanceof AltiumSchImageRecord) {
|
|
1927
1925
|
return renderSchematicImageRecord({ context, index, record });
|
|
1928
1926
|
}
|
|
@@ -2027,6 +2025,9 @@ function associateNoErcMarkerWithPortAtAnchor({
|
|
|
2027
2025
|
}
|
|
2028
2026
|
|
|
2029
2027
|
// lib/schematic/document/shouldRenderSchematicRecord.ts
|
|
2028
|
+
import {
|
|
2029
|
+
AltiumSchImplementationParameterRecord
|
|
2030
|
+
} from "altiumts";
|
|
2030
2031
|
function shouldRenderSchematicRecord(record, context) {
|
|
2031
2032
|
let ownerPartId = record.getNumber("OWNERPARTID");
|
|
2032
2033
|
let ownerPartDisplayMode = record.getNumber("OWNERPARTDISPLAYMODE");
|
|
@@ -2036,6 +2037,7 @@ function shouldRenderSchematicRecord(record, context) {
|
|
|
2036
2037
|
visited.add(current);
|
|
2037
2038
|
const parent = context.document.getParent(current);
|
|
2038
2039
|
if (!parent) return true;
|
|
2040
|
+
if (parent instanceof AltiumSchImplementationParameterRecord) return false;
|
|
2039
2041
|
if (ownerPartId === void 0 || ownerPartId <= 0) {
|
|
2040
2042
|
ownerPartId = current.getNumber("OWNERPARTID");
|
|
2041
2043
|
}
|
|
@@ -3435,10 +3437,7 @@ function convertOwnedComponentRecords({
|
|
|
3435
3437
|
return elements.map((element) => {
|
|
3436
3438
|
const preparedElement = record instanceof AltiumSchPinRecord && element.type === "schematic_line" ? {
|
|
3437
3439
|
...element,
|
|
3438
|
-
stroke_width:
|
|
3439
|
-
scaleLength(1, renderingContext.scale),
|
|
3440
|
-
0.05
|
|
3441
|
-
)
|
|
3440
|
+
stroke_width: scaleLength(1, renderingContext.scale)
|
|
3442
3441
|
} : element;
|
|
3443
3442
|
return {
|
|
3444
3443
|
...preparedElement,
|