Skip to content

Commit

Permalink
Merge pull request #306 from awslabs/hughcars/rings-mesh-arg-bugfix
Browse files Browse the repository at this point in the history
Fix arg error in rings/mesh.jl
  • Loading branch information
hughcars authored Nov 22, 2024
2 parents 9134fbb + 667f904 commit caf49ed
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 caf49ed

Please sign in to comment.