Add ParallelPlane attachment mode.

It results in an attachment similar to ObjectXY but with the XY plane translated to pass through a selected vertex.

It is most useful to place sketches: pick a plane (XY, XZ, YZ) or another sketch then select a vertex to automatically translate the sketch in the Z-direction. In contrast to the Translate mode it does not change the origin.
This commit is contained in:
Mihail Dumitrescu
2024-05-29 16:48:30 +03:00
committed by Chris Hennes
parent ac21dadc97
commit 417e6559b4
4 changed files with 50 additions and 2 deletions

View File

@@ -171,6 +171,8 @@ TEST_F(AttacherTest, TestAllStringModesValid)
"OXZ",
"OYZ",
"OYX",
"ParallelPlane",
};
int index = 0;
for (auto mode : modes) {
@@ -197,6 +199,9 @@ TEST_F(AttacherTest, TestAllModesBoundaries)
_boxes[1]->recomputeFeature();
EXPECT_TRUE(boxesMatch(_boxes[1]->Shape.getBoundingBox(), Base::BoundBox3d(0, 0, 0, 3, 1, 2)));
_boxes[1]->MapMode.setValue(mmParallelPlane);
_boxes[1]->recomputeFeature();
EXPECT_TRUE(boxesMatch(_boxes[1]->Shape.getBoundingBox(), Base::BoundBox3d(0, 0, 0, 3, 1, 2)));
_boxes[1]->MapMode.setValue(mmFlatFace);
_boxes[1]->recomputeFeature();
EXPECT_TRUE(boxesMatch(_boxes[1]->Shape.getBoundingBox(), Base::BoundBox3d(0, 0, 0, 3, 1, 2)));