We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf937bf commit b1d8447Copy full SHA for b1d8447
src/kite_geometry.jl
@@ -203,21 +203,7 @@ function center_to_com!(vertices, faces)
203
area_total += area
204
com += area * centroid
205
else
206
- println("found non-triangular face")
207
- # Non-triangular face case - triangulate the face
208
- v1 = vertices[face[1]] # Use first vertex as pivot
209
- for i in 2:length(face)-1
210
- v2 = vertices[face[i]]
211
- v3 = vertices[face[i+1]]
212
-
213
- # Calculate triangle area and centroid for this triangle
214
- normal = cross(v2 - v1, v3 - v1)
215
- area = norm(normal) / 2
216
- centroid = (v1 + v2 + v3) / 3
217
218
- area_total += area
219
- com += area * centroid
220
- end
+ throw(ArgumentError("Triangulate faces in a CAD program first"))
221
end
222
223
0 commit comments