mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +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:
@@ -84,7 +84,7 @@ void GProp_PGProps::AddPoint (const gp_Pnt& P, const Standard_Real Density)
|
||||
Mat Mp (XYZ (Ixx, Ixy, Ixz), XYZ (Ixy, Iyy, Iyz), XYZ (Ixz, Iyz, Izz));
|
||||
if (dim == 0) {
|
||||
dim = Density;
|
||||
g.SetXYZ (P.XYZ().Multiplied (Density));
|
||||
g = P;
|
||||
inertia = Mp * Density;
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user