-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain_basicExamples.cpd
More file actions
49 lines (46 loc) · 1.25 KB
/
Copy pathmain_basicExamples.cpd
File metadata and controls
49 lines (46 loc) · 1.25 KB
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
'<style>body {zoom: 0.7;}</style>
#include functions/timber_properties.cpd
#include functions/geometric_properties.cpd
#include functions/utils.cpd
"Create a new timber material:
'All variables shown in the tables are created
'Param: the index needed to use the html selector
timber$(1) #{3; 1.3; 0.9}
f_c,0,d
"Overwrite the existing timber material:
' It is needed to use a different index
timber$(2) #{2; 1.3; 0.9}
f_c,0,d
"Add multiple timber properties with different names
'This method will add a pedix for each variable. It can be a string too
timber_multi$(3) #{2; 1.3; 0.9}
timber_multi$(4) #{2; 1.3; 0.9}
timber_multi$(beam) #{3; 1.3; 0.9}
timber_multi$(purlin) #{3; 1.3; 0.9}
'<hr />
"Calculate the geometric properties for a rectangle
'Same behavior as before. This time the index is not needed
rectangle$ #{120; 240; 5}
rectangle_multi$(1) #{120; 240; 5}
rectangle_multi$(2) #{140; 240; 5}
rectangle_multi$(beam) #{240; 2400; 5}
rectangle_multi$(purlin) #{160; 200; 5}
'<hr />
"Verification
σ = 2MPa
f = 3MPa
check$(σ;f)
check_ratio$(σ;f)
check_inline$(σ;f)
check_inline_1$(σ/f)
check_ratio_inline$(σ;f)
σ = 3.1MPa
f = 3MPa
check$(σ;f)
check_ratio$(σ;f)
check_inline$(σ;f)
check_inline_1$(σ/f)
check_ratio_inline$(σ;f)
'<hr />
"Circle area
calc_area$(2;8mm)