mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-05 04:07:58 +08:00
Modeling - Cache transformed surfaces and update fillet/grid evaluators (#1147)
Refactor transformed-surface handling to avoid repeated transformations, remove mutable surface access patterns, and align dependent code paths. - Add cached transformed data in GeomAdaptor_TransformedSurface and rebuild it on ctor/Load/SetTrsf. - Add explicit original/transformed surface accessors and deprecate legacy GeomSurface() usage. - Preserve transformed cache state in BRepAdaptor_Surface shallow copy/initialization. - Expose GeomAdaptor_Surface::ToleranceU()/ToleranceV() and use them in bounded-surface reload. - Rework ChFi3d bounded surface helper to support both GeomAdaptor_Surface and BRepAdaptor_Surface. - Replace ChangeSurface()-based usages in fillet code with const surface access. - Add and register GeomAdaptor_TransformedSurface GTests.
This commit is contained in:
@@ -425,13 +425,12 @@ const TopoDS_Shape& TopOpeBRep_EdgesIntersector::Vertex1(const int Index)
|
||||
gp_Pnt TopOpeBRep_EdgesIntersector::Value1() const
|
||||
{
|
||||
gp_Pnt2d p2 = Point1().Value();
|
||||
gp_Pnt p;
|
||||
if (Precision::IsInfinite(p2.X()) || Precision::IsInfinite(p2.Y()))
|
||||
{
|
||||
double inf = Precision::Infinite();
|
||||
p.SetCoord(inf, inf, inf);
|
||||
return gp_Pnt(Precision::Infinite(), Precision::Infinite(), Precision::Infinite());
|
||||
}
|
||||
else
|
||||
mySurface1->Surface().D0(p2.X(), p2.Y(), p);
|
||||
return p;
|
||||
{
|
||||
return mySurface1->EvalD0(p2.X(), p2.Y());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,11 +442,10 @@ bool TopOpeBRepTool_ShapeTool::SurfacesSameOriented(const BRepAdaptor_Surface& S
|
||||
S1.D1(u1, v1, p1, d1u, d1v);
|
||||
gp_Vec n1 = d1u.Crossed(d1v);
|
||||
|
||||
occ::handle<Geom_Surface> HS2 = S2.Surface().Surface();
|
||||
HS2 = occ::down_cast<Geom_Surface>(HS2->Transformed(S2.Trsf()));
|
||||
gp_Pnt2d p22d;
|
||||
double dp2;
|
||||
bool ok = FUN_tool_projPonS(p1, HS2, p22d, dp2);
|
||||
const occ::handle<Geom_Surface> HS2 = S2.GeomSurfaceTransformed();
|
||||
gp_Pnt2d p22d;
|
||||
double dp2;
|
||||
bool ok = FUN_tool_projPonS(p1, HS2, p22d, dp2);
|
||||
if (!ok)
|
||||
return so; // NYI : raise
|
||||
|
||||
|
||||
Reference in New Issue
Block a user