-
Notifications
You must be signed in to change notification settings - Fork 9
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
Started on an automated assembly step generator #75
Conversation
I know this is a draft, but I am going to push forward and merge as:
|
assy.constrain("device@faces@<Z", "shelf@faces@<Z[-3]", "Plane") | ||
assy.solve() | ||
|
||
from cadquery.vis import show |
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.
Following PEP8 guidance Pylint gets upset if imports are not at the top of the file.
https://realpython.com/absolute-vs-relative-python-imports/#styling-of-import-statements
I'm going to leave this as a comment. We'll know to fix it later as PyLint is complaining
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.
This is just temporary during model development.
the JSON file to be found. | ||
""" | ||
|
||
import json |
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.
See comment above for other import
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.
We can move them to the top. I like to have some imports only where/if they're used, but I know that's frowned upon by the Python community.
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.
Cheers. I tend to do what PyLint tells me unless I have a very good reason not to. I suppose the benefit of conventions is the code being structured in the way the python community expects.
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.
This is certainly progress. I'm going to get this merged in before we split up the repos.
This is an attempt to generate assembly step CAD models/assemblies using the device ID from devices.json. The code generates a placeholder device based on the dimensions in the database, generates the matching shelf, then attempts to put them together.
There is still missing data in the database to make this fully automated. For instance, where are the mounting hole locations in the hardware, if there are any? There needs to be some way to know if there are screws involved, and if so, where they go.