mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0027272: FixMissingSeam function creates G1 seam curves
Method BRepLib::EncodeRegularity() is improved to set regularity GeomAbs_CN for edges lying on the same-domain surfaces (where derivatives on both surfaces are equal in all points). DRAW command getedgeregularity is added to query regularity of the edge on specified faces. DRAW command edgeregul is removed (this functionality is provided by command encoderegularity). Added tests: bugs modalg_6 bug27272, bug27383_1, bug27383_2 Correction of shape name in test case for issue CR27272
This commit is contained in:
17
tests/bugs/modalg_6/bug27272
Normal file
17
tests/bugs/modalg_6/bug27272
Normal file
@@ -0,0 +1,17 @@
|
||||
puts "========"
|
||||
puts "0027272: FixMissingSeam function creates G1 seam curves"
|
||||
puts "========"
|
||||
puts ""
|
||||
puts "Check regularity setting after FixMissingSeam (original problem)"
|
||||
|
||||
restore [locate_data_file bug27272_SeamTest_unfixed.brep] a
|
||||
fixshape res a 1.e-7 1.
|
||||
encoderegularity res
|
||||
|
||||
explode res f
|
||||
explode res_3 e
|
||||
explode res_4 e
|
||||
if { ! [regexp "CN" [getedgeregularity res_3_2 res_3]] ||
|
||||
! [regexp "CN" [getedgeregularity res_4_2 res_4]] } {
|
||||
puts "Error: Invalid regularity of the seam edge, expected CN"
|
||||
}
|
29
tests/bugs/modalg_6/bug27383_1
Normal file
29
tests/bugs/modalg_6/bug27383_1
Normal file
@@ -0,0 +1,29 @@
|
||||
puts "========"
|
||||
puts "0027383: Modeling - improve handling of regularity on edges"
|
||||
puts "========"
|
||||
puts ""
|
||||
puts "Check regularity setting on edges between same-domain faces after fuse"
|
||||
|
||||
# fuse of two boxes
|
||||
pload MODELING
|
||||
box b1 10 10 10
|
||||
box b2 5 5 0 10 10 10
|
||||
bfuse r b1 b2
|
||||
explode r f
|
||||
explode r_7 e
|
||||
getedgeregularity r_7_3 r_3 r_7 ;# returns C0: regularity is not set at all
|
||||
encoderegularity r
|
||||
|
||||
explode res f
|
||||
explode res_3 e
|
||||
explode res_4 e
|
||||
if { ! [regexp "CN" [getedgeregularity r_7_3 r_3 r_7]] } {
|
||||
puts "Error: Invalid regularity of the edge, expected CN"
|
||||
}
|
||||
|
||||
# make image in HLR mode as illustration
|
||||
pload VISUALIZATION
|
||||
vdisplay r
|
||||
vfit
|
||||
vhlr on
|
||||
vdump ${imagedir}/${test_image}.png
|
25
tests/bugs/modalg_6/bug27383_2
Normal file
25
tests/bugs/modalg_6/bug27383_2
Normal file
@@ -0,0 +1,25 @@
|
||||
puts "========"
|
||||
puts "0027383: Modeling - improve handling of regularity on edges"
|
||||
puts "========"
|
||||
puts ""
|
||||
puts "Check regularity setting on edges of cylinder split by angle"
|
||||
|
||||
# split of cylinder
|
||||
pload MODELING
|
||||
pcylinder p 2 10
|
||||
DT_SplitAngle r p
|
||||
|
||||
explode r f
|
||||
explode r_1 e
|
||||
getedgeregularity r_1_2 r_1 r_2 ;# returns C0: regularity is not set at all
|
||||
encoderegularity r
|
||||
if { ! [regexp "CN" [getedgeregularity r_1_2 r_1 r_2]] } {
|
||||
puts "Error: Invalid regularity of the edge, expected CN"
|
||||
}
|
||||
|
||||
# make image in HLR mode as illustration
|
||||
pload VISUALIZATION
|
||||
vdisplay r
|
||||
vfit
|
||||
vhlr on
|
||||
vdump ${imagedir}/${test_image}.png
|
Reference in New Issue
Block a user