One-click project export

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
jonnor
Posts: 33
Joined: Mon Feb 23, 2015 12:57 pm

One-click project export

Post by jonnor »

Exports all files in document which has names like `mypart [dxf]` or `thing [stl,step]`
to individual files in a export directory. Default prefix: 'export/$project-'
Can be ran both as a macro from the FreeCAD UI and as a script on commandline.

This allows treating the FreeCAD file as a single-source-of-truth,
and to automate the tedious and error-prone task of updating derivative/exported files.

Work-in-process, but thought I'd make it public early :)

Image

Download from: https://github.com/jonnor/projects/tree ... rt-project

Part of a bigger project in 'continious integration' (like in software) workflows around FreeCAD.
Where this would be one of the steps automatically done when checking in / tagging a new version of a project/part.
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: One-click project export

Post by yorik »

interesting! please keep posting about that continuous integration workflow... many more good ideas could come out!
jonnor
Posts: 33
Joined: Mon Feb 23, 2015 12:57 pm

Re: One-click project export

Post by jonnor »

Documented the overall idea of the continious integration system now. Full working document: https://github.com/jonnor/projects/tree ... on-for-cad
Here is an excerpt of the most important.

Continious integration (CI) is a best-pratice in software development. A CI system picks up
very change made to source/project files in a shared revisioning system (like git).
It then runs a bunch of automated tasks, including verification, documentation generation.
If all checks pass, and - publishes the results to an accessible place online (intra/internet).
It helps in keeping quality up because all the tedious (and error-prone) aspects of quality assurance
and publishing are automated.

What would such a workflow look like for CAD?
Particularly one centered on open source digital fabrication?

And overall flow could be like this:

* Check in changes in git, push to something like Github
* A CI service, something like Travis picks up the changes
* Export individual artifacts from the project sources.
3d-models, renders/previews (images/interactive), fabrication data (CNC/laser cutsheets), assembly drawings.
* Generate documentation from sources + other descriptions.
Webpage(s) describing the model/project, including links/embedding exported artifacts.
* Verifies that the outputs are good.
Individual models checks like watertightness, etc.
Checking project-wide constraints like stable 'interfaces' of parts, assemblies fitting together, maximum material or cost budgets.
FEM analysis.
* If checks pass, publishes/deploys the results.
To local website, but also to sharing services like Thingiverse/Youmagine or production services like Shapeways/Ponoko/Sculpteo

Most parts I have pretty concrete idea of how I want to implement initial prototype with (see full doc). But for instance testing/verification of models is an interesting topic that I don't really have any clue about yet. Would love input!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: One-click project export

Post by triplus »

But for instance testing/verification of models is an interesting topic that I don't really have any clue about yet. Would love input!
Check Geometry tool is usually used on a model to find potential issues. As for assembly i guess ATM there is only 3'rd Party module for that and it does have a tool to check for overlap. If you are thinking in this direction...

I feel that you will probably find areas you would like to support along the way. As i do imagine for example CNC related tasks will need specific support compared to for example designs for building a house.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: One-click project export

Post by triplus »

MaurinoWeb
Posts: 221
Joined: Thu Jun 22, 2017 1:15 pm

Re: One-click project export

Post by MaurinoWeb »

I try it soon
thank you
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: One-click project export

Post by Kunda1 »

jonnor wrote:ping
how is the development going?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply