mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
Method BRepGProp::LinearProperties was changed to avoid degenerated edges.
This commit is contained in:
parent
2714f5dd39
commit
ac3797065c
@ -32,6 +32,7 @@
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <BRepCheck_Shell.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <BRep_TEdge.hxx>
|
||||
#ifdef DEB
|
||||
static Standard_Integer AffichEps = 0;
|
||||
#endif
|
||||
@ -55,9 +56,15 @@ void BRepGProp::LinearProperties(const TopoDS_Shape& S, GProp_GProps& SProps){
|
||||
// Standard_Integer n,i;
|
||||
TopExp_Explorer ex;
|
||||
for (ex.Init(S,TopAbs_EDGE); ex.More(); ex.Next()) {
|
||||
BAC.Initialize(TopoDS::Edge(ex.Current()));
|
||||
BRepGProp_Cinert CG(BAC,P);
|
||||
SProps.Add(CG);
|
||||
TopoDS_Edge anES = TopoDS::Edge(ex.Current());
|
||||
Handle_BRep_TEdge & anEG = (Handle_BRep_TEdge &)anES.TShape();
|
||||
BRep_TEdge dsd;
|
||||
if (!anEG->Degenerated())
|
||||
{
|
||||
BAC.Initialize(anES);
|
||||
BRepGProp_Cinert CG(BAC,P);
|
||||
SProps.Add(CG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user