Giter Site home page Giter Site logo

Comments (8)

realthunder avatar realthunder commented on May 18, 2024

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.

from freecad_assembly3.

luzpaz avatar luzpaz commented on May 18, 2024

Maybe @jmwright has an idea ?

from freecad_assembly3.

jmwright avatar jmwright commented on May 18, 2024

@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.

from freecad_assembly3.

dulouie avatar dulouie commented on May 18, 2024

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?

from freecad_assembly3.

realthunder avatar realthunder commented on May 18, 2024

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.

from freecad_assembly3.

jmwright avatar jmwright commented on May 18, 2024

Tagging @fragmuffin the creator of cqparts.

from freecad_assembly3.

fragmuffin avatar fragmuffin commented on May 18, 2024

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.

from freecad_assembly3.

dulouie avatar dulouie commented on May 18, 2024

Allright, we wait for your next major update.

from freecad_assembly3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.