From 4d8b9ade47fd1679b18c8b4852133d893e23fa5d Mon Sep 17 00:00:00 2001 From: Hugh Carson Date: Fri, 22 Nov 2024 09:39:23 -0800 Subject: [PATCH] =?UTF-8?q?Fix=20argument=20error=20in=20rings/mesh.jl,=20?= =?UTF-8?q?make=20default=20rotation=20equal=20to=20=CF=80=20/=206=20used?= =?UTF-8?q?=20in=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/rings/mesh/mesh.jl | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/examples/rings/mesh/mesh.jl b/examples/rings/mesh/mesh.jl index 71c16337f..43a3073e1 100644 --- a/examples/rings/mesh/mesh.jl +++ b/examples/rings/mesh/mesh.jl @@ -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 ) @@ -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()