mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-16 03:51:27 +05:00
[bos #32155] EDF 25230 - face non planar. Advanced treatment of degenerated and non geometrical edges. A workaround for OCCT bug."
This commit is contained in:
parent
611d40ba2a
commit
93b30d2d22
@ -482,6 +482,7 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(Handle(TFunction_Logbook)& log) c
|
|||||||
|
|
||||||
// Try to build a face from a set of wires and edges
|
// Try to build a face from a set of wires and edges
|
||||||
int ind;
|
int ind;
|
||||||
|
bool isPlanarWanted = aCI.GetIsPlanar();
|
||||||
|
|
||||||
Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes();
|
Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes();
|
||||||
int nbshapes = aShapes->Length();
|
int nbshapes = aShapes->Length();
|
||||||
@ -501,11 +502,14 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(Handle(TFunction_Logbook)& log) c
|
|||||||
TopExp_Explorer anExpE_i (aSh_i, TopAbs_EDGE);
|
TopExp_Explorer anExpE_i (aSh_i, TopAbs_EDGE);
|
||||||
for (; anExpE_i.More(); anExpE_i.Next()) {
|
for (; anExpE_i.More(); anExpE_i.Next()) {
|
||||||
if (aMapEdges.Add(anExpE_i.Current())) {
|
if (aMapEdges.Add(anExpE_i.Current())) {
|
||||||
|
const TopoDS_Edge& E = TopoDS::Edge(anExpE_i.Current());
|
||||||
|
if ((BRep_Tool::Degenerated(E) && isPlanarWanted) ||
|
||||||
|
!BRep_Tool::IsGeometric(E))
|
||||||
|
continue;
|
||||||
|
|
||||||
// Copy the original shape.
|
// Copy the original shape.
|
||||||
TopoDS_Shape aShapeCopy;
|
TopoDS_Shape aShapeCopy;
|
||||||
|
TNaming_CopyShape::CopyTool(E, aMapTShapes, aShapeCopy);
|
||||||
TNaming_CopyShape::CopyTool
|
|
||||||
(anExpE_i.Current(), aMapTShapes, aShapeCopy);
|
|
||||||
aSeqEdgesIn->Append(aShapeCopy);
|
aSeqEdgesIn->Append(aShapeCopy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -543,7 +547,7 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(Handle(TFunction_Logbook)& log) c
|
|||||||
// 4.a. Basic face
|
// 4.a. Basic face
|
||||||
TopoDS_Shape aFFace;
|
TopoDS_Shape aFFace;
|
||||||
TopoDS_Wire aW1 = TopoDS::Wire(aSeqClosedWires->Value(1));
|
TopoDS_Wire aW1 = TopoDS::Wire(aSeqClosedWires->Value(1));
|
||||||
aWarning = GEOMImpl_Block6Explorer::MakeFace(aW1, aCI.GetIsPlanar(), aFFace);
|
aWarning = GEOMImpl_Block6Explorer::MakeFace(aW1, isPlanarWanted, aFFace);
|
||||||
if (aFFace.IsNull()) {
|
if (aFFace.IsNull()) {
|
||||||
Standard_ConstructionError::Raise("Face construction failed");
|
Standard_ConstructionError::Raise("Face construction failed");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user