Skip to content

Polygon.normal with normal_polygon instead of normal_triangle?Β #1487

@yiqiaowang-arch

Description

@yiqiaowang-arch

Currently, the polygon's normal is calculated as the normal of one of its triangles: normal_triangle([polygon.centroid, polygon.points[0], polygon.points[1]]). However, this is problematic when the polygon is simple but concave, because the first two points might be on the concave ears, as pointed out by the comments inside polygon.plane.

The compas.geometry.normal_polygon seem to offer a more robust method of calculating such normal, with O(n) instead of O(1) for calculating the normal.

Is it possible to incorporate such method into polygon.normal, since the code is already available in compas? Or let the user choose if they would sacrifice computation efficiency for more accurate handling with concave polygons?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions