📄 test9.di
字号:
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
-----> # QMG test 9: an object like a hex nut with a triangular crack.
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
-----> # Make the brep 'from scratch'.
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
# get a 6-segment circle approximation.
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
global PI
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
-----> global gm_brep_type_code
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
gmset {nodes1 scrap} [gm_circ_approx 0 2*$PI 6]
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
set cplist {}
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
# make a list of control points for the object.
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
-----> # Control pts 0-17 are 18 control points for the inner circle
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
-----> # of the bottom surface
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
set nheight .3
.3
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
for {set i 0} {$i < 18} {incr i} {
set ci [lindex $nodes1 $i]
lappend cplist [lindex $ci 0]
lappend cplist [lindex $ci 1]
lappend cplist -$nheight
}
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
# Control pts 18-35 are 18 control points for the inner circle
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
-----> # of the top surface
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
for {set i 0} {$i < 18} {incr i} {
set ci [lindex $nodes1 $i]
lappend cplist [lindex $ci 0]
lappend cplist [lindex $ci 1]
lappend cplist $nheight
}
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
# Control pts 36-53 are 18 control points for the outer hexagon
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
-----> # of the bottom surface
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
for {set i 0} {$i < 6} {incr i} {
set sp [list [expr cos(2*$PI*$i/6)] [expr sin(2*$PI*$i/6)]]
set ep [list [expr cos(2*$PI*($i+1)/6)] [expr sin(2*$PI*($i+1)/6)]]
for {set j 0} {$j < 3} {incr j} {
set wt2 [expr 1.7*$j / 3]
set wt1 [expr 1.7*(3 - $j)/3]
lappend cplist [expr $wt1*[lindex $sp 0] + $wt2*[lindex $ep 0]]
lappend cplist [expr $wt1*[lindex $sp 1] + $wt2*[lindex $ep 1]]
lappend cplist -$nheight
}
}
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
# Control pts 54-71 are 18 control points for the outer hexagon
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
-----> # of the top surface
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
for {set i 0} {$i < 6} {incr i} {
set sp [list [expr cos(2*$PI*$i/6)] [expr sin(2*$PI*$i/6)]]
set ep [list [expr cos(2*$PI*($i+1)/6)] [expr sin(2*$PI*($i+1)/6)]]
for {set j 0} {$j < 3} {incr j} {
set wt2 [expr 1.7*$j / 3]
set wt1 [expr 1.7*(3 - $j)/3]
lappend cplist [expr $wt1*[lindex $sp 0] + $wt2*[lindex $ep 0]]
lappend cplist [expr $wt1*[lindex $sp 1] + $wt2*[lindex $ep 1]]
lappend cplist $nheight
}
}
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
# Control pts 72-74 are the control points bounding the crack.
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
lappend cplist -1.3 0 0
1.0 0.0 -.3 1.0000000000000002 0.3568220897730896 -.3 0.80901699437494801 0.68761435889789313 -.3 0.50000000000000089 0.86602540378443815 -.3 0.19098300562505391 1.0444364486709834 -.3 -0.19098300562505077 1.0444364486709841 -.3 -0.49999999999999828 0.8660254037844396 -.3 -0.80901699437494579 0.68761435889789557 -.3 -0.99999999999999911 0.35682208977309243 -.3 -1.0 2.7869958944826134e-015 -.3 -1.0000000000000011 -0.35682208977308688 -.3 -0.80901699437495012 -0.68761435889789069 -.3 -0.50000000000000344 -0.8660254037844366 -.3 -0.19098300562505705 -1.0444364486709827 -.3 0.19098300562504739 -1.0444364486709845 -.3 0.49999999999999545 -0.86602540378444126 -.3 0.80901699437494368 -0.68761435889789813 -.3 0.99999999999999778 -0.35682208977309615 -.3 1.0 0.0 .3 1.0000000000000002 0.3568220897730896 .3 0.80901699437494801 0.68761435889789313 .3 0.50000000000000089 0.86602540378443815 .3 0.19098300562505391 1.0444364486709834 .3 -0.19098300562505077 1.0444364486709841 .3 -0.49999999999999828 0.8660254037844396 .3 -0.80901699437494579 0.68761435889789557 .3 -0.99999999999999911 0.35682208977309243 .3 -1.0 2.7869958944826134e-015 .3 -1.0000000000000011 -0.35682208977308688 .3 -0.80901699437495012 -0.68761435889789069 .3 -0.50000000000000344 -0.8660254037844366 .3 -0.19098300562505705 -1.0444364486709827 .3 0.19098300562504739 -1.0444364486709845 .3 0.49999999999999545 -0.86602540378444126 .3 0.80901699437494368 -0.68761435889789813 .3 0.99999999999999778 -0.35682208977309615 .3 1.7 0.0 -.3 1.4166666666666672 0.49074772881118162 -.3 1.1333333333333342 0.98149545762236323 -.3 0.85000000000000153 1.4722431864335448 -.3 0.28333333333333532 1.4722431864335457 -.3 -0.28333333333333083 1.4722431864335466 -.3 -0.84999999999999709 1.4722431864335472 -.3 -1.1333333333333313 0.98149545762236667 -.3 -1.4166666666666656 0.49074772881118611 -.3 -1.7 5.4928446773655488e-015 -.3 -1.4166666666666685 -0.49074772881117706 -.3 -1.1333333333333373 -0.98149545762235968 -.3 -0.85000000000000586 -1.4722431864335421 -.3 -0.28333333333333977 -1.4722431864335448 -.3 0.28333333333332628 -1.4722431864335475 -.3 0.84999999999999221 -1.4722431864335501 -.3 1.1333333333333282 -0.98149545762237045 -.3 1.4166666666666641 -0.49074772881119072 -.3 1.7 0.0 .3 1.4166666666666672 0.49074772881118162 .3 1.1333333333333342 0.98149545762236323 .3 0.85000000000000153 1.4722431864335448 .3 0.28333333333333532 1.4722431864335457 .3 -0.28333333333333083 1.4722431864335466 .3 -0.84999999999999709 1.4722431864335472 .3 -1.1333333333333313 0.98149545762236667 .3 -1.4166666666666656 0.49074772881118611 .3 -1.7 5.4928446773655488e-015 .3 -1.4166666666666685 -0.49074772881117706 .3 -1.1333333333333373 -0.98149545762235968 .3 -0.85000000000000586 -1.4722431864335421 .3 -0.28333333333333977 -1.4722431864335448 .3 0.28333333333332628 -1.4722431864335475 .3 0.84999999999999221 -1.4722431864335501 .3 1.1333333333333282 -0.98149545762237045 .3 1.4166666666666641 -0.49074772881119072 .3 -1.3 0 0
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
-----> lappend cplist -1.1 0.05 0
1.0 0.0 -.3 1.0000000000000002 0.3568220897730896 -.3 0.80901699437494801 0.68761435889789313 -.3 0.50000000000000089 0.86602540378443815 -.3 0.19098300562505391 1.0444364486709834 -.3 -0.19098300562505077 1.0444364486709841 -.3 -0.49999999999999828 0.8660254037844396 -.3 -0.80901699437494579 0.68761435889789557 -.3 -0.99999999999999911 0.35682208977309243 -.3 -1.0 2.7869958944826134e-015 -.3 -1.0000000000000011 -0.35682208977308688 -.3 -0.80901699437495012 -0.68761435889789069 -.3 -0.50000000000000344 -0.8660254037844366 -.3 -0.19098300562505705 -1.0444364486709827 -.3 0.19098300562504739 -1.0444364486709845 -.3 0.49999999999999545 -0.86602540378444126 -.3 0.80901699437494368 -0.68761435889789813 -.3 0.99999999999999778 -0.35682208977309615 -.3 1.0 0.0 .3 1.0000000000000002 0.3568220897730896 .3 0.80901699437494801 0.68761435889789313 .3 0.50000000000000089 0.86602540378443815 .3 0.19098300562505391 1.0444364486709834 .3 -0.19098300562505077 1.0444364486709841 .3 -0.49999999999999828 0.8660254037844396 .3 -0.80901699437494579 0.68761435889789557 .3 -0.99999999999999911 0.35682208977309243 .3 -1.0 2.7869958944826134e-015 .3 -1.0000000000000011 -0.35682208977308688 .3 -0.80901699437495012 -0.68761435889789069 .3 -0.50000000000000344 -0.8660254037844366 .3 -0.19098300562505705 -1.0444364486709827 .3 0.19098300562504739 -1.0444364486709845 .3 0.49999999999999545 -0.86602540378444126 .3 0.80901699437494368 -0.68761435889789813 .3 0.99999999999999778 -0.35682208977309615 .3 1.7 0.0 -.3 1.4166666666666672 0.49074772881118162 -.3 1.1333333333333342 0.98149545762236323 -.3 0.85000000000000153 1.4722431864335448 -.3 0.28333333333333532 1.4722431864335457 -.3 -0.28333333333333083 1.4722431864335466 -.3 -0.84999999999999709 1.4722431864335472 -.3 -1.1333333333333313 0.98149545762236667 -.3 -1.4166666666666656 0.49074772881118611 -.3 -1.7 5.4928446773655488e-015 -.3 -1.4166666666666685 -0.49074772881117706 -.3 -1.1333333333333373 -0.98149545762235968 -.3 -0.85000000000000586 -1.4722431864335421 -.3 -0.28333333333333977 -1.4722431864335448 -.3 0.28333333333332628 -1.4722431864335475 -.3 0.84999999999999221 -1.4722431864335501 -.3 1.1333333333333282 -0.98149545762237045 -.3 1.4166666666666641 -0.49074772881119072 -.3 1.7 0.0 .3 1.4166666666666672 0.49074772881118162 .3 1.1333333333333342 0.98149545762236323 .3 0.85000000000000153 1.4722431864335448 .3 0.28333333333333532 1.4722431864335457 .3 -0.28333333333333083 1.4722431864335466 .3 -0.84999999999999709 1.4722431864335472 .3 -1.1333333333333313 0.98149545762236667 .3 -1.4166666666666656 0.49074772881118611 .3 -1.7 5.4928446773655488e-015 .3 -1.4166666666666685 -0.49074772881117706 .3 -1.1333333333333373 -0.98149545762235968 .3 -0.85000000000000586 -1.4722431864335421 .3 -0.28333333333333977 -1.4722431864335448 .3 0.28333333333332628 -1.4722431864335475 .3 0.84999999999999221 -1.4722431864335501 .3 1.1333333333333282 -0.98149545762237045 .3 1.4166666666666641 -0.49074772881119072 .3 -1.3 0 0 -1.1 0.05 0
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
-----> lappend cplist -1.23 .17 .05
1.0 0.0 -.3 1.0000000000000002 0.3568220897730896 -.3 0.80901699437494801 0.68761435889789313 -.3 0.50000000000000089 0.86602540378443815 -.3 0.19098300562505391 1.0444364486709834 -.3 -0.19098300562505077 1.0444364486709841 -.3 -0.49999999999999828 0.8660254037844396 -.3 -0.80901699437494579 0.68761435889789557 -.3 -0.99999999999999911 0.35682208977309243 -.3 -1.0 2.7869958944826134e-015 -.3 -1.0000000000000011 -0.35682208977308688 -.3 -0.80901699437495012 -0.68761435889789069 -.3 -0.50000000000000344 -0.8660254037844366 -.3 -0.19098300562505705 -1.0444364486709827 -.3 0.19098300562504739 -1.0444364486709845 -.3 0.49999999999999545 -0.86602540378444126 -.3 0.80901699437494368 -0.68761435889789813 -.3 0.99999999999999778 -0.35682208977309615 -.3 1.0 0.0 .3 1.0000000000000002 0.3568220897730896 .3 0.80901699437494801 0.68761435889789313 .3 0.50000000000000089 0.86602540378443815 .3 0.19098300562505391 1.0444364486709834 .3 -0.19098300562505077 1.0444364486709841 .3 -0.49999999999999828 0.8660254037844396 .3 -0.80901699437494579 0.68761435889789557 .3 -0.99999999999999911 0.35682208977309243 .3 -1.0 2.7869958944826134e-015 .3 -1.0000000000000011 -0.35682208977308688 .3 -0.80901699437495012 -0.68761435889789069 .3 -0.50000000000000344 -0.8660254037844366 .3 -0.19098300562505705 -1.0444364486709827 .3 0.19098300562504739 -1.0444364486709845 .3 0.49999999999999545 -0.86602540378444126 .3 0.80901699437494368 -0.68761435889789813 .3 0.99999999999999778 -0.35682208977309615 .3 1.7 0.0 -.3 1.4166666666666672 0.49074772881118162 -.3 1.1333333333333342 0.98149545762236323 -.3 0.85000000000000153 1.4722431864335448 -.3 0.28333333333333532 1.4722431864335457 -.3 -0.28333333333333083 1.4722431864335466 -.3 -0.84999999999999709 1.4722431864335472 -.3 -1.1333333333333313 0.98149545762236667 -.3 -1.4166666666666656 0.49074772881118611 -.3 -1.7 5.4928446773655488e-015 -.3 -1.4166666666666685 -0.49074772881117706 -.3 -1.1333333333333373 -0.98149545762235968 -.3 -0.85000000000000586 -1.4722431864335421 -.3 -0.28333333333333977 -1.4722431864335448 -.3 0.28333333333332628 -1.4722431864335475 -.3 0.84999999999999221 -1.4722431864335501 -.3 1.1333333333333282 -0.98149545762237045 -.3 1.4166666666666641 -0.49074772881119072 -.3 1.7 0.0 .3 1.4166666666666672 0.49074772881118162 .3 1.1333333333333342 0.98149545762236323 .3 0.85000000000000153 1.4722431864335448 .3 0.28333333333333532 1.4722431864335457 .3 -0.28333333333333083 1.4722431864335466 .3 -0.84999999999999709 1.4722431864335472 .3 -1.1333333333333313 0.98149545762236667 .3 -1.4166666666666656 0.49074772881118611 .3 -1.7 5.4928446773655488e-015 .3 -1.4166666666666685 -0.49074772881117706 .3 -1.1333333333333373 -0.98149545762235968 .3 -0.85000000000000586 -1.4722431864335421 .3 -0.28333333333333977 -1.4722431864335448 .3 0.28333333333332628 -1.4722431864335475 .3 0.84999999999999221 -1.4722431864335501 .3 1.1333333333333282 -0.98149545762237045 .3 1.4166666666666641 -0.49074772881119072 .3 -1.3 0 0 -1.1 0.05 0 -1.23 .17 .05
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
# Create the list of topological vertices -- 6 on top and 6 on the bottom
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
-----> # to bound the two hexagons.
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
set vertlist {}
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
for {set j 0} {$j < 6} {incr j} {
lappend vertlist vbottom$j {} {} {} [list [list vertex [expr 36+3*$j]]]
}
Thu Sep 02 18:11:00 Eastern Daylight Time 1999
----->
for {set j 0} {$j < 6} {incr j} {
lappend vertlist vtop$j {} {} {} [list [list vertex [expr 54+3*$j]]]
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -