mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0025106: Command "splitshape" does not split attached face by attached edge
Test cases for issue CR25106
This commit is contained in:
parent
1ba5bcdc40
commit
21678ea94a
@ -1078,11 +1078,6 @@ void FindInternalIntersections(const TopoDS_Edge& theEdge,
|
|||||||
|
|
||||||
TopoDS_Vertex theVertices [2];
|
TopoDS_Vertex theVertices [2];
|
||||||
TopExp::Vertices(theEdge, theVertices[0], theVertices[1]);
|
TopExp::Vertices(theEdge, theVertices[0], theVertices[1]);
|
||||||
if (theEdge.Orientation() == TopAbs_REVERSED)
|
|
||||||
{
|
|
||||||
theVertices[0].Reverse();
|
|
||||||
theVertices[1].Reverse();
|
|
||||||
}
|
|
||||||
gp_Pnt thePnt [2];
|
gp_Pnt thePnt [2];
|
||||||
thePnt[0] = BRep_Tool::Pnt(theVertices[0]);
|
thePnt[0] = BRep_Tool::Pnt(theVertices[0]);
|
||||||
thePnt[1] = BRep_Tool::Pnt(theVertices[1]);
|
thePnt[1] = BRep_Tool::Pnt(theVertices[1]);
|
||||||
@ -1217,11 +1212,13 @@ void FindInternalIntersections(const TopoDS_Edge& theEdge,
|
|||||||
LastVertex.Orientation(TopAbs_REVERSED);
|
LastVertex.Orientation(TopAbs_REVERSED);
|
||||||
|
|
||||||
TopoDS_Shape aLocalShape = theEdge.EmptyCopied();
|
TopoDS_Shape aLocalShape = theEdge.EmptyCopied();
|
||||||
|
TopAbs_Orientation anOrient = aLocalShape.Orientation();
|
||||||
|
aLocalShape.Orientation(TopAbs_FORWARD);
|
||||||
TopoDS_Edge NewEdge = TopoDS::Edge(aLocalShape);
|
TopoDS_Edge NewEdge = TopoDS::Edge(aLocalShape);
|
||||||
BB.Range(NewEdge, FirstPar, LastPar);
|
BB.Range(NewEdge, FirstPar, LastPar);
|
||||||
BB.Add(NewEdge, FirstVertex);
|
BB.Add(NewEdge, FirstVertex);
|
||||||
BB.Add(NewEdge, LastVertex);
|
BB.Add(NewEdge, LastVertex);
|
||||||
|
NewEdge.Orientation(anOrient);
|
||||||
NewEdges.Append(NewEdge);
|
NewEdges.Append(NewEdge);
|
||||||
FirstVertex = LastVertex;
|
FirstVertex = LastVertex;
|
||||||
FirstPar = LastPar;
|
FirstPar = LastPar;
|
||||||
|
31
tests/bugs/modalg_5/bug25106
Executable file
31
tests/bugs/modalg_5/bug25106
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC25106"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
#######################################################################
|
||||||
|
# Command "splitshape" does not split attached face by attached edge
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug25106_bad_split4.brep] c1
|
||||||
|
|
||||||
|
explode c1
|
||||||
|
|
||||||
|
splitshape result c1_1 c1_1 c1_2
|
||||||
|
|
||||||
|
set square 100
|
||||||
|
|
||||||
|
set nb_v_good 12
|
||||||
|
set nb_e_good 16
|
||||||
|
set nb_w_good 5
|
||||||
|
set nb_f_good 5
|
||||||
|
set nb_sh_good 1
|
||||||
|
set nb_sol_good 0
|
||||||
|
set nb_compsol_good 0
|
||||||
|
set nb_compound_good 0
|
||||||
|
set nb_shape_good 39
|
||||||
|
|
||||||
|
vinit
|
||||||
|
vdisplay result
|
||||||
|
vsetdispmode 0
|
||||||
|
vfit
|
||||||
|
set only_screen 1
|
Loading…
x
Reference in New Issue
Block a user