Skip to content

Commit

Permalink
Fix argument error in rings/mesh.jl, make default rotation equal to π…
Browse files Browse the repository at this point in the history
… / 6 used in config
  • Loading branch information
hughcars committed Nov 22, 2024
1 parent 4ee6c60 commit 4d8b9ad
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions examples/rings/mesh/mesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function generate_ring_mesh(;
outer_radius = 100.0,
rot_center::AbstractVector{<:Real} = [0.0, 0.0, 0.0],
rot_axis::AbstractVector{<:Real} = [0.0, 0.0, 1.0],
rot_θ::Real = π / 2,
rot_θ::Real = π / 6,
verbose::Integer = 5,
gui::Bool = false
)
Expand Down Expand Up @@ -148,8 +148,17 @@ function generate_ring_mesh(;
)

# Apply a rotation transformation to all entities in the model
ra ./= norm(ra)
kernel.rotate(kernel.getEntities(), rc[1], rc[2], rc[3], ra[1], ra[2], ra[3], θ)
rot_axis ./= norm(rot_axis)
kernel.rotate(
kernel.getEntities(),
rot_center[1],
rot_center[2],
rot_center[3],
rot_axis[1],
rot_axis[2],
rot_axis[3],
rot_θ
)

kernel.synchronize()

Expand Down

0 comments on commit 4d8b9ad

Please sign in to comment.