File: A3

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (56 lines) | stat: -rw-r--r-- 1,145 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
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
SolveFlatFrom D $SL
NewCommand D