mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027991: Modeling Algorithms - BRepGProp_Face crashes on face without geometric surface
BRepGProps now ignores faces without geometric surface to avoid access violation. BRepExtrema_DistShapeShape::DistanceMapMap() now skips comparison between void bounding boxes. BRepBndLib::Add() now ignores useTriangulation flag for faces without geometric surfaces, and uses triangulation if any for updating of the box.
This commit is contained in:
@@ -117,7 +117,15 @@ void BRepExtrema_DistShapeShape::DistanceMapMap (const TopTools_IndexedMapOfShap
|
||||
{
|
||||
for (Standard_Integer anIdx2 = 1; anIdx2 <= aCount2; ++anIdx2)
|
||||
{
|
||||
const Standard_Real aDist = theLBox1.Value (anIdx1).Distance (theLBox2.Value (anIdx2));
|
||||
const Bnd_Box& aBox1 = theLBox1.Value (anIdx1);
|
||||
const Bnd_Box& aBox2 = theLBox2.Value (anIdx2);
|
||||
if (aBox1.IsVoid()
|
||||
|| aBox2.IsVoid())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
const Standard_Real aDist = aBox1.Distance (aBox2);
|
||||
if (aDist < myDistRef - myEps || fabs (aDist - myDistRef) < myEps)
|
||||
{
|
||||
aPairList.Append (BRepExtrema_CheckPair (anIdx1, anIdx2, aDist));
|
||||
|
Reference in New Issue
Block a user