mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
#Temporary changes to force offset make computations on C0 surfaces.
This commit is contained in:
@@ -4302,11 +4302,11 @@ Standard_Boolean BRepOffset_MakeOffset::CheckInputData()
|
|||||||
BRepTools::UVBounds(aF, aUmin, aUmax, aVmin, aVmax);
|
BRepTools::UVBounds(aF, aUmin, aUmax, aVmin, aVmax);
|
||||||
|
|
||||||
// Continuity check.
|
// Continuity check.
|
||||||
if (aSurf->Continuity() == GeomAbs_C0)
|
//if (aSurf->Continuity() == GeomAbs_C0)
|
||||||
{
|
//{
|
||||||
myError = BRepOffset_C0Geometry;
|
// myError = BRepOffset_C0Geometry;
|
||||||
return Standard_False;
|
// return Standard_False;
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Get degenerated points, to avoid check them.
|
// Get degenerated points, to avoid check them.
|
||||||
NCollection_Vector<gp_Pnt> aBad3dPnts;
|
NCollection_Vector<gp_Pnt> aBad3dPnts;
|
||||||
@@ -4320,31 +4320,31 @@ Standard_Boolean BRepOffset_MakeOffset::CheckInputData()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Geometry grid check.
|
//// Geometry grid check.
|
||||||
for(Standard_Integer i = 0; i <= aPntPerDim; i++)
|
//for(Standard_Integer i = 0; i <= aPntPerDim; i++)
|
||||||
{
|
//{
|
||||||
Standard_Real aUParam = aUmin + (aUmax - aUmin) * i / aPntPerDim;
|
// Standard_Real aUParam = aUmin + (aUmax - aUmin) * i / aPntPerDim;
|
||||||
for(Standard_Integer j = 0; j <= aPntPerDim; j++)
|
// for(Standard_Integer j = 0; j <= aPntPerDim; j++)
|
||||||
{
|
// {
|
||||||
Standard_Real aVParam = aVmin + (aVmax - aVmin) * j / aPntPerDim;
|
// Standard_Real aVParam = aVmin + (aVmax - aVmin) * j / aPntPerDim;
|
||||||
|
|
||||||
myError = checkSinglePoint(aUParam, aVParam, aSurf, aBad3dPnts);
|
// myError = checkSinglePoint(aUParam, aVParam, aSurf, aBad3dPnts);
|
||||||
if (myError != BRepOffset_NoError)
|
// if (myError != BRepOffset_NoError)
|
||||||
return Standard_False;
|
// return Standard_False;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Vertex list check.
|
//// Vertex list check.
|
||||||
TopExp_Explorer anExpFV(aF, TopAbs_VERTEX);
|
//TopExp_Explorer anExpFV(aF, TopAbs_VERTEX);
|
||||||
for( ; anExpFV.More(); anExpFV.Next())
|
//for( ; anExpFV.More(); anExpFV.Next())
|
||||||
{
|
//{
|
||||||
const TopoDS_Vertex &aV = TopoDS::Vertex(anExpFV.Current());
|
// const TopoDS_Vertex &aV = TopoDS::Vertex(anExpFV.Current());
|
||||||
aPnt2d = BRep_Tool::Parameters(aV, aF);
|
// aPnt2d = BRep_Tool::Parameters(aV, aF);
|
||||||
|
|
||||||
myError = checkSinglePoint(aPnt2d.X(), aPnt2d.Y(), aSurf, aBad3dPnts);
|
// myError = checkSinglePoint(aPnt2d.X(), aPnt2d.Y(), aSurf, aBad3dPnts);
|
||||||
if (myError != BRepOffset_NoError)
|
// if (myError != BRepOffset_NoError)
|
||||||
return Standard_False;
|
// return Standard_False;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
|
@@ -528,8 +528,8 @@ void BRepOffset_Offset::Init(const TopoDS_Face& Face,
|
|||||||
if ( !Co->Position().Direct()) myOffset *= -1;
|
if ( !Co->Position().Direct()) myOffset *= -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle(Geom_Surface) TheSurf =
|
Handle(Geom_Surface) TheSurf = fabs(myOffset) > gp::Resolution() ?
|
||||||
BRepOffset::Surface( S, myOffset, myStatus);
|
BRepOffset::Surface( S, myOffset, myStatus) : S;
|
||||||
|
|
||||||
//processing offsets of faces with possible degenerated edges
|
//processing offsets of faces with possible degenerated edges
|
||||||
Standard_Boolean UminDegen = Standard_False;
|
Standard_Boolean UminDegen = Standard_False;
|
||||||
|
@@ -169,11 +169,15 @@ void IntCurveSurface_Polygon::Init(const TheCurve& C,
|
|||||||
//ddout << "P1 : " << P1.X() << " " << P1.Y() << " " << P1.Z() << endl;
|
//ddout << "P1 : " << P1.X() << " " << P1.Y() << " " << P1.Z() << endl;
|
||||||
gp_Pnt P2=ThePnts.Value(i+1);
|
gp_Pnt P2=ThePnts.Value(i+1);
|
||||||
//ddout << "P2 : " << P2.X() << " " << P2.Y() << " " << P2.Z() << endl;
|
//ddout << "P2 : " << P2.X() << " " << P2.Y() << " " << P2.Z() << endl;
|
||||||
gp_Lin L(P1,gp_Dir(gp_Vec(P1,P2)));
|
gp_Vec aV12(P1,P2);
|
||||||
Standard_Real t=L.Distance(Pm);
|
if (aV12.SquareMagnitude() > gp::Resolution())
|
||||||
//ddout << "Distance " << t << endl;
|
{
|
||||||
if(t>TheDeflection) {
|
gp_Lin L(P1,gp_Dir());
|
||||||
TheDeflection = t;
|
Standard_Real t=L.Distance(Pm);
|
||||||
|
//ddout << "Distance " << t << endl;
|
||||||
|
if(t>TheDeflection) {
|
||||||
|
TheDeflection = t;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user