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

cqparts assemblies #22

Closed
dulouie opened this issue Aug 1, 2018 · 8 comments
Closed

cqparts assemblies #22

dulouie opened this issue Aug 1, 2018 · 8 comments

Comments

@dulouie
Copy link

dulouie commented Aug 1, 2018

Hi realthunder the last days, i played around with cadquery and cqparts.
And i think cqparts assemblies can be interesting for you.
Please have a look: https://github.com/fragmuffin/cqparts

@dulouie dulouie changed the title cqparts assemblys cqparts assemblies Aug 1, 2018
@realthunder
Copy link
Owner

As a matter of fact, I have used cadquery before, for generating electronic components. I think it has a lot of potential. But to make it really useful in FC, not only for programmer, but for an end-user, is to create an object that can automatically expose the parameters defined in the cadquery files, and recompute the shape upon user changes. Same thing for the assembly. Maybe someone has done that by now.

@luzpaz
Copy link
Collaborator

luzpaz commented Aug 2, 2018

Maybe @jmwright has an idea ?

@jmwright
Copy link

jmwright commented Aug 2, 2018

@luzpaz @realthunder If you use the show_object() function in your CadQuery scripts to display objects, you can click CadQuery->Toggle Parameters Editor with the CadQuery workbench, and that will bring up a panel that will let you edit your script variables. It doesn't handle wrapped cqparts variables yet though.

@dulouie
Copy link
Author

dulouie commented Aug 5, 2018

For a possible further direction, I think about cqparts script with a gui for parameters. These scripts generate solids inside an asm3 container. The mate connector from cqparts is connected with asm3 constraints. For example a planetary gear generator or a drive train.

Maybe it's easier for beginning developers to write a cadquery script as a freecad workbench/macro.
Because Cadquery is well documented and easy to use.
What do you think?

@realthunder
Copy link
Owner

I was thinking more of a discrete object, for example, like a screw object in the fastener workbench, where user can simply change the parameter using property editor. cqparts/cadquery workbench can create an object from a script, by parsing the script and expose its declared parameters as object properties. And re-run the script to generate new shape on changes of parameter.

As for assembly, I probably should read a bit about cqparts code first. They must also use some kind of solver. It may not be easy to translate constraint setting across solvers.

@jmwright
Copy link

jmwright commented Aug 5, 2018

Tagging @fragmuffin the creator of cqparts.

@fragmuffin
Copy link

Hi everyone!

[cadquery's show_object() function] doesn't handle wrapped cqparts' variables yet though.

This is definitely a down side of cqparts as it stands.
Ideally cqparts requires cadquery, and helps to shape cadquery's APIs to accommodate a higher-level structure for model-building... this is ultimately the purpose of cqparts
Dynamically displaying cqparts parts & assemblies should ultimately be resolved with the closure of: dcowden/cadquery#273

As for assembly, I probably should read a bit about cqparts code first. They must also use some kind of solver. It may not be easy to translate constraint setting across solvers.

The only constraints currently implemented are Fixed and Coincident, and the "solver" simply iterates through constraints setting coordinate systems where possible... if a constraint cannot be solved, it errors.
ref: solver.py (doc)
This is just a placeholder for a "proper" minimise method, which will allow the constraints collection to expand.
Discussed in more detail in: cqparts/cqparts#30

Side Note
cqparts is currently undergoing a major interface change (cqparts/cqparts#110).
Development has delayed while my workload is high, but it's still at the front of my mind.

@dulouie
Copy link
Author

dulouie commented Aug 10, 2018

Allright, we wait for your next major update.

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

5 participants