designix 1.0.8 → 1.0.10
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 +3 -1
- package/dist/index.js +90 -13
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -70,6 +70,8 @@ declare const verifyContour3Def: tPageDef;
|
|
|
70
70
|
|
|
71
71
|
declare const verifyContour4Def: tPageDef;
|
|
72
72
|
|
|
73
|
+
declare const verifyContour5Def: tPageDef;
|
|
74
|
+
|
|
73
75
|
declare const verifyExports1Def: tPageDef;
|
|
74
76
|
|
|
75
|
-
export { baseDef, circlesDef, dummyPoleStaticDef, gearBarDef, gearEpicycloidDef, gearRingDef, gearWheelDef, haxisGuidanceDef, heliostatDef, heliostat_2Def, poleStaticDef, rakeDef, rakeStopperDef, rectangleDef, ringDef, ringGuidanceDef, rodDef, spiderDef, surfaceDef, swingDef, trapezeDef, vaxisDef, vaxisGuidanceDef, vaxisHolderDef, verifyContour1Def, verifyContour2Def, verifyContour3Def, verifyContour4Def, verifyExports1Def, verifyLine1Def, verifyLine2Def, verifyLine3Def, verifyPoint1Def, verifyPoint2Def, verifyVector1Def, voilaDef };
|
|
77
|
+
export { baseDef, circlesDef, dummyPoleStaticDef, gearBarDef, gearEpicycloidDef, gearRingDef, gearWheelDef, haxisGuidanceDef, heliostatDef, heliostat_2Def, poleStaticDef, rakeDef, rakeStopperDef, rectangleDef, ringDef, ringGuidanceDef, rodDef, spiderDef, surfaceDef, swingDef, trapezeDef, vaxisDef, vaxisGuidanceDef, vaxisHolderDef, verifyContour1Def, verifyContour2Def, verifyContour3Def, verifyContour4Def, verifyContour5Def, verifyExports1Def, verifyLine1Def, verifyLine2Def, verifyLine3Def, verifyPoint1Def, verifyPoint2Def, verifyVector1Def, voilaDef };
|
package/dist/index.js
CHANGED
|
@@ -7485,25 +7485,101 @@ var verifyContour4Def = {
|
|
|
7485
7485
|
pGeom: pGeom35
|
|
7486
7486
|
};
|
|
7487
7487
|
|
|
7488
|
+
// src/geometrix_verification/verify_contour_5.ts
|
|
7489
|
+
import { contour as contour27, figure as figure36, pNumber as pNumber36, initGeom as initGeom36 } from "geometrix";
|
|
7490
|
+
var pDef36 = {
|
|
7491
|
+
partName: "verify_contour_5",
|
|
7492
|
+
params: [
|
|
7493
|
+
//pNumber(name, unit, init, min, max, step)
|
|
7494
|
+
pNumber36("L1", "mm", 100, 10, 200, 1),
|
|
7495
|
+
pNumber36("L2", "mm", 100, 10, 200, 1),
|
|
7496
|
+
pNumber36("R1", "mm", 10, 0, 100, 1),
|
|
7497
|
+
pNumber36("R2", "mm", 10, 0, 100, 1)
|
|
7498
|
+
],
|
|
7499
|
+
paramSvg: {
|
|
7500
|
+
L1: "verify_contour_1_r1.svg",
|
|
7501
|
+
L2: "verify_contour_1_r1.svg",
|
|
7502
|
+
R1: "verify_contour_1_r1.svg",
|
|
7503
|
+
R2: "verify_contour_1_r1.svg"
|
|
7504
|
+
},
|
|
7505
|
+
sim: {
|
|
7506
|
+
tMax: 10,
|
|
7507
|
+
tStep: 0.5,
|
|
7508
|
+
tUpdate: 500
|
|
7509
|
+
// every 0.5 second
|
|
7510
|
+
}
|
|
7511
|
+
};
|
|
7512
|
+
function pGeom36(t, param, suffix = "") {
|
|
7513
|
+
const rGeome = initGeom36(pDef36.partName + suffix);
|
|
7514
|
+
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
7515
|
+
`;
|
|
7516
|
+
try {
|
|
7517
|
+
const figOne = figure36();
|
|
7518
|
+
const ctr1a = contour27(0, 0).addSegStrokeR(param.L1, 0).addCornerRounded(param.R1).addSegStrokeR(0, param.L2).addCornerRounded(param.R2).closeSegStroke();
|
|
7519
|
+
rGeome.logstr += ctr1a.check();
|
|
7520
|
+
figOne.addMainO(ctr1a);
|
|
7521
|
+
const ctr1b = ctr1a.generateRevertOrientation().translate(300, 0);
|
|
7522
|
+
rGeome.logstr += ctr1b.check();
|
|
7523
|
+
figOne.addMainO(ctr1b);
|
|
7524
|
+
const ctr2a = contour27(0, 300).addSegStrokeR(param.L1, 0).addCornerRounded(param.R1).addSegStrokeR(0, param.L2).closeSegStroke().addCornerRounded(param.R2);
|
|
7525
|
+
rGeome.logstr += ctr2a.check();
|
|
7526
|
+
figOne.addMainO(ctr2a);
|
|
7527
|
+
const ctr2b = ctr2a.generateRevertOrientation().translate(300, 0);
|
|
7528
|
+
rGeome.logstr += ctr2b.check();
|
|
7529
|
+
figOne.addMainO(ctr2b);
|
|
7530
|
+
const ctr3a = contour27(0, 600).addCornerRounded(param.R2).addSegStrokeR(param.L1, 0).addCornerRounded(param.R1).addSegStrokeR(0, param.L2).closeSegStroke();
|
|
7531
|
+
rGeome.logstr += ctr3a.check();
|
|
7532
|
+
figOne.addMainO(ctr3a);
|
|
7533
|
+
const ctr3b = ctr3a.generateRevertOrientation().translate(300, 0);
|
|
7534
|
+
rGeome.logstr += ctr3b.check();
|
|
7535
|
+
figOne.addMainO(ctr3b);
|
|
7536
|
+
const ctr4a = contour27(0, 900).addSegStrokeR(param.L1, 0).addCornerRounded(param.R1).addPointR(0, param.L2).addSegArc(param.L2, false, false).addCornerRounded(param.R2).closeSegStroke();
|
|
7537
|
+
rGeome.logstr += ctr4a.check();
|
|
7538
|
+
figOne.addMainO(ctr4a);
|
|
7539
|
+
const ctr4b = ctr4a.generateRevertOrientation().translate(300, 0);
|
|
7540
|
+
rGeome.logstr += ctr4b.check();
|
|
7541
|
+
figOne.addMainO(ctr4b);
|
|
7542
|
+
const ctr5a = contour27(0, 1200).addSegStrokeR(param.L1, 0).addCornerRounded(param.R1).addPointR(0, param.L2).addSegArc(param.L2, false, false).closeSegArc(param.L1 + param.L2, false, true).addCornerRounded(param.R2);
|
|
7543
|
+
rGeome.logstr += ctr5a.check();
|
|
7544
|
+
figOne.addMainO(ctr5a);
|
|
7545
|
+
const ctr5b = ctr5a.generateRevertOrientation().translate(300, 0);
|
|
7546
|
+
rGeome.logstr += ctr5b.check();
|
|
7547
|
+
figOne.addMainO(ctr5b);
|
|
7548
|
+
rGeome.fig = { one: figOne };
|
|
7549
|
+
rGeome.logstr += "verify_contour_5 drawn successfully!\n";
|
|
7550
|
+
rGeome.calcErr = false;
|
|
7551
|
+
} catch (emsg) {
|
|
7552
|
+
rGeome.logstr += emsg;
|
|
7553
|
+
console.log(emsg);
|
|
7554
|
+
}
|
|
7555
|
+
return rGeome;
|
|
7556
|
+
}
|
|
7557
|
+
var verifyContour5Def = {
|
|
7558
|
+
pTitle: "Verify contour 5",
|
|
7559
|
+
pDescription: "Debugging contour.ts for revert-contour",
|
|
7560
|
+
pDef: pDef36,
|
|
7561
|
+
pGeom: pGeom36
|
|
7562
|
+
};
|
|
7563
|
+
|
|
7488
7564
|
// src/geometrix_verification/verify_exports_1.ts
|
|
7489
7565
|
import {
|
|
7490
|
-
contour as
|
|
7566
|
+
contour as contour28,
|
|
7491
7567
|
contourCircle as contourCircle23,
|
|
7492
|
-
figure as
|
|
7493
|
-
pNumber as
|
|
7568
|
+
figure as figure37,
|
|
7569
|
+
pNumber as pNumber37,
|
|
7494
7570
|
pCheckbox as pCheckbox5,
|
|
7495
|
-
initGeom as
|
|
7571
|
+
initGeom as initGeom37,
|
|
7496
7572
|
EExtrude as EExtrude21,
|
|
7497
7573
|
EBVolume as EBVolume23
|
|
7498
7574
|
} from "geometrix";
|
|
7499
|
-
var
|
|
7575
|
+
var pDef37 = {
|
|
7500
7576
|
partName: "verify_exports_1",
|
|
7501
7577
|
params: [
|
|
7502
7578
|
//pNumber(name, unit, init, min, max, step)
|
|
7503
7579
|
pCheckbox5("circle", true),
|
|
7504
|
-
|
|
7580
|
+
pNumber37("circle-size", "mm", 100, 1, 1e3, 1),
|
|
7505
7581
|
pCheckbox5("contour", true),
|
|
7506
|
-
|
|
7582
|
+
pNumber37("contour-size", "mm", 30, 1, 1e3, 1),
|
|
7507
7583
|
pCheckbox5("contour-arc-large", false)
|
|
7508
7584
|
],
|
|
7509
7585
|
paramSvg: {
|
|
@@ -7519,12 +7595,12 @@ var pDef36 = {
|
|
|
7519
7595
|
tUpdate: 500
|
|
7520
7596
|
}
|
|
7521
7597
|
};
|
|
7522
|
-
function
|
|
7523
|
-
const rGeome =
|
|
7598
|
+
function pGeom37(t, param, suffix = "") {
|
|
7599
|
+
const rGeome = initGeom37(pDef37.partName + suffix);
|
|
7524
7600
|
rGeome.logstr += `${rGeome.partName} simTime: ${t}
|
|
7525
7601
|
`;
|
|
7526
7602
|
try {
|
|
7527
|
-
const figOne =
|
|
7603
|
+
const figOne = figure37();
|
|
7528
7604
|
if (param.circle === 1) {
|
|
7529
7605
|
const theCircle = contourCircle23(0, 0, param["circle-size"]);
|
|
7530
7606
|
figOne.addMainO(theCircle);
|
|
@@ -7532,7 +7608,7 @@ function pGeom36(t, param, suffix = "") {
|
|
|
7532
7608
|
if (param.contour === 1) {
|
|
7533
7609
|
const csize = param["contour-size"];
|
|
7534
7610
|
const carcl = param["contour-arc-large"] === 1 ? true : false;
|
|
7535
|
-
const ctr1 =
|
|
7611
|
+
const ctr1 = contour28(0, 0).addSegStrokeA(csize, 0).addPointA(csize, csize).addSegArc(csize * 0.8, carcl, true).closeSegStroke();
|
|
7536
7612
|
figOne.addMainO(ctr1);
|
|
7537
7613
|
}
|
|
7538
7614
|
rGeome.fig = { one: figOne };
|
|
@@ -7567,8 +7643,8 @@ function pGeom36(t, param, suffix = "") {
|
|
|
7567
7643
|
var verifyExports1Def = {
|
|
7568
7644
|
pTitle: "Verify exports 1",
|
|
7569
7645
|
pDescription: "For dev & debug of Openscad export",
|
|
7570
|
-
pDef:
|
|
7571
|
-
pGeom:
|
|
7646
|
+
pDef: pDef37,
|
|
7647
|
+
pGeom: pGeom37
|
|
7572
7648
|
};
|
|
7573
7649
|
export {
|
|
7574
7650
|
baseDef,
|
|
@@ -7599,6 +7675,7 @@ export {
|
|
|
7599
7675
|
verifyContour2Def,
|
|
7600
7676
|
verifyContour3Def,
|
|
7601
7677
|
verifyContour4Def,
|
|
7678
|
+
verifyContour5Def,
|
|
7602
7679
|
verifyExports1Def,
|
|
7603
7680
|
verifyLine1Def,
|
|
7604
7681
|
verifyLine2Def,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "designix",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "The first designs made with parametrix",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
"clean": "rimraf dist dist2 node_modules"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"geometrix": "^1.0.
|
|
75
|
+
"geometrix": "^1.0.9"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@eslint/js": "^9.10.0",
|
|
79
79
|
"@types/eslint__js": "^8.42.3",
|
|
80
80
|
"esbuild": "^0.25.0",
|
|
81
|
-
"eslint": "^9.
|
|
81
|
+
"eslint": "^9.21.0",
|
|
82
82
|
"eslint-config-prettier": "^10.0.1",
|
|
83
83
|
"npm-run-all2": "^7.0.2",
|
|
84
84
|
"prettier": "^3.5.1",
|