Sync changes from upstream repository

This commit is contained in:
Bozo the Builder
2024-06-17 00:58:44 -07:00
parent c59a83ffcc
commit 778eed8b8a
2 changed files with 29 additions and 10 deletions

View File

@@ -2528,12 +2528,24 @@ bool ON_Brep::MatchTrimEnds(ON_BrepTrim& T0,
if (!nc0->SetEndPoint(ON_3dPoint(p)))
return false;
ON_BrepLoop* pLoop = T0.Loop();
if (pLoop && pLoop != T1.Loop())
pLoop = nullptr;
// clean up T1 flags and cached information
if(xiso0 && p0.x != p.x) T0.m_iso = ON_Surface::not_iso;
if(yiso0 && p0.y != p.y) T0.m_iso = ON_Surface::not_iso;
T0.m_pline.Destroy();
if ( T0.m_pbox.IsValid() )
T0.m_pbox.Set( ON_3dPoint(p), true );
if ( T0.m_pbox.IsValid())
{
T0.m_pbox.Set( ON_3dPoint(p), true);
if (pLoop && pLoop->m_pbox.IsValid())
{
pLoop->m_pbox.Set(ON_3dPoint(p), true);
}
}
T0.DestroyCurveTree();
if (!nc1->SetStartPoint(ON_3dPoint(p)))
@@ -2543,8 +2555,15 @@ bool ON_Brep::MatchTrimEnds(ON_BrepTrim& T0,
if(xiso1 && p1.x != p.x) T1.m_iso = ON_Surface::not_iso;
if(yiso1 && p1.y != p.y) T1.m_iso = ON_Surface::not_iso;
T1.m_pline.Destroy();
if ( T1.m_pbox.IsValid() )
T1.m_pbox.Set( ON_3dPoint(p), true );
if ( T1.m_pbox.IsValid())
{
T1.m_pbox.Set( ON_3dPoint(p), true);
if (pLoop && pLoop->m_pbox.IsValid())
{
pLoop->m_pbox.Set(ON_3dPoint(p), true);
}
}
T1.DestroyCurveTree();
return true;