Skip to content
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

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

jmwright
Copy link
Contributor

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.

@julianstirling
Copy link
Collaborator

I know this is a draft, but I am going to push forward and merge as:

@julianstirling julianstirling marked this pull request as ready for review June 17, 2024 12:52
assy.constrain("device@faces@<Z", "shelf@faces@<Z[-3]", "Plane")
assy.solve()

from cadquery.vis import show
Copy link
Collaborator

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

Copy link
Contributor Author

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
Copy link
Collaborator

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

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Collaborator

@julianstirling julianstirling left a 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.

@julianstirling julianstirling merged commit 47a3348 into master Jun 17, 2024
3 of 4 checks passed
@jmwright jmwright deleted the assembly-step branch June 17, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants