geometrix 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 CHANGED
@@ -658,8 +658,8 @@ declare function createParamFile(lastModif: string, iPartName: string, idparams:
658
658
  declare function parseParamFile(fContentStr: string): [tParamValInFile, string];
659
659
 
660
660
  type tVec2 = [number, number];
661
- type tVec3$1 = [number, number, number];
662
- type tT2dMatrix = [tVec3$1, tVec3$1, tVec3$1];
661
+ type tVec3b = [number, number, number];
662
+ type tT2dMatrix = [tVec3b, tVec3b, tVec3b];
663
663
  declare class Transform2d {
664
664
  mmat: tT2dMatrix;
665
665
  constructor(iMat: tT2dMatrix);
@@ -725,4 +725,4 @@ declare function version_details(appPackage: tPackage): string[];
725
725
 
726
726
  declare function checkImpPages(pages: tAllPageDef): [boolean, string];
727
727
 
728
- export { Contour, ContourCircle, DesignParam, DxfSeg, DxfWrite, EBVolume, EExtrude, EFormat, Figure, Line, PSeg, PType, PaxPath, Point, SegDbg, SegEnum, Segment1, Segment2, ShapePoint, Transform2d, Transform3d, Vector, aBFromLaLbAa, aCFromAaAb, aCFromLaLbLc, adjustCenter, adjustCopy, adjustInit, adjustMini, adjustRect, adjustScale, adjustTranslate, adjustZero, arcSeg1To2, arcSeg2To1, bisector, canvas2point, canvasTranslatePolar, checkGeom, checkImpPages, circleCenter, colors, contour, contourCircle, copyLayers, createParamFile, ctrOblong, ctrRectRot, ctrRectRot2, ctrRectangle, ctrTrapezoid, ctrTrapezoidRot2, degToRad, designParam, dxfSegArc, dxfSegCircle, dxfSegLine, dxfWriter, envelop, ffix, figure, fileBin, fileBinContent, fileMime, fileSuffix, fileTextContent, fround, gSegDbg, initGeom, initLayers, isActiveCorner, isAddPoint, isCorner, isSeg, isWithin, lbFromLaAaAb, lcFromLaLbAc, line, linePP, makeCorner, mergeFaces, midArcPoint, oneDesignParam, orientedArc, pCheckbox, pDropdown, pNumber, pSectionSeparator, paramListToVal, parseParamFile, paxCircle, paxPath, point, point2canvas, pointCoord, pointMinMax, prefixLog, radToDeg, radius2canvas, rightTriLaFromLbLc, rightTriLbFromLaLc, roundZero, type tAffine, type tAllLink, type tAllPageDef, type tBVolume, type tCanvasAdjust, type tCartesian, type tContour, type tDependencies, type tDesignParamList, type tDesignParamOne, type tEnvelop, type tExtrude, type tFigures, type tGeom, type tGeomFunc, type tInherit, type tLayers, type tOuterInner, type tPackage, type tPageDef, type tParam, type tParamChanged, type tParamDef, type tParamVal, type tParamValInFile, type tPaxContour, type tPaxContourCircle, type tPaxContourPath, type tPaxFace, type tPaxSeg, type tPaxSegArc, type tPaxSegSt, type tPolar, type tPosiOrien, type tSimTime, type tSubDesign, type tSubInst, type tT2dMatrix, type tT3dMatrix, type tVec2, type tVec3, type tVec4, type tVolume, tolerance, transform2d, transform3d, vector, version_details, withinHPiHPi, withinPiPi, withinZero2Pi, withinZeroPi, zeroPDef };
728
+ export { Contour, ContourCircle, DesignParam, DxfSeg, DxfWrite, EBVolume, EExtrude, EFormat, Envelop, Figure, Line, PSeg, PType, PaxPath, Point, SegDbg, SegEnum, Segment1, Segment2, ShapePoint, Transform2d, Transform3d, Vector, aBFromLaLbAa, aCFromAaAb, aCFromLaLbLc, adjustCenter, adjustCopy, adjustInit, adjustMini, adjustRect, adjustScale, adjustTranslate, adjustZero, arcSeg1To2, arcSeg2To1, bisector, canvas2point, canvasTranslatePolar, checkGeom, checkImpPages, circleCenter, colors, contour, contourCircle, copyLayers, createParamFile, ctrOblong, ctrRectRot, ctrRectRot2, ctrRectangle, ctrTrapezoid, ctrTrapezoidRot2, degToRad, designParam, dxfSegArc, dxfSegCircle, dxfSegLine, dxfWriter, envelop, ffix, figure, fileBin, fileBinContent, fileMime, fileSuffix, fileTextContent, fround, gSegDbg, initGeom, initLayers, isActiveCorner, isAddPoint, isCorner, isSeg, isWithin, lbFromLaAaAb, lcFromLaLbAc, line, linePP, makeCorner, mergeFaces, midArcPoint, oneDesignParam, orientedArc, pCheckbox, pDropdown, pNumber, pSectionSeparator, paramListToVal, parseParamFile, paxCircle, paxPath, point, point2canvas, pointCoord, pointMinMax, prefixLog, radToDeg, radius2canvas, rightTriLaFromLbLc, rightTriLbFromLaLc, roundZero, type tAffine, type tAllLink, type tAllPageDef, type tBVolume, type tCanvasAdjust, type tCartesian, type tContour, type tDependencies, type tDesignParamList, type tDesignParamOne, type tEnvelop, type tExtrude, type tFigures, type tGeom, type tGeomFunc, type tInherit, type tLayers, type tOuterInner, type tPackage, type tPageDef, type tParam, type tParamChanged, type tParamDef, type tParamVal, type tParamValInFile, type tPaxContour, type tPaxContourCircle, type tPaxContourPath, type tPaxFace, type tPaxSeg, type tPaxSegArc, type tPaxSegSt, type tPolar, type tPosiOrien, type tSimTime, type tSubDesign, type tSubInst, type tT2dMatrix, type tT3dMatrix, type tVec2, type tVec3, type tVec3b, type tVec4, type tVolume, tolerance, transform2d, transform3d, vector, version_details, withinHPiHPi, withinPiPi, withinZero2Pi, withinZeroPi, zeroPDef };
package/dist/index.js CHANGED
@@ -2434,11 +2434,31 @@ var Contour = class _Contour extends AContour {
2434
2434
  return rPerimeter;
2435
2435
  }
2436
2436
  generateRevertOrientation() {
2437
- const seg0 = this.segments[0];
2437
+ let seg0 = this.segments[0];
2438
2438
  const rContour = new _Contour(seg0.px, seg0.py);
2439
- for (const seg of this.segments) {
2440
- if (isSeg(seg.sType)) {
2441
- rContour.addSeg(seg);
2439
+ let seg1 = this.segments[0];
2440
+ let corner = false;
2441
+ for (const seg of this.segments.slice().reverse()) {
2442
+ if (isCorner(seg.sType)) {
2443
+ corner = true;
2444
+ seg0 = seg;
2445
+ } else {
2446
+ if (seg1.sType !== 6 /* eStart */) {
2447
+ const seg2 = new Segment1(
2448
+ seg1.sType,
2449
+ seg.px,
2450
+ seg.py,
2451
+ seg1.radius,
2452
+ seg1.arcLarge,
2453
+ !seg1.arcCcw
2454
+ );
2455
+ rContour.addSeg(seg2);
2456
+ }
2457
+ seg1 = seg;
2458
+ if (corner) {
2459
+ rContour.addSeg(seg0);
2460
+ corner = false;
2461
+ }
2442
2462
  }
2443
2463
  }
2444
2464
  return rContour;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geometrix",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "The 2D geometry engine of the parametrix",
5
5
  "private": false,
6
6
  "repository": {
@@ -69,8 +69,8 @@
69
69
  "devDependencies": {
70
70
  "@eslint/js": "^9.10.0",
71
71
  "@types/eslint__js": "^8.42.3",
72
- "@types/node": "^22.13.4",
73
- "eslint": "^9.20.1",
72
+ "@types/node": "^22.13.5",
73
+ "eslint": "^9.21.0",
74
74
  "eslint-config-prettier": "^10.0.1",
75
75
  "npm-run-all2": "^7.0.2",
76
76
  "prettier": "^3.5.1",