ExampleCable

Drawj2d output

 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
#! drawj2d -T svg -r96 -W 150 -H 80 -X 20 -Y 20 ExampleCable.hcl

unitlength [/ 1. 50.] m
forceunitlength 2

# cable
set A {0 0}; dot $A; lb A SW
set B {2.5 0}; dot $B; lb B SE
set C {1.9 1.3}; dot $C
line $A $C $B

# weight (10 kN)
set Q "$C  0 10"
pen blue
force $Q

# calculate reaction forces
pen green
# moment equilibrium at pos. A in order to get force FB
moveto $A
set fB "$B  [geom.vector $C $B]"
set FB [stat.mequi $fB $Q]
force $FB
# equilibrium to get force FA
set FA [stat.equi $Q $FB]
set FA [stat.move $FA $A $B]; # move along action line
force $FA

# force polygon
moveto 5 0
set posPolygon [here]
pen blue 0.3; font 3
texforce [FXY $Q] Q
pen green
texforce [FXY $FA] F_A
texforce [FXY $FB] F_B
# verify the force polygon is closed
assert "[geom.distance $posPolygon] ~= 0" {equilibrium check}

Related

Wiki: Examples

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.