-
Notifications
You must be signed in to change notification settings - Fork 113
Universal CAD artists #904
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
Conversation
|
Based on @gonzalocasas recipe for making nurbs functionality pluggable... Added This enables artist instantiation without CAD-specific imports. from compas.artists import Artist
from compas.datastructures import Mesh
from compas.geometry import Polyhedron
shape = Polyhedron.from_platonicsolid(12)
mesh = Mesh.from_shape(shape)
artist = Artist(mesh)
artist.draw()
print(type(artist)) # compas_rhino.artists.meshartist.MeshArtist (if executed in Rhino)
# compas_blender.artists.meshartist.MeshArtist (if executed in Blender) |
| @staticmethod | ||
| def draw_collection(collection): | ||
| raise NotImplementedError |
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.
I'm confused why this is on the base Artist and not on the BlenderArtist.
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.
ha perhaps the name is confusing. was mean to be a static method to draw many objects at the same time. is not related to the "collection" of blender. but since there is no implementation for it anywhere, perhaps it can just be removed...
Co-authored-by: beverlylytle <57254617+beverlylytle@users.noreply.github.com>
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.
haha, apparently, because i am the original author of the PR i can't approve the changes, since "pull request authors cannot approve their own pull requests" :)
|
i guess @gonzalocasas this means that you will have to approve of yourself :) |
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.
Here I come to save the day!
|
merging still blocked since @gonzalocasas requested changes at some point... |
|
how picky this thing gets! ;) |
|
since @beverlylytle will also still add the primitives for blender in a separate PR i would vote for merging! |
What type of change is this?
Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.CHANGELOG.mdfile in theUnreleasedsection under the most fitting heading (e.g.Added,Changed,Removed).invoke test).invoke lint).compas.datastructures.Mesh.