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

0023985: There is no section between attached faces.

Added new parameter for checking whether the plane and cylinder are parallel - the height of the cylinder.
This parameter is needed for the cases when angle between AXIS and plane's normal is very close to PI,
but the "height" is big enough that point, translated from intersection point between cylinder's axis and plane
on the "height" distance in the direction of cylinder's axis, does not belong to the plane.
Such plane and cylinder cannot be considered as parallel.
Add test case for this fix
This commit is contained in:
emv
2013-05-31 17:17:34 +04:00
parent 470ebb43f2
commit 04cbc9d384
8 changed files with 113 additions and 50 deletions

View File

@@ -32,7 +32,8 @@ static Standard_Boolean IntPCy (const IntSurf_Quadric&,
const Standard_Real,
const Standard_Boolean,
Standard_Boolean&,
IntPatch_SequenceOfLine&);
IntPatch_SequenceOfLine&,
const Standard_Real H=0.);
static Standard_Boolean IntPSp (const IntSurf_Quadric&,

View File

@@ -101,7 +101,8 @@ void IntPatch_ImpImpIntersection::Perform(const Handle(Adaptor3d_HSurface)& S1,
case GeomAbs_Cylinder:
{
quad2.SetValue(S2->Cylinder());
if (!IntPCy(quad1,quad2,Tolang,TolTang,Standard_False,empt,slin)) {
Standard_Real H = S1->LastVParameter() - S1->FirstVParameter();
if (!IntPCy(quad1,quad2,Tolang,TolTang,Standard_False,empt,slin,H)) {
return;
}
if (empt) {
@@ -157,7 +158,8 @@ void IntPatch_ImpImpIntersection::Perform(const Handle(Adaptor3d_HSurface)& S1,
case GeomAbs_Plane:
{
quad2.SetValue(S2->Plane());
if (!IntPCy(quad1,quad2,Tolang,TolTang,Standard_True,empt,slin)) {
Standard_Real H = S1->LastVParameter() - S1->FirstVParameter();
if (!IntPCy(quad1,quad2,Tolang,TolTang,Standard_True,empt,slin,H)) {
return;
}
if (empt) {

View File

@@ -92,7 +92,8 @@ Standard_Boolean IntPCy (const IntSurf_Quadric& Quad1,
const Standard_Real TolTang,
const Standard_Boolean Reversed,
Standard_Boolean& Empty,
IntPatch_SequenceOfLine& slin)
IntPatch_SequenceOfLine& slin,
const Standard_Real H)
{
gp_Pln Pl;
@@ -110,7 +111,7 @@ Standard_Boolean IntPCy (const IntSurf_Quadric& Quad1,
Pl = Quad2.Plane();
Cy = Quad1.Cylinder();
}
inter.Perform(Pl,Cy,Tolang,TolTang);
inter.Perform(Pl,Cy,Tolang,TolTang,H);
if (!inter.IsDone()) {return Standard_False;}
typint = inter.TypeInter();
Standard_Integer NbSol = inter.NbSolutions();