mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027063: BRepGProps raises exception on edge with no curves
Method BRepGProp::LinearProperties() is corrected to treat not geometric edges (their length is zero). To avoid wrong working of command nexplode global properties are calculated as point properties of vertexes. Small value Epsilon(1.) is used as density of points. This prevents exception on shapes that contain such edges, e.g. copy of a wire containing degenerated edge. Method BRep_Tool::IsGeometric() is optimized to avoid nested iteration for check of 3D curve for Null. Small bug is fixed in GProp_PGProps.cxx
This commit is contained in:
@@ -220,10 +220,9 @@ Standard_Boolean BRep_Tool::IsGeometric(const TopoDS_Edge& E)
|
||||
while (itcr.More()) {
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr->IsCurve3D()) {
|
||||
Standard_Real first, last;
|
||||
TopLoc_Location L;
|
||||
const Handle(Geom_Curve)& C = BRep_Tool::Curve(E, L, first, last);
|
||||
if (!C.IsNull()) return Standard_True;
|
||||
Handle(BRep_Curve3D) GC (Handle(BRep_Curve3D)::DownCast (cr));
|
||||
if (! GC.IsNull() && ! GC->Curve3D().IsNull())
|
||||
return Standard_True;
|
||||
}
|
||||
else if (cr->IsCurveOnSurface()) return Standard_True;
|
||||
itcr.Next();
|
||||
|
Reference in New Issue
Block a user