diff --git a/src/Mod/TechDraw/App/ShapeExtractor.cpp b/src/Mod/TechDraw/App/ShapeExtractor.cpp index 1907a9c165..cc5f967dc0 100644 --- a/src/Mod/TechDraw/App/ShapeExtractor.cpp +++ b/src/Mod/TechDraw/App/ShapeExtractor.cpp @@ -148,7 +148,7 @@ TopoDS_Shape ShapeExtractor::getShapes(const std::vector l std::vector ShapeExtractor::getXShapes(const App::Link* xLink) { -// Base::Console().Message("SE::getXShapes(%X) - %s\n", xLink, xLink->getNameInDocument()); +// Base::Console().Message("SE::getXShapes() - %s\n", xLink->getNameInDocument()); std::vector xSourceShapes; if (!xLink) { return xSourceShapes; @@ -170,6 +170,7 @@ std::vector ShapeExtractor::getXShapes(const App::Link* xLink) Base::Matrix4D netTransform; if (!children.empty()) { for (auto& l:children) { + Base::Console().Message("SE::getXShapes - processing a child\n"); bool childNeedsTransform = false; Base::Placement childPlm; Base::Matrix4D childScale; @@ -185,12 +186,16 @@ std::vector ShapeExtractor::getXShapes(const App::Link* xLink) } } auto shape = Part::Feature::getShape(l); + Part::TopoShape ts(shape); + if (ts.isInfinite()) { + shape = stripInfiniteShapes(shape); + ts = Part::TopoShape(shape); + } if(!shape.IsNull()) { if (needsTransform || childNeedsTransform) { // Multiplication is associative, but the braces show the idea of combining the two transforms: // ( link placement and scale ) combined to ( child placement and scale ) netTransform = (linkPlm.toMatrix() * linkScale) * (childPlm.toMatrix() * childScale); - Part::TopoShape ts(shape); ts.transformGeometry(netTransform); shape = ts.getShape(); } @@ -204,11 +209,15 @@ std::vector ShapeExtractor::getXShapes(const App::Link* xLink) App::DocumentObject* link = xLink->getLink(depth); if (link) { auto shape = Part::Feature::getShape(link); + Part::TopoShape ts(shape); + if (ts.isInfinite()) { + shape = stripInfiniteShapes(shape); + ts = Part::TopoShape(shape); + } if(!shape.IsNull()) { if (needsTransform) { // Transform is just link placement and scale, no child objects netTransform = linkPlm.toMatrix() * linkScale; - Part::TopoShape ts(shape); ts.transformGeometry(netTransform); shape = ts.getShape(); } @@ -308,7 +317,7 @@ TopoDS_Shape ShapeExtractor::getShapesFused(const std::vector