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

0021494: Intersection between cone and sphere fails

The condition (workaround), which forbid to return the intersection curve, has been removed.
This commit is contained in:
nbv
2018-10-29 13:34:21 +03:00
committed by bugmaster
parent 32c408d76a
commit 9bc5f5850a
5 changed files with 170 additions and 41 deletions

View File

@@ -601,26 +601,47 @@ Standard_Boolean IntCoSp(const IntSurf_Quadric& Quad1,
gp_Circ cirsol = inter.Circle(1);
param = ElCLib::LineParameter(Co.Axis(),
cirsol.Location());
if (param >= paramapex) {
ElCLib::D1(0.,cirsol,ptref,Tgt);
Standard_Real qwe = Tgt.DotCross(Quad2.Normale(ptref),
Quad1.Normale(ptref));
if(qwe> 0.000000001) {
trans1 = IntSurf_Out;
trans2 = IntSurf_In;
}
else if(qwe< -0.000000001){
trans1 = IntSurf_In;
trans2 = IntSurf_Out;
}
else {
trans1=trans2=IntSurf_Undecided;
}
Handle(IntPatch_GLine) glig = new IntPatch_GLine(cirsol,Standard_False,trans1,trans2);
slin.Append(glig);
cirsol.Location());
ElCLib::D1(0., cirsol, ptref, Tgt);
Standard_Real qwe = Tgt.DotCross(Quad2.Normale(ptref),
Quad1.Normale(ptref));
if (param >= paramapex)
{
if (qwe > Precision::PConfusion())
{
trans1 = IntSurf_Out;
trans2 = IntSurf_In;
}
else if (qwe < -Precision::PConfusion())
{
trans1 = IntSurf_In;
trans2 = IntSurf_Out;
}
else
{
trans1 = trans2 = IntSurf_Undecided;
}
}
else
{
if (qwe < -Precision::PConfusion())
{
trans1 = IntSurf_Out;
trans2 = IntSurf_In;
}
else if (qwe > Precision::PConfusion())
{
trans1 = IntSurf_In;
trans2 = IntSurf_Out;
}
else
{
trans1 = trans2 = IntSurf_Undecided;
}
}
Handle(IntPatch_GLine) glig = new IntPatch_GLine(cirsol, Standard_False, trans1, trans2);
slin.Append(glig);
}
break;