Skip to content

Commit

Permalink
Fem: Use reference subshape transformation on the underlying geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
marioalexis84 committed Sep 20, 2024
1 parent 8b9f5bd commit b527813
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Mod/Fem/App/FemConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 436,12 @@ 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);
Handle(Geom_Surface) transSurf = Handle(Geom_Surface)::DownCast(transGeo);
ShapeAnalysis_Surface surfAnalysis(transSurf);
for (int i = 0; i < stepWire; i) {
gp_Pnt p = compCurve.Value(outWireLength * i / stepWire);
gp_Pnt2d pUV = surfAnalysis.ValueOfUV(p, Precision::Confusion());
Expand Down

0 comments on commit b527813

Please sign in to comment.