DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0020766

Intersection of cone with plane in apex point crashes

Open CASCADEOCCT:Modeling Algorithmsclosed0 public notes

Search issues

Description

The next simple C++ example causes exception:

  Handle(Geom_Plane) aPlane = new Geom_Plane(1, 0, 0, 3522.4299999999998);
  Handle(Geom_ConicalSurface) aCone = new Geom_ConicalSurface(gp_Ax3(gp_Pnt(-
3522.4299999999998, 2540, -1461.4300000000001),
                                          gp_Dir(5449.7857099692965, 0, 5537.
6938973109054)), 0.46689346637921703, 0.);
  GeomAPI_IntSS aSS(aCone, aPlane, 1.e-7);

Sqrt of negative value is calculated in "void IntAna_QuadQuadGeo::Perform(const
gp_Pln& P, const gp_Cone& Co, const Standard_Real Tolang, const Standard_Real
Tol)".

How to fix:

    else if (sint > sina) { // plan "interieur" au cone
change to
    else if (cost < sina) { // plan "interieur" au cone

Public activity

No public notes

Participants are labeled by their role within this record.