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

Human readable custom parts #3

Open
openvmp opened this issue Feb 12, 2023 · 2 comments
Open

Human readable custom parts #3

openvmp opened this issue Feb 12, 2023 · 2 comments

Comments

@openvmp
Copy link
Owner

openvmp commented Feb 12, 2023

Currently the custom parts don1_board_top and don1_board_bottom are stored as STEP files exported from FreeCAD.
They need to be replaced with some human readable format like OpenSCAD to enable collaboration and incremental edits.

Either at the same time or as the next issue, CNC friendly outputs (either DXF or gcode or both) need to be added.

@openvmp
Copy link
Owner Author

openvmp commented Feb 12, 2023

It would actually be nice if CadQuery is used to generate the part design instead of OpenSCAD. Both would require some changes in the 'Bill-of-Material' library to support new type in part.json.
Please, note, it's important to have an intermediate 2D artifact so that DXF can be generated.

  1. CadQuery option

The changes for CadQuery would be similar to the code found in get_assembly.

  1. OpenSCAD option

The changes for OpenSCAD may got next to if part["type"] == "step" but the code will be a bit more complex given no native support for importing OpenSCAD in CadQuery. Alternatively, a preprocessing step could be added into the part rendering process (parts/render.py) which will generate the STEP file from whatever the source file is.

@openvmp
Copy link
Owner Author

openvmp commented Aug 5, 2023

Let me add some clarification.

One way to implement these custom parts is by implementing them in pure CaqQuery code.
There is now a good example: https://github.com/openvmp/openvmp-models/blob/main/robots/don1/assembly_wormgear.py
So such custom parts would be defined in separate files next to assembly_wormgear.py, and loaded into the corresponding links in the same way.

The other way is to maintain the blueprints of the custom parts next to all other parts in the parts folder.
However instead of using type: "step" in part.json, use part: "openscad".
That will require an extension to the bom.py library to be able to load OpenSCAD files in a way similar to the way it loads STEP files now.

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

No branches or pull requests

1 participant