Toponaming: Remove all FC_USE_TNP_FIX protected old code

This commit is contained in:
bgbsww
2024-05-20 21:57:39 -04:00
committed by Chris Hennes
parent 60640fa441
commit ecf7e51ab3
52 changed files with 22 additions and 4760 deletions

View File

@@ -731,11 +731,7 @@ void SubShapeBinder::update(SubShapeBinder::UpdateOption options) {
else {
for (size_t i = 0; i < shapes.size(); ++i) {
auto& shape = shapes[i];
#ifdef FC_USE_TNP_FIX
shape = shape.makeElementTransform(*shapeMats[i]);
#else
shape = shape.makeTransform(*shapeMats[i]);
#endif
// if(shape.Hasher
// && shape.getElementMapSize()
// && shape.Hasher != getDocument()->getStringHasher())
@@ -750,11 +746,7 @@ void SubShapeBinder::update(SubShapeBinder::UpdateOption options) {
// Shape.resetElementMapVersion();
return;
}
#ifdef FC_USE_TNP_FIX
result.makeElementCompound(shapes);
#else
result.makeCompound(shapes);
#endif
bool fused = false;
if (Fuse.getValue()) {
// If the compound has solid, fuse them together, and ignore other type of
@@ -773,11 +765,7 @@ void SubShapeBinder::update(SubShapeBinder::UpdateOption options) {
}
else if (!solid.isNull()) {
// wrap the single solid in compound to keep its placement
#ifdef FC_USE_TNP_FIX
result.makeElementCompound({ solid });
#else
result.makeCompound({ solid });
#endif
fused = true;
}
}
@@ -786,7 +774,6 @@ void SubShapeBinder::update(SubShapeBinder::UpdateOption options) {
&& !result.hasSubShape(TopAbs_FACE)
&& result.hasSubShape(TopAbs_EDGE))
{
#ifdef FC_USE_TNP_FIX
result = result.makeElementWires();
if (MakeFace.getValue()) {
try {
@@ -794,33 +781,16 @@ void SubShapeBinder::update(SubShapeBinder::UpdateOption options) {
}
catch (...) {}
}
#else
result = result.makeWires();
if (MakeFace.getValue()) {
try {
result = result.makeFace(nullptr);
}
catch (...) {}
}
#endif
}
if (!fused && result.hasSubShape(TopAbs_WIRE)
&& Offset.getValue() != 0.0) {
try {
#ifdef FC_USE_TNP_FIX
result = result.makeElementOffset2D(Offset.getValue(),
(Part::JoinType) OffsetJoinType.getValue() ,
OffsetFill.getValue() ? Part::FillType::fill : Part::FillType::noFill,
OffsetOpenResult.getValue() ? Part::OpenResult::allowOpenResult : Part::OpenResult::noOpenResult,
OffsetIntersection.getValue());
#else
result = result.makeOffset2D(Offset.getValue(),
OffsetJoinType.getValue(),
OffsetFill.getValue(),
OffsetOpenResult.getValue(),
OffsetIntersection.getValue());
#endif
}
catch (...) {
std::ostringstream msg;
@@ -830,11 +800,7 @@ void SubShapeBinder::update(SubShapeBinder::UpdateOption options) {
}
if (Refine.getValue())
#ifdef FC_USE_TNP_FIX
result = result.makeElementRefine();
#else
result = result.makeRefine();
#endif
result.setPlacement(Placement.getValue());
Shape.setValue(result);
}