mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
173 lines
4.2 KiB
Plaintext
Executable File
173 lines
4.2 KiB
Plaintext
Executable File
puts "TODO OCC7166 ALL: Error : is WRONG because number of "
|
|
|
|
puts "============"
|
|
puts "OCC7166"
|
|
puts "============"
|
|
puts ""
|
|
#######################################################################
|
|
# Improvement of API of ThruSection
|
|
#######################################################################
|
|
|
|
set BugNumber OCC7166
|
|
|
|
#
|
|
#
|
|
#
|
|
#
|
|
#
|
|
# v22 v21
|
|
# *----------------------*
|
|
# / \
|
|
# / \
|
|
# / v12 v11 \
|
|
# / *---------------------* \
|
|
# / | | \
|
|
# / | | \
|
|
# * v23 | * v3 | v28 *
|
|
# | | | \ | |
|
|
# | | | \ | |
|
|
# | | | \ | |
|
|
# | | | \ | |
|
|
# | | | /* v2 | |
|
|
# | | | / | |
|
|
# | | | / | | * v4, v5
|
|
# | | | / | |
|
|
# | | * | |
|
|
# | | v1 | |
|
|
# | | | |
|
|
# | | | |
|
|
# * v24 | | v27 *
|
|
# \ | | /
|
|
# \ *---------------------* /
|
|
# \ v13 v14 /
|
|
# \ /
|
|
# \ /
|
|
# \ v25 v26 /
|
|
# *----------------------*
|
|
#
|
|
#
|
|
#
|
|
|
|
set z1 40
|
|
set z2 20
|
|
set z3 0
|
|
set z4 100
|
|
set z5 30
|
|
set z6 10
|
|
|
|
# beginning vertex
|
|
vertex v4 55 2.5 ${z4}
|
|
# ending vertex
|
|
vertex v5 55 2.5 -${z4}
|
|
|
|
# top triangle
|
|
vertex v1 0 0 ${z1}
|
|
vertex v2 5 5 ${z1}
|
|
vertex v3 0 10 ${z1}
|
|
|
|
edge e1 v1 v2
|
|
edge e2 v2 v3
|
|
edge e3 v3 v1
|
|
|
|
wire w1 e1 e2 e3
|
|
|
|
# top beziercurve
|
|
beziercurve bzc1 5 5 5 ${z5} 5 -5 ${z5} -5 -5 ${z5} -5 5 ${z5} 5 5 ${z5}
|
|
mkedge ebzc1 bzc1
|
|
wire wbzc1 ebzc1
|
|
|
|
# top quadrangle
|
|
vertex v11 15 15 ${z2}
|
|
vertex v12 -15 15 ${z2}
|
|
vertex v13 -15 -15 ${z2}
|
|
vertex v14 15 -15 ${z2}
|
|
|
|
edge e11 v11 v12
|
|
edge e12 v12 v13
|
|
edge e13 v13 v14
|
|
edge e14 v14 v11
|
|
|
|
wire w11 e11 e12 e13 e14
|
|
|
|
# top pbsplinecurve
|
|
pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 ${z6} 1 -2 2 ${z6} 1 0 1 ${z6} 1 2 2 ${z6} 1 1 0 ${z6} 1 2 -2 ${z6} 1 0 -1 ${z6} 1 -2 -2 ${z6} 1
|
|
mkedge epbc1 pbc1
|
|
wire wpbc1 epbc1
|
|
|
|
# octagon
|
|
vertex v21 25 25 ${z3}
|
|
vertex v22 -25 25 ${z3}
|
|
vertex v23 -30 10 ${z3}
|
|
vertex v24 -30 -10 ${z3}
|
|
vertex v25 -25 -25 ${z3}
|
|
vertex v26 25 -25 ${z3}
|
|
vertex v27 30 -10 ${z3}
|
|
vertex v28 30 10 ${z3}
|
|
|
|
edge e21 v21 v22
|
|
edge e22 v22 v23
|
|
edge e23 v23 v24
|
|
edge e24 v24 v25
|
|
edge e25 v25 v26
|
|
edge e26 v26 v27
|
|
edge e27 v27 v28
|
|
edge e28 v28 v21
|
|
|
|
wire w21 e21 e22 e23 e24 e25 e26 e27 e28
|
|
|
|
# bottom pbsplinecurve
|
|
pbsplinecurve pbc2 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 -${z6} 1 -2 2 -${z6} 1 0 1 -${z6} 1 2 2 -${z6} 1 1 0 -${z6} 1 2 -2 -${z6} 1 0 -1 -${z6} 1 -2 -2 -${z6} 1
|
|
mkedge epbc2 pbc2
|
|
wire wpbc2 epbc2
|
|
|
|
# bottom quadrangle
|
|
vertex v111 15 15 -${z2}
|
|
vertex v112 -15 15 -${z2}
|
|
vertex v113 -15 -15 -${z2}
|
|
vertex v114 15 -15 -${z2}
|
|
|
|
edge e111 v111 v112
|
|
edge e112 v112 v113
|
|
edge e113 v113 v114
|
|
edge e114 v114 v111
|
|
|
|
wire w111 e111 e112 e113 e114
|
|
|
|
# bottom beziercurve
|
|
beziercurve bzc2 5 5 5 -${z5} 5 -5 -${z5} -5 -5 -${z5} -5 5 -${z5} 5 5 -${z5}
|
|
mkedge ebzc2 bzc2
|
|
wire wbzc2 ebzc2
|
|
|
|
# bottom triangle
|
|
vertex v101 0 0 -${z1}
|
|
vertex v102 5 5 -${z1}
|
|
vertex v103 0 10 -${z1}
|
|
|
|
edge e101 v101 v102
|
|
edge e102 v102 v103
|
|
edge e103 v103 v101
|
|
|
|
wire w101 e101 e102 e103
|
|
|
|
|
|
#
|
|
set issolid 1
|
|
set isruled 1
|
|
#thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5
|
|
thrusections result ${issolid} ${isruled} v4 w1 wbzc1 w11 wpbc1 w21 wpbc2 w111 wbzc2 w101 v5
|
|
|
|
|
|
checkprops result -s 12786.5
|
|
|
|
|
|
checknbshapes result -vertex 101 -edge 209 -wire 110 -face 110 -shell 1 -solid 2 -compsolid 0 -compound 0 -shape 532
|
|
|
|
|
|
set index [lsearch [whatis result] Closed]
|
|
if {$index == -1} {
|
|
puts "Faulty ${BugNumber} : result is not Closed shape"
|
|
|
|
}
|
|
|
|
|