mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-08-09 15:51:29 +08:00
Modeling - Update function handling in GeomFill_ConstrainedFilling and GeomFill_CoonsAlgPatch (#922)
- Fixed a bug in GeomFill_ConstrainedFilling::Init(): law functions were discarded due to erroneous use of method Func() instead of SetFunc(). - Corrected parameter usage in GeomFill_CoonsAlgPatch::Value() to ensure proper variable assignment for curve evaluation.
This commit is contained in:
@@ -434,9 +434,9 @@ void GeomFill_ConstrainedFilling::Init(const occ::handle<GeomFill_Boundary>& B1,
|
||||
{
|
||||
occ::handle<Law_Function> fu1, fu2;
|
||||
ptch->Func(fu1, fu2);
|
||||
fu1 = Law::MixBnd(occ::down_cast<Law_Linear>(fu1));
|
||||
fu2 = Law::MixBnd(occ::down_cast<Law_Linear>(fu2));
|
||||
ptch->Func(fu1, fu2);
|
||||
const occ::handle<Law_Function> ffu1 = Law::MixBnd(occ::down_cast<Law_Linear>(fu1));
|
||||
const occ::handle<Law_Function> ffu2 = Law::MixBnd(occ::down_cast<Law_Linear>(fu2));
|
||||
ptch->SetFunc(ffu1, ffu2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -523,8 +523,8 @@ void GeomFill_ConstrainedFilling::Init(const occ::handle<GeomFill_Boundary>& B1,
|
||||
{
|
||||
occ::handle<Law_Function> fu1, fu2;
|
||||
ptch->Func(fu1, fu2);
|
||||
occ::handle<Law_Function> ffu1 = Law::MixBnd(occ::down_cast<Law_Linear>(fu1));
|
||||
occ::handle<Law_Function> ffu2 = Law::MixBnd(occ::down_cast<Law_Linear>(fu2));
|
||||
const occ::handle<Law_Function> ffu1 = Law::MixBnd(occ::down_cast<Law_Linear>(fu1));
|
||||
const occ::handle<Law_Function> ffu2 = Law::MixBnd(occ::down_cast<Law_Linear>(fu2));
|
||||
ptch->SetFunc(ffu1, ffu2);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -82,12 +82,11 @@ void GeomFill_CoonsAlgPatch::Func(occ::handle<Law_Function>& f1,
|
||||
|
||||
//=================================================================================================
|
||||
|
||||
// gp_Pnt GeomFill_CoonsAlgPatch::Value(const double U,
|
||||
gp_Pnt GeomFill_CoonsAlgPatch::Value(const double, const double V) const
|
||||
gp_Pnt GeomFill_CoonsAlgPatch::Value(const double U, const double V) const
|
||||
{
|
||||
double a0, a1, a2, a3;
|
||||
a0 = a[0]->Value(V);
|
||||
a1 = a[1]->Value(V);
|
||||
a1 = a[1]->Value(U);
|
||||
a2 = 1. - a0;
|
||||
a3 = 1. - a1;
|
||||
gp_XYZ cor, cortemp;
|
||||
|
||||
@@ -166,15 +166,10 @@ double IntPatch_PolyhedronBVH::Center(const int theIndex, const int theAxis) con
|
||||
|
||||
void IntPatch_PolyhedronBVH::Swap(const int theIndex1, const int theIndex2)
|
||||
{
|
||||
if (theIndex1 == theIndex2)
|
||||
if (theIndex1 != theIndex2)
|
||||
{
|
||||
return;
|
||||
std::swap(myIndexMap.ChangeValue(theIndex1), myIndexMap.ChangeValue(theIndex2));
|
||||
}
|
||||
|
||||
// Swap indices in the mapping
|
||||
const int aTmp = myIndexMap.Value(theIndex1);
|
||||
myIndexMap.SetValue(theIndex1, myIndexMap.Value(theIndex2));
|
||||
myIndexMap.SetValue(theIndex2, aTmp);
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
|
||||
Reference in New Issue
Block a user