mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0031031: Incorrect result is returned from BRepPrimAPI_MakePrism::Generated()
1. src\BRepSweep\BRepSweep_NumLinearRegularSweep.cxx Fix bug by adding result in list of generated shapes, if initial shape is vertex, edge or face. 2. src\BRepLib\BRepLib.cxx Add protection against treatment not geometric edge in BRepLib::UpdateInnerTolerances(...) 3. Add test case for bug and correct test for bug 30346 according to new behavior of algorithm
This commit is contained in:
parent
780fbc2897
commit
44fafc477f
@ -1831,6 +1831,12 @@ void BRepLib::UpdateInnerTolerances(const TopoDS_Shape& aShape)
|
||||
for (Standard_Integer i = 1; i <= EFmap.Extent(); i++)
|
||||
{
|
||||
TopoDS_Edge anEdge = TopoDS::Edge(EFmap.FindKey(i));
|
||||
|
||||
if (!BRep_Tool::IsGeometric(anEdge))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
TopoDS_Vertex V1, V2;
|
||||
TopExp::Vertices(anEdge, V1, V2);
|
||||
Standard_Real fpar, lpar;
|
||||
|
@ -578,5 +578,12 @@ Standard_Boolean BRepSweep_NumLinearRegularSweep::GenIsUsed(const TopoDS_Shape&
|
||||
Standard_Integer iGenS = myGenShapeTool.Index(aGenS);
|
||||
Standard_OutOfRange_Raise_if(iGenS == 0,
|
||||
"BRepSweep_NumLinearRegularSweep::GenIsUsed: shape index = 0")
|
||||
return myBuiltShapes(iGenS, 1) && myUsedShapes(iGenS, 1);
|
||||
if (iGenS == 1)
|
||||
{
|
||||
return myBuiltShapes(iGenS, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return myBuiltShapes(iGenS, 1) && myUsedShapes(iGenS, 1);
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ mkface f1 s 0 2*pi 0.785398163397448 1.5707963267949
|
||||
prism r1 f1 0 0 2
|
||||
savehistory h1
|
||||
set s1 [dump h1]
|
||||
if { !([regexp "0 Deleted" $s1] && [regexp "2 Generated" $s1])} {
|
||||
if { !([regexp "0 Deleted" $s1] && [regexp "3 Generated" $s1])} {
|
||||
puts "Error: wrong history h1"
|
||||
}
|
||||
#
|
||||
@ -18,6 +18,6 @@ mkface f2 s 0 5 0.785398163397448 1.5707963267949
|
||||
prism r2 f2 0 0 2
|
||||
savehistory h2
|
||||
set s2 [dump h2]
|
||||
if { !([regexp "0 Deleted" $s2] && [regexp "6 Generated" $s2])} {
|
||||
if { !([regexp "0 Deleted" $s2] && [regexp "7 Generated" $s2])} {
|
||||
puts "Error: wrong history h2"
|
||||
}
|
||||
|
15
tests/bugs/modalg_7/bug31031
Normal file
15
tests/bugs/modalg_7/bug31031
Normal file
@ -0,0 +1,15 @@
|
||||
puts "========"
|
||||
puts "0031031: Incorrect result is returned from BRepPrimAPI_MakePrism::Generated()"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
pload MODELING
|
||||
|
||||
vertex v1 0 0 0
|
||||
prism r1 v1 0 0 2
|
||||
savehistory h1
|
||||
set s1 [dump h1]
|
||||
if { !([regexp "0 Deleted" $s1] && [regexp "1 Generated" $s1])} {
|
||||
puts "Error: wrong history h1"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user