Fem: Use reference subshape transformation on the underlying geometry

This commit is contained in:
marioalexis
2024-09-20 00:12:59 -03:00
committed by Chris Hennes
parent a55e704758
commit 5ff4d427a5

View File

@@ -436,7 +436,11 @@ bool Constraint::getPoints(std::vector<Base::Vector3d>& points,
BRepGProp::LinearProperties(compCurve.Wire(), linProps);
double outWireLength = linProps.Mass();
int stepWire = stepsu + stepsv;
ShapeAnalysis_Surface surfAnalysis(surface.Surface().Surface());
// apply subshape transformation to the geometry
gp_Trsf faceTrans = face.Location().Transformation();
Handle(Geom_Geometry) transGeo =
surface.Surface().Surface()->Transformed(faceTrans);
ShapeAnalysis_Surface surfAnalysis(Handle(Geom_Surface)::DownCast(transGeo));
for (int i = 0; i < stepWire; ++i) {
gp_Pnt p = compCurve.Value(outWireLength * i / stepWire);
gp_Pnt2d pUV = surfAnalysis.ValueOfUV(p, Precision::Confusion());