Files
OCCT/tests/helix/begin
Pasukhin Dmitry 9f761b12ec Modeling - Implement new Helix Toolkit (#648)
- Adds a complete TKHelix toolkit with geometric helix curve adaptor and topological builders
- Implements advanced B-spline approximation algorithms for high-quality helix representation
- Provides comprehensive TCL command interface for interactive helix creation and testing
2025-07-28 12:51:16 +01:00

49 lines
1.4 KiB
Plaintext

if { [array get Draw_Groups "TOPOLOGY Check commands"] == "" } {
pload XDE
pload TOPTEST
pload VISUALIZATION
}
# to prevent loops limit to 16 minutes
cpulimit 1000
if { [info exists imagedir] == 0 } {
set imagedir .
}
if { [info exists test_image] == 0 } {
set test_image photo
}
proc CheckSweep {} {
global s1 s2 result
checkshape s1
checkshape s2
mksweep s1
addsweep s2
set bad_buildsweep 0
if [catch { buildsweep result -S } catch_result] {
puts "Faulty OCC1477 : buildsweep is wrong"
} else {
checkshape result
}
}
proc CheckSpiral {} {
global result good_Center_X good_Center_Y good_Center_Z good_Moments_IX set good_Moments_IY good_Moments_IZ
set llprops [lprops result]
regexp {[ \t]*X =[ \t]*([-0-9.+eE]+)} $llprops full Center_X
regexp {[ \t]*Y =[ \t]*([-0-9.+eE]+)} $llprops full Center_Y
regexp {[ \t]*Z =[ \t]*([-0-9.+eE]+)} $llprops full Center_Z
regexp {[ \t]*IX =[ \t]*([-0-9.+eE]+)} $llprops full Moments_IX
regexp {[ \t]*IY =[ \t]*([-0-9.+eE]+)} $llprops full Moments_IY
regexp {[ \t]*IZ =[ \t]*([-0-9.+eE]+)} $llprops full Moments_IZ
if { $good_Center_X != $Center_X ||
$good_Center_Y != $Center_Y ||
$good_Center_Z != $Center_Z ||
$good_Moments_IX != $Moments_IX ||
$good_Moments_IY != $Moments_IY ||
$good_Moments_IZ != $Moments_IZ } {
puts "Error : CheckSpiral"
}
}