1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-26 10:19:45 +03:00
gka 24de79c3a5 0023523: In session DRAW it is impossible to close document having name already once closed document.
Added destructor for TDocStd_Document which performs destruction of document in logical order in order to avoid exception when Undo and Redo fields are destructed after THF_Data field.
Added removing name of closed document from tcl variables in the DRAW in order to avoid exception during use the same name for new document.
Modification to avoid compilation error class ViewerTest
Minor correction in test caf basic G3
2012-12-14 16:17:11 +04:00

83 lines
1.6 KiB
Plaintext

# =================== OCAF ======================
# Naming
#
# Testing purpose: Naming selection mechanism
#
# Test case: E3 (ShapeOrientation is used only for SingleSelection)
# 1. Create box B2
# 2. Create box B1
# 3. Translate B2 along XYZ
# 4. CS = Cut (B2, B1)
# 5. Make selection for all sub-shapes
# 6. Modify B2
# 7. Recompute modeling functions
# 8. Recompute selections
# ===============================================
#pload FULL
erase
Close D
NewDocument D MDTV-Standard
AddDriver D Box Cyl Sph Attach XAttach PTxyz PTALine PRLine PMirr Cut Fuse Prism FulRevol SecRevol Fillet
#1 Box creation
NewCommand D
set B2 [AddObject D]; ## add object
set F2 [AddFunction D $B2 Box]; ## add function
BoxDX D $B2 190; ## set argumets of this function
BoxDY D $B2 290
BoxDZ D $B2 390
InitLogBook D; ## initialize (clean) internal maps of labels
ComputeFun D $F2; ## compute the function
GetShape D $F2:2 Box2; ## check result
whatis Box2
GetReference D $B2
#2 Box creation
NewCommand D
set B1 [AddBox D 120 140 150];
ComputeFun D $B1:1;
GetShape D $B1:1:2 Box;
whatis Box
#3 Translate Box1
NewCommand D
set FTr1 [PTranslateDXYZ D $B1 150 -40 270]
ComputeFun D $FTr1
GetShape D $B1:2:2 Box
#4 Cut B2 B1
NewCommand D
set CS [AddCut D $B2 $B1]
ComputeFun D $CS
erase
GetShape D $CS:2 S
NewCommand D
#5 test Naming
set SL [TestSingleSelection D $B2 1]
set SL2 [TestMultipleSelection D $B2 0]
#6 Modification
NewCommand D
BoxDX D $B2 220
#7 recompute
NewCommand D
InitLogBook D
ComputeFun D $F2
ComputeFun D $B1:1
ComputeFun D $FTr1
ComputeFun D $CS
erase
GetShape D $CS:2 S
don S
#8 Recompute selections
SolveFlatFrom D $SL
NewCommand D