mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-06 10:36:12 +03:00
Patch for Naming improvement. 1). Added persistence. 2). Removed not supported evolution - Replace. Fix of QADraw commands. Modified test case: caf named_shape F6 1). Redesigned DNaming commands: SelectShape & SolveSelection 2). Added 2 new scripts: F8 & F9 Adding test cases caf/named_shape/F8 F9
93 lines
2.4 KiB
Plaintext
Executable File
93 lines
2.4 KiB
Plaintext
Executable File
# =================== OCAF ======================
|
|
# Naming
|
|
#
|
|
# Testing purpose: Naming selection mechanism
|
|
# (name = FILTERBYNEIGHBOURGS)
|
|
# Check type migration
|
|
# ===============================================
|
|
# Test case: F9 (testing using AttachShape & ComputeFun)
|
|
# 1. Create 3 boxes $B1, $B2, $B3
|
|
# 2. $FS1 = Fuse ($B1, $B2)
|
|
# 3. $FS2 = Fuse ($B1, $B3)
|
|
# 4. Make selections of the face 'fuse2_10'
|
|
# 5. Modify B2
|
|
# 6. Recompute
|
|
# ===============================================
|
|
|
|
pload FULL
|
|
set doc d16
|
|
NewDocument $doc MDTV-Standard
|
|
AddDriver $doc Box Fuse Attach
|
|
#1.create 3 boxes
|
|
set B1 [AddBox $doc 100 200 350]
|
|
set B2 [AddBox $doc 330 330 90]
|
|
set B3 [AddBox $doc 60 450 150]
|
|
ComputeFun $doc $B1:1
|
|
ComputeFun $doc $B2:1
|
|
ComputeFun $doc $B3:1
|
|
|
|
#2. B1 = fuse (B1 B2)
|
|
set FS1 [AddFuse $doc $B1 $B2]
|
|
ComputeFun $doc $FS1
|
|
|
|
#3. B1 = fuse (B1 B3)
|
|
set FS2 [AddFuse $doc $B1 $B3]
|
|
ComputeFun $doc $FS2
|
|
GetShape $doc $FS2:2 fuse2
|
|
explode fuse2 f
|
|
|
|
|
|
|
|
#4. Select fuse2_10 using Attach
|
|
set Sel2 [AttachShape $doc fuse2_10 $B1]
|
|
GetShape $doc $Sel2:1:2 nf10before
|
|
#nf10before is face
|
|
set info1 [whatis nf10before]
|
|
|
|
|
|
#5. Modify
|
|
BoxDZ $doc $B2 125
|
|
|
|
#6. Recompute - Alternative way of solving
|
|
InitLogBook $doc
|
|
ComputeFun $doc $B1:1
|
|
ComputeFun $doc $B2:1
|
|
ComputeFun $doc $B3:1
|
|
ComputeFun $doc $FS1
|
|
ComputeFun $doc $FS2
|
|
ComputeFun $doc $Sel2:1
|
|
GetShape $doc $Sel2:1:2 nf10after
|
|
#nf10after is face
|
|
set info2 [whatis nf10after]
|
|
|
|
if { [regexp "shape" $info1] != 1 } {
|
|
puts "Error : There is not word shape in nf10after"
|
|
}
|
|
if { [regexp "FACE" $info1] != 1 } {
|
|
puts "Error : There is not word FACE in nf10after"
|
|
}
|
|
if { [regexp "REVERSED" $info1] != 1 } {
|
|
puts "Error : There is not word REVERSED in nf10after"
|
|
}
|
|
if { [regexp "Modified" $info1] != 1 } {
|
|
puts "Error : There is not word Modified in nf10after"
|
|
}
|
|
if { [regexp "Orientable" $info1] != 1 } {
|
|
puts "Error : There is not word Orientable in nf10after"
|
|
}
|
|
|
|
if { [regexp "shape" $info2] != 1 } {
|
|
puts "Error : There is not word shape in nf10before"
|
|
}
|
|
if { [regexp "FACE" $info2] != 1 } {
|
|
puts "Error : There is not word FACE in nf10before"
|
|
}
|
|
if { [regexp "REVERSED" $info2] != 1 } {
|
|
puts "Error : There is not word REVERSED in nf10before"
|
|
}
|
|
if { [regexp "Modified" $info2] != 1 } {
|
|
puts "Error : There is not word Modified in nf10before"
|
|
}
|
|
if { [regexp "Orientable" $info2] != 1 } {
|
|
puts "Error : There is not word Orientable in nf10before"
|
|
} |