1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0027998: Self-intersection is not detected

New method CheckFaceSelfIntersection has been added to BOPAlgo_CheckerSI: now self-intersection of each face is found as well as pairs of intersecting faces;

-method IntPatch_Intersection::Perform(S1,D1,TolArc,TolTang) is modified for more effective search of self-interasections in case of Surface Of Extrusion;

-method IntCurve_IntPolyPolyGen::Perform(C1,D1,TolConf,Tol,NbIter) is modified to detect segments of intersections.

Small correction.

Test cases are corrected.

Correction of compiler error

Fix of regressions

Names of shapes correction
This commit is contained in:
jgv
2017-02-17 18:23:18 +03:00
committed by bugmaster
parent 15b2583e69
commit f48cb55d33
17 changed files with 551 additions and 81 deletions

View File

@@ -39,6 +39,15 @@
#include <ProjLib_Plane.hxx>
#include <ProjLib_Sphere.hxx>
#include <ProjLib_Torus.hxx>
#include <ProjLib_ProjectedCurve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Standard_NotImplemented.hxx>
//=======================================================================
//function : Project
@@ -234,3 +243,41 @@ gp_Lin2d ProjLib::Project(const gp_Torus& To, const gp_Circ& Ci)
ProjLib_Torus Proj( To, Ci);
return Proj.Line();
}
//=======================================================================
//function : MakePCurveOfType
//purpose :
//=======================================================================
void ProjLib::MakePCurveOfType
(const ProjLib_ProjectedCurve& PC,
Handle(Geom2d_Curve)& C2D)
{
switch (PC.GetType()) {
case GeomAbs_Line :
C2D = new Geom2d_Line(PC.Line());
break;
case GeomAbs_Circle :
C2D = new Geom2d_Circle(PC.Circle());
break;
case GeomAbs_Ellipse :
C2D = new Geom2d_Ellipse(PC.Ellipse());
break;
case GeomAbs_Parabola :
C2D = new Geom2d_Parabola(PC.Parabola());
break;
case GeomAbs_Hyperbola :
C2D = new Geom2d_Hyperbola(PC.Hyperbola());
break;
case GeomAbs_BSplineCurve :
C2D = PC.BSpline();
break;
case GeomAbs_BezierCurve :
case GeomAbs_OtherCurve :
default :
Standard_NotImplemented::Raise
("ProjLib::MakePCurveOfType");
break;
}
}

View File

@@ -20,6 +20,7 @@
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Geom2d_Curve.hxx>
class gp_Pnt2d;
class gp_Pln;
@@ -128,6 +129,9 @@ public:
Standard_EXPORT static gp_Lin2d Project (const gp_Torus& To, const gp_Circ& Ci);
//! Make empty P-Curve <aC> of relevant to <PC> type
Standard_EXPORT static void MakePCurveOfType (const ProjLib_ProjectedCurve& PC,
Handle(Geom2d_Curve)& aC);

View File

@@ -898,6 +898,16 @@ const Handle(Adaptor3d_HCurve)& ProjLib_ProjectOnPlane::GetCurve() const
return myCurve;
}
//=======================================================================
//function : GetResult
//purpose :
//=======================================================================
const Handle(GeomAdaptor_HCurve)& ProjLib_ProjectOnPlane::GetResult() const
{
return myResult;
}
//=======================================================================
//function : FirstParameter

View File

@@ -92,6 +92,8 @@ public:
Standard_EXPORT const Handle(Adaptor3d_HCurve)& GetCurve() const;
Standard_EXPORT const Handle(GeomAdaptor_HCurve)& GetResult() const;
Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE;
Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE;