Toponaming/Part: Clean and add tests

This commit is contained in:
bgbsww
2024-04-11 10:22:27 -04:00
parent 7bc2b3688a
commit 5f2c412cfa
2 changed files with 105 additions and 2 deletions

View File

@@ -273,10 +273,18 @@ App::DocumentObjectExecReturn *Transformed::execute()
if (fuseShape.isNull() && cutShape.isNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Shape of additive/subtractive feature is empty"));
gp_Trsf trsf = feature->getLocation().Transformation().Multiplied(trsfInv);
#ifdef FC_USE_TNP_FIX
if (!fuseShape.isNull())
fuseShape = fuseShape.makeElementTransform(trsf);
if (!cutShape.isNull())
cutShape = cutShape.makeElementTransform(trsf);
#else
if (!fuseShape.isNull())
fuseShape = fuseShape.makeTransform(trsf);
if (!cutShape.isNull())
cutShape = cutShape.makeTransform(trsf);
#endif
}
else {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Only additive and subtractive features can be transformed"));