-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for meshes to primitive builders #33
Conversation
1. Creation of a meshbuilder on a box 2. Creation of a meshbuilder on a custom mesh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now! Thanks @lorycontixd
src/rod/builder/primitives.py
Outdated
extension = self.mesh_path.split(".")[-1] | ||
elif isinstance(self.mesh_path, pathlib.Path): | ||
extension = self.mesh_path.suffix | ||
extension = str(self.mesh_path).split(".")[-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last curiosity, any specific reason to go back to string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was just not working without a suffix keyword for NamedTempFile. I can easily revert back.
This pull requests adds the possibility to build meshes by using trimesh.
It implements a
MeshBuilder
class which implements the calculation for the mesh's moment of inertia and its geometry.Summary of changes:
inertia
andgeometry
methods with a calculation usingtrimesh
methods.