Techdraw: Smart Dimension: Fixes and simplifies code

This commit is contained in:
PaddleStroke
2024-04-22 16:59:55 +02:00
parent 41650a78d4
commit cc393632e1
12 changed files with 306 additions and 219 deletions

View File

@@ -265,15 +265,7 @@ Part::TopoShape ReferenceEntry::asTopoShapeEdge(const TopoDS_Edge &edge)
Part::TopoShape ReferenceEntry::asTopoShapeFace(const TopoDS_Face &face)
{
// Base::Console().Message("RE::asTopoShapeFace()\n");
TopoDS_Face unscaledFace = face;
if (!is3d()) {
// 2d reference - projected and scaled. scale might have changed, so we need to unscale
auto dvp = static_cast<TechDraw::DrawViewPart*>(getObject());
TopoDS_Shape unscaledShape = ShapeUtils::scaleShape(face, 1.0 / dvp->getScale());
unscaledFace = TopoDS::Face(unscaledShape);
}
return { unscaledFace };
return { face };
}
std::string ReferenceEntry::geomType() const