designix 0.5.30 → 0.5.31

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1448,6 +1448,7 @@ import {
1448
1448
  prefixLog as prefixLog2,
1449
1449
  contour as contour6,
1450
1450
  contourCircle as contourCircle4,
1451
+ ctrOblong,
1451
1452
  figure as figure4,
1452
1453
  radToDeg as radToDeg3,
1453
1454
  ffix as ffix6,
@@ -2091,8 +2092,13 @@ function pGeom4(t, param, suffix = "") {
2091
2092
  }
2092
2093
  const ctrDoorFace = function(pL2) {
2093
2094
  const R4b = R4 - pL2;
2094
- const H3b = param.H3 + R4;
2095
- const rCtrDoorFace = contour6(R4b, H3b + doorStraightLenght).addPointR(-R4b, R4b).addSegArc(R4b, false, true).addPointR(-R4b, -R4b).addSegArc(R4b, false, true).addSegStrokeR(0, -doorStraightLenght).addPointR(R4b, -R4b).addSegArc(R4b, false, true).addPointR(R4b, R4b).addSegArc(R4b, false, true).closeSegStroke();
2095
+ const rCtrDoorFace = ctrOblong(
2096
+ 0,
2097
+ param.H3 + R4 - R4b,
2098
+ 2 * R4b,
2099
+ doorStraightLenght + 2 * R4b,
2100
+ Math.PI / 2
2101
+ );
2096
2102
  return rCtrDoorFace;
2097
2103
  };
2098
2104
  figFace.addMain(ctrDoorFace(0));
@@ -2351,6 +2357,7 @@ import {
2351
2357
  contourCircle as contourCircle5,
2352
2358
  ctrRectangle,
2353
2359
  ctrRectRot,
2360
+ ctrTrapezoid,
2354
2361
  figure as figure5,
2355
2362
  degToRad as degToRad4,
2356
2363
  radToDeg as radToDeg4,
@@ -2536,7 +2543,14 @@ function pGeom5(t, param, suffix = "") {
2536
2543
  const coneHollowHeight2 = beamH - R4 - (param.H1 - coneFC);
2537
2544
  const coneHollowR2 = R1 - param.E1 - Math.tan(coneAngle) * coneHollowHeight2;
2538
2545
  const ctrConeHollow = contour7(0, beamH - R4).addSegStrokeA(coneHollowR2, beamH - R4).addSegStrokeA(R1 - param.E1, param.H1 - coneFC).addSegStrokeA(R1 - param.E1, param.H1 - param.H3).addSegStrokeA(0, param.H1 - param.H3).closeSegStroke();
2539
- const ctrDoor = contour7(doorLowX, param.H1 + param.H6).addCornerRounded(param.R9).addSegStrokeA(doorHighX, param.H1 + param.H6 + param.H7).addCornerRounded(param.R9).addSegStrokeA(-doorHighX, param.H1 + param.H6 + param.H7).addCornerRounded(param.R9).addSegStrokeA(-doorLowX, param.H1 + param.H6).addCornerRounded(param.R9).closeSegStroke();
2546
+ const ctrDoor = ctrTrapezoid(
2547
+ -doorLowX,
2548
+ param.H1 + param.H6,
2549
+ param.L9,
2550
+ 2 * doorHighX,
2551
+ param.H7,
2552
+ param.R9
2553
+ );
2540
2554
  figCone.addMain(ctrCone(1));
2541
2555
  figCone.addSecond(ctrConePlus(1));
2542
2556
  figCone.addSecond(ctrConePlus(-1));
@@ -3538,7 +3552,7 @@ import {
3538
3552
  prefixLog as prefixLog4,
3539
3553
  contourCircle as contourCircle8,
3540
3554
  ctrRectangle as ctrRectangle3,
3541
- ctrRectRot as ctrRectRot2,
3555
+ ctrRectRot2,
3542
3556
  figure as figure9,
3543
3557
  radToDeg as radToDeg7,
3544
3558
  ffix as ffix11,
@@ -3828,14 +3842,8 @@ function pGeom9(t, param, suffix = "") {
3828
3842
  const stp3A = Math.atan2(stopper3Ly, S2s);
3829
3843
  rGeome.logstr += `stopper-rod: L ${ffix11(stp3L)} mm, A ${ffix11(radToDeg7(stp3A))} degree
3830
3844
  `;
3831
- const stp3posdX = S1r * Math.sin(stp3A);
3832
- const stp3posdY = S1r * Math.cos(stp3A);
3833
- const stp3posY = stopper3H - stp3posdY;
3834
- figStopperSide.addSecond(ctrRectRot2(stp3posdX, stp3posY, stp3L, param.S1, stp3A));
3835
- const stp3posdX2 = S1hr * Math.sin(stp3A);
3836
- const stp3posdY2 = S1hr * Math.cos(stp3A);
3837
- const stp3posY2 = stopper3H - stp3posdY2;
3838
- figStopperSide.addSecond(ctrRectRot2(stp3posdX2, stp3posY2, stp3L, S1h, stp3A));
3845
+ figStopperSide.addSecond(ctrRectRot2(0, stopper3H, stp3L, param.S1, stp3A));
3846
+ figStopperSide.addSecond(ctrRectRot2(0, stopper3H, stp3L, S1h, stp3A));
3839
3847
  figStopperSide.addSecond(ctrRectangle3(-lowSHL, lowSHPosZ - JR1, lowSHL, 2 * JR1));
3840
3848
  figStopperSide.addSecond(ctrRectangle3(-lowSHL, lowSHPosZ - JR1H, lowSHL, 2 * JR1H));
3841
3849
  figStopperSide.addSecond(contourCircle8(0, stopper3H, param.JD3 / 2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "designix",
3
- "version": "0.5.30",
3
+ "version": "0.5.31",
4
4
  "description": "The first designs made with parametrix",
5
5
  "type": "module",
6
6
  "private": false,