New formula to calculate number of points along V axis of a cone depending on ratio of its size along V and U.
const Standard_Real aDiffU = aRangeU.second - aRangeU.first;
const Standard_Real aDiffV = aRangeV.second - aRangeV.first;
- Standard_Integer nbU = (Standard_Integer) (aDiffU / Du);
- Standard_Integer nbV = (Standard_Integer) (nbU * (aDiffV) / (aDiffU * aRadius));
+ const Standard_Real aScale = (Du * aRadius);
+ const Standard_Real aRatio = Max(1., Log(aDiffV / aScale));
+ const Standard_Integer nbU = (Standard_Integer)(aDiffU / Du);
+ const Standard_Integer nbV = (Standard_Integer)(aDiffV / aScale / aRatio);
+
Du = aDiffU / (nbU + 1);
- Dv = aDiffV / (nbV + 1);
+ Dv = aDiffV / (nbV + static_cast<Standard_Integer>(aRatio));
theStepsNb.first = nbU;
theStepsNb.second = nbV;
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
-checktrinfo result -tri 957 -nod 558 -defl 1.1088499641289298 -tol_abs_defl 1e-6
+checktrinfo result -tri 509 -nod 327 -defl 1.5916215272983552 -tol_abs_defl 1e-6
set log [tricheck result]
if { [llength $log] != 0 } {
incmesh result 0.0001 -a 30 -force_face_def -parallel
-checktrinfo result -tri 13854 -nod 9190 -defl 0.00028360162213471898 -tol_abs_defl 1e-6
+checktrinfo result -tri 12512 -nod 8519 -defl 0.00031502118964205414 -tol_abs_defl 1e-6
vinit
vsetdispmode 1
restore [locate_data_file bug32692.brep] s
incmesh s 0.01 -parallel
-checktrinfo s -nod 7511 -tri 7625 -empty 9 -face 309
+checktrinfo s -nod 7427 -tri 7457 -empty 9 -face 309
restore [locate_data_file bug32767.brep] s
tclean s
incmesh s 0.01
-checktrinfo s -tri 3220 -nod 1770 -defl 0.018398669654253779 -tol_abs_defl 1e-6
\ No newline at end of file
+checktrinfo s -tri 1512 -nod 909 -defl 0.035378595363471328 -tol_abs_defl 1e-6
\ No newline at end of file
--- /dev/null
+puts "========="
+puts "OCC32982: Mesh - Meshing the shape takes too long and visualization is bad"
+puts "========="
+puts ""
+
+restore [locate_data_file bug32982.brep] result
+incmesh result 5.58
+
+checktrinfo result -nod 4036 -tri 7450
+
+vinit
+vdefaults -autoTriang 0
+vdisplay result
+vsetdispmode 1
+vfit
+vpan -5 198
+vzoom 150
+
+checkview -screenshot -3d -path ${imagedir}/${test_image}.png
--- /dev/null
+puts "========="
+puts "OCC32982: Mesh - Meshing the shape takes too long and visualization is bad"
+puts "========="
+puts ""
+
+restore [locate_data_file bug32982.brep] result
+
+tscale result 9.7978019714355504 25.567642604431001 42.7875250671255 0.001
+incmesh result 0.00558
+
+checktrinfo result -nod 4036 -tri 7450
+
+vinit
+vdefaults -autoTriang 0
+vdisplay result
+vsetdispmode 1
+vfit
+vpan -5 198
+vzoom 150
+
+checkview -screenshot -3d -path ${imagedir}/${test_image}.png