mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0032964: Modeling Algorithms - 2d Offset sometimes 'split' straight edges
Implemented avoiding force cut of an edge in case of simple edge (that contains just 1 curve).
This commit is contained in:
parent
17d27a772d
commit
9c84b526cd
@ -1198,7 +1198,9 @@ void BRepFill_OffsetWire::PrepareSpine()
|
||||
// Cut
|
||||
TopoDS_Shape aLocalShape = E.Oriented(TopAbs_FORWARD);
|
||||
// Modified by Sergey KHROMOV - Thu Nov 16 17:29:29 2000 Begin
|
||||
if (nbEdges == 2 && nbResEdges == 0)
|
||||
Handle(BRep_TEdge) TEdge = Handle(BRep_TEdge)::DownCast(E.TShape());
|
||||
const Standard_Integer aNumCurvesInEdge = TEdge->Curves().Size();
|
||||
if (nbEdges == 2 && nbResEdges == 0 && aNumCurvesInEdge > 1)
|
||||
ForcedCut = 1;
|
||||
// Modified by Sergey KHROMOV - Thu Nov 16 17:29:33 2000 End
|
||||
nbResEdges = CutEdge (TopoDS::Edge(aLocalShape), mySpine, ForcedCut, Cuts);
|
||||
|
@ -17,7 +17,7 @@ if [catch { openoffset resoffset a 5 5 i } ] {
|
||||
checkshape result
|
||||
checksection result
|
||||
|
||||
checknbshapes result -vertex 4 -edge 3 -wire 1 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 0 -shape 8
|
||||
checknbshapes result -vertex 3 -edge 2 -wire 1 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 0 -shape 6
|
||||
}
|
||||
|
||||
smallview
|
||||
|
14
tests/bugs/modalg_8/bug32964
Normal file
14
tests/bugs/modalg_8/bug32964
Normal file
@ -0,0 +1,14 @@
|
||||
puts "============="
|
||||
puts "0032964: Modeling Algorithms - 2d Offset sometimes 'split' straight edges"
|
||||
puts "============="
|
||||
|
||||
pload MODELING
|
||||
vertex p1 -90 40 0
|
||||
vertex p2 40 40 0
|
||||
vertex p3 40 -90 0
|
||||
edge e1 p1 p2
|
||||
edge e2 p2 p3
|
||||
wire w1 e1 e2
|
||||
openoffset oo w1 1 40
|
||||
checknbshapes oo_1 -vertex 3 -edge 2 -wire 1 -shape 6
|
||||
checkview -display oo_1 -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user