mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Treatment of the shells with free edges has been changed to keep the faces with internal edges.
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
TopoDS_Shape BRepAlgo_Tool::Deboucle3D(const TopoDS_Shape& S,
|
TopoDS_Shape BRepAlgo_Tool::Deboucle3D(const TopoDS_Shape& S,
|
||||||
const TopTools_MapOfShape& Boundary)
|
const TopTools_MapOfShape& Boundary)
|
||||||
{
|
{
|
||||||
TopoDS_Shape SS;
|
TopoDS_Shape SS;
|
||||||
|
|
||||||
@@ -52,12 +52,20 @@ TopoDS_Shape BRepAlgo_Tool::Deboucle3D(const TopoDS_Shape& S,
|
|||||||
|
|
||||||
Standard_Boolean JeGarde = Standard_True;
|
Standard_Boolean JeGarde = Standard_True;
|
||||||
for ( Standard_Integer i = 1; i <= Map.Extent() && JeGarde; i++) {
|
for ( Standard_Integer i = 1; i <= Map.Extent() && JeGarde; i++) {
|
||||||
if (Map(i).Extent() < 2) {
|
const TopTools_ListOfShape& aLF = Map(i);
|
||||||
const TopoDS_Edge& anEdge = TopoDS::Edge(Map.FindKey(i));
|
if (aLF.Extent() < 2) {
|
||||||
if (!Boundary.Contains(anEdge) &&
|
const TopoDS_Edge& anEdge = TopoDS::Edge(Map.FindKey(i));
|
||||||
!BRep_Tool::Degenerated(anEdge) )
|
if (anEdge.Orientation() == TopAbs_INTERNAL) {
|
||||||
JeGarde = Standard_False;
|
const TopoDS_Face& aFace = TopoDS::Face(aLF.First());
|
||||||
}
|
if (aFace.Orientation() != TopAbs_INTERNAL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
if (!Boundary.Contains(anEdge) &&
|
||||||
|
!BRep_Tool::Degenerated(anEdge) )
|
||||||
|
JeGarde = Standard_False;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( JeGarde) SS = S;
|
if ( JeGarde) SS = S;
|
||||||
}
|
}
|
||||||
@@ -71,18 +79,18 @@ TopoDS_Shape BRepAlgo_Tool::Deboucle3D(const TopoDS_Shape& S,
|
|||||||
Standard_Boolean NbSub = 0;
|
Standard_Boolean NbSub = 0;
|
||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
if (S.ShapeType() == TopAbs_COMPOUND) {
|
if (S.ShapeType() == TopAbs_COMPOUND) {
|
||||||
B.MakeCompound(TopoDS::Compound(SS));
|
B.MakeCompound(TopoDS::Compound(SS));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
B.MakeSolid(TopoDS::Solid(SS));
|
B.MakeSolid(TopoDS::Solid(SS));
|
||||||
}
|
}
|
||||||
for ( ; it.More(); it.Next()) {
|
for ( ; it.More(); it.Next()) {
|
||||||
const TopoDS_Shape& CurS = it.Value();
|
const TopoDS_Shape& CurS = it.Value();
|
||||||
SubShape = Deboucle3D(CurS,Boundary);
|
SubShape = Deboucle3D(CurS,Boundary);
|
||||||
if ( !SubShape.IsNull()) {
|
if ( !SubShape.IsNull()) {
|
||||||
B.Add(SS, SubShape);
|
B.Add(SS, SubShape);
|
||||||
NbSub++;
|
NbSub++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (NbSub == 0)
|
if (NbSub == 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user