diff --git a/cpp/src/mesher.cpp b/cpp/src/mesher.cpp index b59794dc..b8b1b42c 100644 --- a/cpp/src/mesher.cpp +++ b/cpp/src/mesher.cpp @@ -145,18 +145,18 @@ class FaceMesher void generateFaceMeshs() { - auto totleTransform = shape.Location().Transformation().Inverted(); + auto inverted = shape.Location().Transformation().Inverted(); TopTools_IndexedMapOfShape faceMap; TopExp::MapShapes(this->shape, TopAbs_FACE, faceMap); for (TopTools_IndexedMapOfShape::Iterator anIt(faceMap); anIt.More(); anIt.Next()) { auto face = TopoDS::Face(anIt.Value()); faces.push_back(face); - generateFaceMesh(face, totleTransform); + generateFaceMesh(face, inverted); } } - void generateFaceMesh(const TopoDS_Face &face, const gp_Trsf &totleTransform) + void generateFaceMesh(const TopoDS_Face &face, const gp_Trsf &inverted) { TopLoc_Location location; auto handlePoly = BRep_Tool::Triangulation(face, location); @@ -164,9 +164,8 @@ class FaceMesher { return; } + auto trsf = inverted.Multiplied(location.Transformation()); - auto trsf = location.Transformation(); - trsf = trsf.Multiplied(totleTransform); bool isMirrod = trsf.VectorialPart().Determinant() < 0; auto orientation = face.Orientation(); auto groupStart = this->index.size(); diff --git a/packages/chili-core/src/model/node.ts b/packages/chili-core/src/model/node.ts index 4c89bc2d..4751f170 100644 --- a/packages/chili-core/src/model/node.ts +++ b/packages/chili-core/src/model/node.ts @@ -431,6 +431,7 @@ export class EditableShapeNode extends ShapeNode { } else { this._shape = Result.ok(shape); } + this.setPrivateValue("transform", this._shape.value.matrix); } } diff --git a/packages/chili-wasm/lib/chili-wasm.js b/packages/chili-wasm/lib/chili-wasm.js old mode 100644 new mode 100755 diff --git a/packages/chili-wasm/lib/chili-wasm.wasm b/packages/chili-wasm/lib/chili-wasm.wasm index d85f5a98..d95a6c27 100644 Binary files a/packages/chili-wasm/lib/chili-wasm.wasm and b/packages/chili-wasm/lib/chili-wasm.wasm differ