Skip to content

Commit 1393610

Browse files
Refactor Revolute
1 parent faf5163 commit 1393610

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/Mechanical/PlanarMechanics/joints.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ A revolute joint
2727
@named fixed = Rotational.Fixed()
2828
systems = [frame_a, frame_b, fixed]
2929

30-
if use_flange
31-
@named flange_a = Rotational.Flange(; phi, tau)
32-
push!(systems, flange_a)
33-
@named support = Rotational.Support()
34-
push!(systems, support)
35-
end
36-
3730
vars = @variables begin
3831
phi(t) = phi
3932
ω(t) = ω
@@ -57,6 +50,10 @@ A revolute joint
5750
]
5851

5952
if use_flange
53+
@named flange_a = Rotational.Flange(; phi, tau)
54+
push!(systems, flange_a)
55+
@named support = Rotational.Support()
56+
push!(systems, support)
6057
push!(eqs, connect(fixed.flange, support))
6158
else
6259
# actutation torque

0 commit comments

Comments
 (0)