mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0025202: Incorrect value of IsClosed flag in shapes produced by some algorithms
Method BRep_Tool::IsClosed() extended to analyze closure of wires in addition to shells and solids. External and Internal edges and vertices are ignored in this check. Analysis of compounds is disabled. Update of flag Closed according to actual state is added in most places where new shells are constructed. Draw-command and test case for issue CR25202
This commit is contained in:
@@ -614,6 +614,7 @@ void StepToTopoDS_Builder::Init (const Handle(StepShape_EdgeBasedWireframeModel)
|
||||
B.Add ( W, E );
|
||||
}
|
||||
if ( W.IsNull() ) continue;
|
||||
W.Closed (BRep_Tool::IsClosed (W));
|
||||
B.Add ( C, W );
|
||||
if ( myResult.IsNull() ) myResult = W;
|
||||
else myResult = C;
|
||||
@@ -675,6 +676,7 @@ void StepToTopoDS_Builder::Init (const Handle(StepShape_FaceBasedSurfaceModel)&
|
||||
B.Add ( S, F );
|
||||
}
|
||||
if ( S.IsNull() ) continue;
|
||||
S.Closed (BRep_Tool::IsClosed (S));
|
||||
B.Add ( C, S );
|
||||
if ( myResult.IsNull() ) myResult = S;
|
||||
else myResult = C;
|
||||
|
@@ -675,6 +675,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
|
||||
TP->AddFail(EL,"At least one edge failed : wire not done");
|
||||
return;
|
||||
}
|
||||
W.Closed (BRep_Tool::IsClosed (W));
|
||||
aTool.Bind(EL, W);
|
||||
|
||||
// ----------------------------------------------
|
||||
|
@@ -170,6 +170,7 @@ void StepToTopoDS_TranslatePolyLoop::Init(const Handle(StepShape_PolyLoop)& PL,
|
||||
GP1 = GP2;
|
||||
V1 = V2;
|
||||
}
|
||||
W.Closed (BRep_Tool::IsClosed (W));
|
||||
aTool.Bind(PL, W);
|
||||
myResult = W;
|
||||
myError = StepToTopoDS_TranslatePolyLoopDone;
|
||||
|
@@ -103,6 +103,7 @@ void StepToTopoDS_TranslateShell::Init
|
||||
TP->AddWarning(StepFace," Face is not of FaceSurface Type; not mapped to TopoDS");
|
||||
}
|
||||
}
|
||||
Sh.Closed (BRep_Tool::IsClosed (Sh));
|
||||
myResult = Sh;
|
||||
aTool.Bind(CFS, myResult);
|
||||
myError = StepToTopoDS_TranslateShellDone;
|
||||
|
@@ -89,6 +89,7 @@ void StepToTopoDS_TranslateVertexLoop::Init(const Handle(StepShape_VertexLoop)&
|
||||
B.Degenerated(E, Standard_True);
|
||||
|
||||
B.MakeWire(W);
|
||||
W.Closed (Standard_True);
|
||||
B.Add(W, E);
|
||||
aTool.Bind(VL, W);
|
||||
myResult = W;
|
||||
|
Reference in New Issue
Block a user