compas icon indicating copy to clipboard operation
compas copied to clipboard

`Mesh.from_polyhedron(polyhedron)` should be renamed `from_platonicsolid`

Open yck011522 opened this issue 3 years ago • 2 comments

Expected Result

I expect Mesh.from_polyhedron to consume a Polyhedron class. Turns out it doesn't. This causes a slight semantic nuisance.

Actual Result

Currently, the function takes an integer and constructs a platonic solid and turns that to mesh.

I think the current thing should be renamed Mesh.from_platonicsolid(f) and the function Mesh.from_polyhedron should follow the same implementation of from_shape. Note that I'm using Platonic solid

yck011522 avatar Jun 10 '21 00:06 yck011522

i guess that would make sense. perhaps i just provide an alias for now and a deprecation warning such that it is not a breaking change and can already be included now...

tomvanmele avatar Jun 10 '21 11:06 tomvanmele

By the way, I got to say, the Polyhedron class is great for what I needed to do. For irregular solid models with planar faces.

yck011522 avatar Jun 10 '21 15:06 yck011522