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);
|
||||
|
||||
// Continuity check.
|
||||
if (aSurf->Continuity() == GeomAbs_C0)
|
||||
{
|
||||
myError = BRepOffset_C0Geometry;
|
||||
return Standard_False;
|
||||
}
|
||||
//if (aSurf->Continuity() == GeomAbs_C0)
|
||||
//{
|
||||
// myError = BRepOffset_C0Geometry;
|
||||
// return Standard_False;
|
||||
//}
|
||||
|
||||
// Get degenerated points, to avoid check them.
|
||||
NCollection_Vector<gp_Pnt> aBad3dPnts;
|
||||
@@ -4320,31 +4320,31 @@ Standard_Boolean BRepOffset_MakeOffset::CheckInputData()
|
||||
}
|
||||
}
|
||||
|
||||
// Geometry grid check.
|
||||
for(Standard_Integer i = 0; i <= aPntPerDim; i++)
|
||||
{
|
||||
Standard_Real aUParam = aUmin + (aUmax - aUmin) * i / aPntPerDim;
|
||||
for(Standard_Integer j = 0; j <= aPntPerDim; j++)
|
||||
{
|
||||
Standard_Real aVParam = aVmin + (aVmax - aVmin) * j / aPntPerDim;
|
||||
//// Geometry grid check.
|
||||
//for(Standard_Integer i = 0; i <= aPntPerDim; i++)
|
||||
//{
|
||||
// Standard_Real aUParam = aUmin + (aUmax - aUmin) * i / aPntPerDim;
|
||||
// for(Standard_Integer j = 0; j <= aPntPerDim; j++)
|
||||
// {
|
||||
// Standard_Real aVParam = aVmin + (aVmax - aVmin) * j / aPntPerDim;
|
||||
|
||||
myError = checkSinglePoint(aUParam, aVParam, aSurf, aBad3dPnts);
|
||||
if (myError != BRepOffset_NoError)
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
// myError = checkSinglePoint(aUParam, aVParam, aSurf, aBad3dPnts);
|
||||
// if (myError != BRepOffset_NoError)
|
||||
// return Standard_False;
|
||||
// }
|
||||
//}
|
||||
|
||||
// Vertex list check.
|
||||
TopExp_Explorer anExpFV(aF, TopAbs_VERTEX);
|
||||
for( ; anExpFV.More(); anExpFV.Next())
|
||||
{
|
||||
const TopoDS_Vertex &aV = TopoDS::Vertex(anExpFV.Current());
|
||||
aPnt2d = BRep_Tool::Parameters(aV, aF);
|
||||
//// Vertex list check.
|
||||
//TopExp_Explorer anExpFV(aF, TopAbs_VERTEX);
|
||||
//for( ; anExpFV.More(); anExpFV.Next())
|
||||
//{
|
||||
// const TopoDS_Vertex &aV = TopoDS::Vertex(anExpFV.Current());
|
||||
// aPnt2d = BRep_Tool::Parameters(aV, aF);
|
||||
|
||||
myError = checkSinglePoint(aPnt2d.X(), aPnt2d.Y(), aSurf, aBad3dPnts);
|
||||
if (myError != BRepOffset_NoError)
|
||||
return Standard_False;
|
||||
}
|
||||
// myError = checkSinglePoint(aPnt2d.X(), aPnt2d.Y(), aSurf, aBad3dPnts);
|
||||
// if (myError != BRepOffset_NoError)
|
||||
// return Standard_False;
|
||||
//}
|
||||
}
|
||||
|
||||
return Standard_True;
|
||||
|
@@ -528,8 +528,8 @@ void BRepOffset_Offset::Init(const TopoDS_Face& Face,
|
||||
if ( !Co->Position().Direct()) myOffset *= -1;
|
||||
}
|
||||
|
||||
Handle(Geom_Surface) TheSurf =
|
||||
BRepOffset::Surface( S, myOffset, myStatus);
|
||||
Handle(Geom_Surface) TheSurf = fabs(myOffset) > gp::Resolution() ?
|
||||
BRepOffset::Surface( S, myOffset, myStatus) : S;
|
||||
|
||||
//processing offsets of faces with possible degenerated edges
|
||||
Standard_Boolean UminDegen = Standard_False;
|
||||
|
@@ -169,12 +169,16 @@ void IntCurveSurface_Polygon::Init(const TheCurve& C,
|
||||
//ddout << "P1 : " << P1.X() << " " << P1.Y() << " " << P1.Z() << endl;
|
||||
gp_Pnt P2=ThePnts.Value(i+1);
|
||||
//ddout << "P2 : " << P2.X() << " " << P2.Y() << " " << P2.Z() << endl;
|
||||
gp_Lin L(P1,gp_Dir(gp_Vec(P1,P2)));
|
||||
gp_Vec aV12(P1,P2);
|
||||
if (aV12.SquareMagnitude() > gp::Resolution())
|
||||
{
|
||||
gp_Lin L(P1,gp_Dir());
|
||||
Standard_Real t=L.Distance(Pm);
|
||||
//ddout << "Distance " << t << endl;
|
||||
if(t>TheDeflection) {
|
||||
TheDeflection = t;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
while(i<NbPntIn);
|
||||
|
Reference in New Issue
Block a user