mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-13 02:39:19 +08:00
Select3D_SensitiveCircle now inherits directly from Select3D_SensitiveEntity.
The sensitive circle sector is created using the Select3D_SensitivePoly class directly.
Added appropriate methods for selecting sensitive circles.
Added parameter myIsHollow to Select3D_SensitiveCylinder class.
It allows you to search for intersections with cylinders without covers.
The Draw vcircle command has been extended with UStart and UEnd parameters
to create a sector of a circle.
Added tests: vselect/cone_cylinder/circle_sector
vselect/cone_cylinder/circle_wire
vselect/cone_cylinder/filled_circle
vselect/cone_cylinder/transformed
vselect/cone_cylinder/hollow_cone_cyl
62 lines
2.6 KiB
Plaintext
62 lines
2.6 KiB
Plaintext
puts "================================="
|
|
puts "0032547: Visualization, Select3D_SensitiveCylinder - implement picking of a hollow cylinder"
|
|
puts " "
|
|
puts "================================="
|
|
|
|
pload MODELING VISUALIZATION
|
|
pcone cone 10 5 10
|
|
trotate cone 0 0 0 1 1 0 30
|
|
ttranslate cone 15 15 0
|
|
|
|
pcylinder cyl 7 7
|
|
trotate cyl 0 0 0 1 1 0 30
|
|
|
|
explode cyl F
|
|
explode cone F
|
|
|
|
vdisplay -dispmode 1 cyl_1 cone_1
|
|
|
|
vaxo
|
|
vfit
|
|
|
|
vselect 60 220 140 220 140 190 60 190 -allowoverlap 0
|
|
if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should not be detected" }
|
|
|
|
vselect 60 220 140 220 140 190 60 190 -allowoverlap 1
|
|
if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should not be detected" }
|
|
|
|
vselect 60 220 140 190 -allowoverlap 0
|
|
if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should not be detected" }
|
|
|
|
vselect 60 220 140 190 -allowoverlap 1
|
|
if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should not be detected" }
|
|
|
|
vselect 270 210 310 210 310 160 270 160 -allowoverlap 0
|
|
if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should not be detected" }
|
|
|
|
vselect 270 210 310 210 310 160 270 160 -allowoverlap 1
|
|
if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should not be detected" }
|
|
|
|
vselect 270 210 310 160 -allowoverlap 0
|
|
if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should not be detected" }
|
|
|
|
vselect 270 210 310 160 -allowoverlap 1
|
|
if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should not be detected" }
|
|
|
|
|
|
vselect 60 210 310 210 310 200 60 200 -allowoverlap 0
|
|
if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]]} { puts "Error: cone should not be detected" }
|
|
|
|
vselect 60 210 310 210 310 200 60 200 -allowoverlap 1
|
|
if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]]
|
|
&& [string first "Select3D_SensitiveCylinder" [vstate -entities]]
|
|
!= [string last "Select3D_SensitiveCylinder" [vstate -entities]]} { puts "Error: cone should be detected" }
|
|
|
|
vselect 60 210 310 200 -allowoverlap 0
|
|
if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should not be detected" }
|
|
|
|
vselect 60 210 310 200 -allowoverlap 1
|
|
if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]]
|
|
&& [string first "Select3D_SensitiveCylinder" [vstate -entities]]
|
|
!= [string last "Select3D_SensitiveCylinder" [vstate -entities]] } { puts "Error: cone should be detected" }
|