mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0031853: Mesh - holes in triangulation with large linear deflection
0030442: Mesh - broken triangulation on pipe shape Scale down min size parameter for NURBS taking into account its U and V resolution in order to prevent comparison of 2d parameters with 3d value involved in filtering process.
This commit is contained in:
parent
c4ea4ca3d1
commit
a939fd40eb
@ -553,12 +553,17 @@ Handle(IMeshData::SequenceOfReal) BRepMesh_NURBSRangeSplitter::computeGrainAndFi
|
||||
aMinDiff /= theDelta;
|
||||
}
|
||||
|
||||
aMinDiff = Max(theParameters.MinSize, aMinDiff);
|
||||
const Handle(BRepAdaptor_Surface)& aSurface = GetSurface();
|
||||
const Standard_Real aMinSize2d = Max(
|
||||
aSurface->UResolution(theParameters.MinSize),
|
||||
aSurface->UResolution(theParameters.MinSize));
|
||||
|
||||
aMinDiff = Max(aMinSize2d, aMinDiff);
|
||||
|
||||
const Standard_Real aDiffMaxLim = 0.1 * theRangeDiff;
|
||||
const Standard_Real aDiffMinLim = Max(0.005 * theRangeDiff,
|
||||
2. * theTol2d);
|
||||
const Standard_Real aDiff = Max(theParameters.MinSize,
|
||||
const Standard_Real aDiff = Max(aMinSize2d,
|
||||
Min(aDiffMaxLim, aDiffMinLim));
|
||||
return filterParameters(theSourceParams, aMinDiff, aDiff, theAllocator);
|
||||
}
|
||||
|
@ -12,5 +12,5 @@ tclean result
|
||||
incmesh result 0.1
|
||||
triangles result
|
||||
|
||||
checktrinfo result -tri 736 -nod 613
|
||||
checktrinfo result -tri 748 -nod 619
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||
|
@ -13,6 +13,6 @@ vdisplay result
|
||||
vsetdispmode result 1
|
||||
vfit
|
||||
|
||||
checktrinfo result -tri 202 -nod 216
|
||||
checktrinfo result -tri 278 -nod 254
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||
|
@ -14,6 +14,6 @@ vdisplay result
|
||||
vsetdispmode result 1
|
||||
vfit
|
||||
|
||||
checktrinfo result -tri 3496 -nod 3005
|
||||
checktrinfo result -tri 3552 -nod 3033
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||
|
@ -17,7 +17,7 @@ vdefaults -autoTriang 0
|
||||
vdisplay result
|
||||
vfit
|
||||
|
||||
set rel_tol 0.6928018366802983
|
||||
set rel_tol 0.7607262575544315
|
||||
set max_rel_tol_diff 0.001
|
||||
set area_eps 1
|
||||
|
||||
|
@ -14,7 +14,7 @@ vdisplay result
|
||||
vfit
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
||||
checktrinfo result -tri 3828 -nod 4771 -defl 3.0544822246414993 -tol_abs_defl 1e-6
|
||||
checktrinfo result -tri 3832 -nod 4773 -defl 3.0509255143612428 -tol_abs_defl 1e-6
|
||||
|
||||
set log [tricheck result]
|
||||
if { [llength $log] != 0 } {
|
||||
|
@ -19,7 +19,7 @@ incmesh result 0.59
|
||||
vdisplay result -redisplay
|
||||
vfit
|
||||
|
||||
checktrinfo result -tri 1235
|
||||
checktrinfo result -tri 1863
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}-1.png
|
||||
|
||||
tclean result
|
||||
@ -27,7 +27,7 @@ incmesh result 0.59 -a 11.45
|
||||
vdisplay result -redisplay
|
||||
vfit
|
||||
|
||||
checktrinfo result -tri 6438
|
||||
checktrinfo result -tri 6422
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}-2.png
|
||||
|
||||
tclean result
|
||||
@ -35,6 +35,6 @@ incmesh result 0.59 -a 11.45 -min 0.035
|
||||
vdisplay result -redisplay
|
||||
vfit
|
||||
|
||||
checktrinfo result -tri 7079
|
||||
checktrinfo result -tri 6427
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}-3.png
|
||||
|
||||
|
@ -16,6 +16,6 @@ if { [llength $log] != 0 } {
|
||||
puts "Mesh is OK"
|
||||
}
|
||||
|
||||
checktrinfo result -tri 148 -nod 103 -defl 0.34778084099529977 -tol_abs_defl 1e-6
|
||||
checktrinfo result -tri 156 -nod 107 -defl 0.29785837547864635 -tol_abs_defl 1e-6
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -15,7 +15,7 @@ if { [llength $log1] != 0 } {
|
||||
puts "Mesh is OK"
|
||||
}
|
||||
|
||||
checktrinfo result -tri 2 -nod 4 -defl 5.5579174982152475 -tol_abs_defl 1e-6
|
||||
checktrinfo result -tri 344 -nod 175 -defl 48.278808345584679 -tol_abs_defl 1e-6
|
||||
|
||||
tclean result
|
||||
incmesh result 0.01
|
||||
|
@ -12,6 +12,6 @@ vdisplay result
|
||||
vviewparams -scale 8.46292 -proj 0.653203 -0.644806 0.396926 -up -0.0109833 0.51609 0.856464 -at 347.559 1026.89 219.262 -eye 2080.75 -684.022 1272.45
|
||||
|
||||
tricheck result
|
||||
checktrinfo result -tri 6996 -nod 4899 -defl 8.4394056682382157 -tol_abs_defl 1e-6
|
||||
checktrinfo result -tri 9470 -nod 6136 -defl 4.7757836297551908 -tol_abs_defl 1e-6
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
25
tests/bugs/mesh/bug30442
Normal file
25
tests/bugs/mesh/bug30442
Normal file
@ -0,0 +1,25 @@
|
||||
puts "======="
|
||||
puts "0030442: Mesh - broken triangulation on pipe shape"
|
||||
puts "======="
|
||||
puts ""
|
||||
|
||||
bsmooth aSmoothCurve 1.0 [locate_data_file bug30442_points.txt]
|
||||
|
||||
circle aCircle 0 0 0 1 1 1 20
|
||||
|
||||
mkedge aSpineEdge aSmoothCurve
|
||||
mkedge aProfileEdge aCircle
|
||||
|
||||
wire aSpineWire aSpineEdge
|
||||
wire aProfileWire aProfileEdge
|
||||
|
||||
pipe result aSpineWire aProfileWire
|
||||
|
||||
vinit View1
|
||||
vdisplay result
|
||||
vsetdispmode 1
|
||||
vfit
|
||||
|
||||
checktrinfo result -tri 25814 -nod 12955
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
@ -15,7 +15,7 @@ vdefaults -autoTriang 0
|
||||
|
||||
tclean result
|
||||
incmesh result 0.004 -a 14
|
||||
checktrinfo result -tri 72522 -nod 40927 -defl 0.24607185555570676 -tol_abs_defl 1e-6
|
||||
checktrinfo result -tri 72570 -nod 40951 -defl 0.24607185555570676 -tol_abs_defl 1e-6
|
||||
|
||||
vdisplay result -redisplay
|
||||
vfit
|
||||
@ -23,7 +23,7 @@ checkview -screenshot -3d -path ${imagedir}/${test_image}_default.png
|
||||
|
||||
tclean result
|
||||
incmesh result 0.004 -a 14 -force_face_def
|
||||
checktrinfo result -tri 288022 -nod 148677 -defl 0.16388671063364907 -tol_abs_defl 1e-6
|
||||
checktrinfo result -tri 287990 -nod 148661 -defl 0.16388671063364907 -tol_abs_defl 1e-6
|
||||
|
||||
vdisplay result -redisplay
|
||||
vfit
|
||||
|
17
tests/bugs/mesh/bug31853
Normal file
17
tests/bugs/mesh/bug31853
Normal file
@ -0,0 +1,17 @@
|
||||
puts "======="
|
||||
puts "0031853: Mesh - holes in triangulation with large linear deflection"
|
||||
puts "======="
|
||||
puts ""
|
||||
|
||||
pload MODELING XDE VISUALIZATION
|
||||
|
||||
testreadstep [locate_data_file bug31853_WR16-30.step] result
|
||||
|
||||
incmesh result 1 -a 6
|
||||
checktrinfo result -tri 142834 -nod 72496
|
||||
|
||||
vinit View1
|
||||
vdefaults -autoTriang 0
|
||||
vdisplay -dispMode 1 result
|
||||
vfit
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
@ -3,6 +3,14 @@ puts "0032241: Mesh - wrong shading display of thrusections"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
if { [regexp {Windows} [dversion]] } {
|
||||
set tri_n 2702
|
||||
set nod_n 1399
|
||||
} else {
|
||||
set tri_n 2766
|
||||
set nod_n 1431
|
||||
}
|
||||
|
||||
pload MODELING VISUALIZATION
|
||||
|
||||
circle c0 0 0 0 0 0 1 30
|
||||
@ -28,4 +36,4 @@ thrusections result issolid w0 w1 w2 w3 w4
|
||||
|
||||
checkview -display result -3d -path ${imagedir}/${test_image}.png
|
||||
|
||||
checktrinfo result -tri 2744 -nod 1420
|
||||
checktrinfo result -tri $tri_n -nod $nod_n
|
||||
|
@ -15,6 +15,6 @@ vclear
|
||||
isos result 0
|
||||
triangles result
|
||||
|
||||
checktrinfo result -tri 14 -nod 14
|
||||
checktrinfo result -tri 26 -nod 20
|
||||
checkprops result -s 1.3135
|
||||
checkview -display result -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -18,6 +18,6 @@ vclear
|
||||
isos result 0
|
||||
triangles result
|
||||
|
||||
checktrinfo result -tri 55 -nod 40
|
||||
checktrinfo result -tri 31 -nod 28
|
||||
checkprops result -s 0
|
||||
checkview -display result -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -19,6 +19,6 @@ vsetdispmode result 1
|
||||
isos result 0
|
||||
triangles result
|
||||
|
||||
checktrinfo result -tri 14 -nod 14
|
||||
checktrinfo result -tri 26 -nod 20
|
||||
checkprops result -s 1.3135
|
||||
checkview -display result -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -14,5 +14,5 @@ tclean result
|
||||
set Deflection 1.
|
||||
catch {incmesh result ${Deflection} }
|
||||
|
||||
checktrinfo result -tri 59881 -nod 49987 -defl 1.6213275001104823 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
|
||||
checktrinfo result -tri 60069 -nod 50081 -defl 1.6213275001104823 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||
|
@ -19,5 +19,5 @@ isos result 0
|
||||
triangles result
|
||||
fit
|
||||
|
||||
checktrinfo result -tri 7769 -nod 6295
|
||||
checktrinfo result -tri 10463 -nod 7643
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}_axo.png
|
||||
|
@ -13,5 +13,5 @@ tclean result
|
||||
incmesh result .1
|
||||
triangles result
|
||||
|
||||
checktrinfo result -tri 335 -nod 200
|
||||
checktrinfo result -tri 163 -nod 114
|
||||
checkview -display result -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -9,7 +9,7 @@ writestl m $imagedir/${casename}
|
||||
readstl res $imagedir/${casename}
|
||||
file delete $imagedir/${casename}
|
||||
|
||||
checktrinfo res -tri 110 -nod 57
|
||||
checktrinfo res -tri 116 -nod 60
|
||||
|
||||
# Visual check
|
||||
checkview -display res -2d -path ${imagedir}/${test_image}.png
|
||||
|
@ -1,5 +1,5 @@
|
||||
set viewname "vright"
|
||||
set length 516.649
|
||||
set length 516.281
|
||||
|
||||
testreadstep [locate_data_file bug27341_Adapter_Zylinder_2_CAD.stp] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,5 +1,5 @@
|
||||
set viewname "vright"
|
||||
set length 9546.99
|
||||
set length 9548.13
|
||||
|
||||
testreadstep [locate_data_file bug27341_Assembly_ABS_1_CAD.stp] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,5 +1,5 @@
|
||||
set viewname "vright"
|
||||
set length 5502.06
|
||||
set length 5497.6
|
||||
|
||||
testreadstep [locate_data_file bug27341_Assembly_BILZ_WFL2_1_CAD.stp] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,5 +1,5 @@
|
||||
set viewname "vright"
|
||||
set length 5102.18
|
||||
set length 5101.26
|
||||
|
||||
testreadstep [locate_data_file bug27341_Assembly_GMS_Kurz_CAD.stp] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,5 +1,5 @@
|
||||
set viewname "vright"
|
||||
set length 1662.85
|
||||
set length 1662.87
|
||||
|
||||
testreadstep [locate_data_file bug27341_CCS_Adapter_CAD.stp] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,5 +1,5 @@
|
||||
set viewname "vright"
|
||||
set length 2239.23
|
||||
set length 2239.26
|
||||
|
||||
testreadstep [locate_data_file bug27341_CCT_PMK_32_L_o_CAD.stp] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,5 +1,5 @@
|
||||
set viewname "vright"
|
||||
set length 1704.87
|
||||
set length 1704.6
|
||||
|
||||
testreadstep [locate_data_file bug27341_Drehkopf_HSK_Gewinde_R_CAD.stp] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,7 +1,5 @@
|
||||
puts "TODO OCC30286 ALL: Error : The length of result shape is 2705.91, expected 2765.47"
|
||||
|
||||
set viewname "vright"
|
||||
set length 2765.47
|
||||
set length 2711.37
|
||||
|
||||
testreadstep [locate_data_file bug27341_82-01_Solid_End_Mill_Radius_with_Shrink_Fit_and_extension_HeavyModel.stp] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,7 +1,5 @@
|
||||
puts "TODO OCC30286 ALL: Error : The length of result shape is 1723.\\d+, expected 1721.69"
|
||||
|
||||
set viewname "vright"
|
||||
set length 1721.69
|
||||
set length 1718.9
|
||||
|
||||
testreadstep [locate_data_file bug27341_ABS_Adapter_CAD.stp] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,5 +1,5 @@
|
||||
set viewname "vright"
|
||||
set length 2832.69
|
||||
set length 2832.05
|
||||
|
||||
testreadstep [locate_data_file bug27341_ABS_Grundhalter_CAD.stp] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,5 +1,5 @@
|
||||
set viewname "vright"
|
||||
set length 2261.22
|
||||
set length 2261.81
|
||||
|
||||
testreadstep [locate_data_file bug27341_AIF_Grundhalter_GR1_CAD.stp] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -6,7 +6,7 @@ puts ""
|
||||
puts "REQUIRED All: Meshing statuses: SelfIntersectingWire Failure"
|
||||
|
||||
set viewname "vfront"
|
||||
set length 26881.1
|
||||
set length 26411.7
|
||||
|
||||
restore [locate_data_file bug23625_a1.brep] a
|
||||
|
||||
|
@ -4,7 +4,7 @@ puts "============"
|
||||
puts ""
|
||||
|
||||
set viewname "vfront"
|
||||
set length 27461.9
|
||||
set length 27126.9
|
||||
|
||||
restore [locate_data_file bug23625_a2.brep] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -4,7 +4,7 @@ puts "============"
|
||||
puts ""
|
||||
|
||||
set viewname "vtop"
|
||||
set length 19259.1
|
||||
set length 19649
|
||||
|
||||
restore [locate_data_file bug23625_a3.brep] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,12 +1,10 @@
|
||||
puts "TODO OCC30286 ALL: Error : The length of result shape is 12.\\d+, expected 12."
|
||||
|
||||
puts "========================================================================"
|
||||
puts "OCC27979: Parasolid converted BREP shows weird lines on hidden line Algo"
|
||||
puts "========================================================================"
|
||||
puts ""
|
||||
|
||||
set viewname "vtop"
|
||||
set length 12.
|
||||
set length 13.0106
|
||||
|
||||
restore [locate_data_file bug27979_parsed.brep] a
|
||||
COMPUTE_HLR $viewname $algotype
|
||||
|
@ -1,6 +1,6 @@
|
||||
set TheFileName shading_wrongshape_026.brep
|
||||
if { [string compare $command "shading"] == 0 } {
|
||||
set rel_tol 0.08526389274308782
|
||||
set rel_tol 0.1487107687729918
|
||||
} else {
|
||||
set rel_tol 0.0020125629706199506
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ set TheFileName shading_wrongshape_030.brep
|
||||
set bug_cross "OCC22687"
|
||||
set nbcross(All) 4
|
||||
if { [string compare $command "shading"] == 0 } {
|
||||
set rel_tol 0.5225697108844659
|
||||
set rel_tol 0.48575382373356474
|
||||
} else {
|
||||
set rel_tol 0.1856053577754922
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user