[TD]Refactor LTNP correction code for Dimensions

- additional geometry types

- add method to handle line like bsplines

- handle deleted ref body feature

- add test for empty savedGeometry

- add switch for matcher/LTNP on/off
This commit is contained in:
wmayer
2024-02-20 14:43:02 +01:00
committed by WandererFan
parent 1bc62cf113
commit 48ff9ad3a1
16 changed files with 1507 additions and 674 deletions

View File

@@ -1716,3 +1716,21 @@ bool GeometryUtils::isLine(TopoDS_Edge occEdge)
}
return false;
}
//! make a line Edge from BSpline Edge
TopoDS_Edge GeometryUtils::asLine(TopoDS_Edge occEdge)
{
BRepAdaptor_Curve c(occEdge);
// find the two ends
Handle(Geom_Curve) curve = c.Curve().Curve();
double first = c.FirstParameter();
double last = c.LastParameter();
gp_Pnt start = c.Value(first);
gp_Pnt end = c.Value(last);
TopoDS_Edge result = BRepBuilderAPI_MakeEdge(start, end);
return result;
}