File: A1

package info (click to toggle)
oce 0.15-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 302,472 kB
  • ctags: 210,903
  • sloc: cpp: 1,165,052; ansic: 75,256; sh: 11,901; tcl: 4,488; python: 2,867; makefile: 337; perl: 37; csh: 12
file content (64 lines) | stat: -rwxr-xr-x 1,485 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#1 - create box using more flexible set of commands
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
AddDriver D Box Attach Cyl	
ComputeFun D $F2;			## compute the function
GetShape D $F2:2 Box2;			## check result
whatis Box2
GetReference D $B2;			## referes to result NS

#2 
NewCommand D
explode Box2 F
explode Box2_1 E
set Sel1 [AttachShape D Box2_1_1 ${B2} ${B2} 1]; ## set attachment
AddDriver D Attach Cyl
set Cyl [AddCyl D 30 315 ${Sel1}]
ComputeFun D $Cyl:1

#3 => cut
NewCommand D
AddDriver D Cut
set CS [AddCut D $B2 $Cyl]
ComputeFun D $CS
GetShape D $CS:2 S

#4 => Fillet
NewCommand D
explode S F
explode S_1 E
set Sel2 [AttachShape D S_1_1 ${B2} ${B2} 1]; ## set attachment for using in Fillet
AddDriver D Fillet
set Fill [AddFillet D $B2 25 $Sel2 0]
ComputeFun D $Fill
GetShape D $Fill:2 S


#5 test selection
NewCommand D
set SL [TestSingleSelection D $B2 0]
set SL2 [TestMultipleSelection D $B2 0]

#6 modification
NewCommand D
BoxDX D $B2 290

# recomputation
NewCommand D
InitLogBook D;		## to be initialized before any recomputation of impacted functions set (if attachments are presented)
ComputeFun D $F2;	
ComputeFun D $Sel1:1
ComputeFun D $Cyl:1
ComputeFun D $CS
ComputeFun D $Sel2:1
ComputeFun D $Fill
GetShape D $Fill:2 S
don S

SolveFlatFrom D $SL
NewCommand D