1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0021753: Visualization - improve shaded display of conical objects

Modified cone mesh subdivision parameters.
This commit is contained in:
drochalo 2024-04-05 17:21:01 +01:00
parent 2956d432e2
commit 0cf4da2a8f
8 changed files with 16 additions and 14 deletions

View File

@ -36,12 +36,14 @@ std::pair<Standard_Real, Standard_Real> BRepMesh_ConeRangeSplitter::GetSplitStep
Abs(aRefR + aRangeV.second * Sin(aSAng)));
Standard_Real Dv, Du = GCPnts_TangentialDeflection::ArcAngularStep(
aRadius, GetDFace()->GetDeflection(),
aRadius, GetDFace()->GetDeflection() * 0.5,
theParameters.Angle, theParameters.MinSize);
const Standard_Real aDiffU = aRangeU.second - aRangeU.first;
const Standard_Real aDiffV = aRangeV.second - aRangeV.first;
const Standard_Real aScale = (Du * aRadius);
//compute subdivision factor acounting for the parameters minimum size
const Standard_Real aSubDivFactor = Max (theParameters.MinSize, 1.0);
const Standard_Real aScale = (Du * aRadius / aSubDivFactor);
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);

View File

@ -11,7 +11,7 @@ renamevar a_1 result
incmesh result 0.0001 -a 30 -force_face_def -parallel
checktrinfo result -tri 14058 -nod 9292 -defl 0.00031502118964205414 -tol_abs_defl 1e-6
checktrinfo result -tri 14926 -nod 9726 -defl 0.00028360162213471898 -tol_abs_defl 1e-6
vinit
vsetdispmode 1

View File

@ -15,6 +15,6 @@ vfit
vsetdispmode 1
XGetOneShape result Q
checktrinfo result -tri 9097 -nod 6634
checktrinfo result -tri 9223 -nod 6699
checkview -screenshot -3d -path ${imagedir}/${test_image}.png

View File

@ -14,6 +14,6 @@ XGetOneShape result Q
incmesh result 0.00039624 -a 20 -min 0.0001 -parallel
checktrinfo result -tri 7733 -nod 5882
checktrinfo result -tri 7743 -nod 5887
checkview -display result -3d -path ${imagedir}/${test_image}.png

View File

@ -9,6 +9,6 @@ scaleshape result a 0.1
vdisplay result -dispMode 1
vfit
checktrinfo result -tri 168 -nod 133
checktrinfo result -tri 204 -nod 151
checkview -screenshot -3d -path ${imagedir}/${test_image}.png

View File

@ -6,4 +6,4 @@ puts ""
restore [locate_data_file bug32767.brep] s
tclean s
incmesh s 0.01
checktrinfo s -tri 1512 -nod 909 -defl 0.035378595363471328 -tol_abs_defl 1e-6
checktrinfo s -tri 2714 -nod 1512 -defl 0.022574056183562372 -tol_abs_defl 1e-6

View File

@ -9,33 +9,33 @@ restore [locate_data_file bug33050.brep] result
tclean result
incmesh result 0.001
checktrinfo result -tri 27652 -nod 28016 -defl 0.0027132671526737435 -tol_abs_defl 1e-6
checktrinfo result -tri 28676 -nod 28530 -defl 0.0018679881605936205 -tol_abs_defl 1e-6
tclean result
incmesh result 0.001 -surf_def_all
checktrinfo result -tri 30102 -nod 29241 -defl 0.0010301984083541042 -tol_abs_defl 1e-6
checktrinfo result -tri 28682 -nod 28533 -defl 0.0010290003062228719 -tol_abs_defl 1e-6
################## Deflection: 0.0001 #################
tclean result
incmesh result 0.0001
checktrinfo result -tri 88140 -nod 84304 -defl 0.00073349807253346574 -tol_abs_defl 1e-6
checktrinfo result -tri 96006 -nod 88241 -defl 0.00043153032084638013 -tol_abs_defl 1e-6
tclean result
incmesh result 0.0001 -surf_def_all
checktrinfo result -tri 103376 -nod 91922 -defl 0.00012553867394267057 -tol_abs_defl 1e-6
checktrinfo result -tri 117766 -nod 99121 -defl 0.0002009725495247413 -tol_abs_defl 1e-6
################## Deflection: 0.00005 ################
tclean result
incmesh result 0.00005
checktrinfo result -tri 127538 -nod 119773 -defl 0.00043153032084638013 -tol_abs_defl 1e-6
checktrinfo result -tri 141582 -nod 126799 -defl 0.00030400570138159119 -tol_abs_defl 1e-6
tclean result
incmesh result 0.00005 -surf_def_all
checktrinfo result -tri 154246 -nod 133127 -defl 5.1157129731636775e-05 -tol_abs_defl 1e-6
checktrinfo result -tri 179002 -nod 145509 -defl 5.0570798687477583e-05 -tol_abs_defl 1e-6

View File

@ -15,6 +15,6 @@ vclear
isos result 0
triangles result
checktrinfo result -tri 103 -nod 105
checktrinfo result -tri 125 -nod 116
checkprops result -s 150.283
checkview -display result -3d -path ${imagedir}/${test_image}.png