Skip to content

Commit 7faa9ce

Browse files
committed
Fix missing param prn
1 parent e0a8203 commit 7faa9ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ram_geometry.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Calculate center of mass of a mesh and translate vertices so that COM is at orig
184184
- Non-triangular faces are automatically triangulated into triangles
185185
- Assumes uniform surface density
186186
"""
187-
function center_to_com!(vertices, faces)
187+
function center_to_com!(vertices, faces; prn=true)
188188
area_total = 0.0
189189
com = zeros(3)
190190

@@ -209,7 +209,7 @@ function center_to_com!(vertices, faces)
209209

210210
com = com / area_total
211211
!(abs(com[2]) < 0.01) && throw(ArgumentError("Center of mass $com of .obj file has to lie on the xz-plane."))
212-
@info "Centering vertices of .obj file to the center of mass: $com"
212+
prn && @info "Centering vertices of .obj file to the center of mass: $com"
213213
com[2] = 0.0
214214
for v in vertices
215215
v .+= com
@@ -430,7 +430,7 @@ function RamAirWing(
430430

431431
! prn || @info "Reading $obj_path"
432432
vertices, faces = read_faces(obj_path)
433-
T_cad_body = center_to_com!(vertices, faces)
433+
T_cad_body = center_to_com!(vertices, faces; prn)
434434
inertia_tensor = calculate_inertia_tensor(vertices, faces, mass, zeros(3))
435435

436436
if align_to_principal

0 commit comments

Comments
 (0)