cadquery
cadquery copied to clipboard
Add STL to Assemblys export formats
Turn the assembly into a compound and use Shapes export method to export the assembly. This way the export function does not need to be duplicated, and it is what users have been doing manually to get their objects.
Should solve https://github.com/CadQuery/cadquery/issues/965
Codecov Report
Merging #1101 (304aaea) into master (8ddad3b) will increase coverage by
0.00%. The diff coverage is100.00%.
@@ Coverage Diff @@
## master #1101 +/- ##
=======================================
Coverage 94.01% 94.01%
=======================================
Files 26 26
Lines 5410 5412 +2
Branches 918 919 +1
=======================================
+ Hits 5086 5088 +2
Misses 193 193
Partials 131 131
| Impacted Files | Coverage Δ | |
|---|---|---|
| cadquery/assembly.py | 96.56% <100.00%> (+0.02%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Shouldn't all of the "shape-formats" be supported then (and not just STL)?
This situation is very similar to what is happening with Workplanes in exporters.export, where any Workplane gets converted to a compound first.
You could achieve similar functionality to your proposal by allowing Assemblies in exporters.export - although I'm not in a position to foresee all issues that that could entail.
@lorenzncode @adam-urbanczyk Any thoughts on this?
STL has been discussed already. It does not support all the features of assy (color), but OK popular request and whatnot. -1 for other formats though.
I wasn't sure if the discussion in #965 had concluded. Regarding the use of such an STL, it may be that the user wants to access the solver functionality for a particular part. A user on Discord mentioned this approach, and asked "Am I misusing Assembly?".
Should I merge @jmwright @lorenzncode ?
+1
+1
Thanks @qwelyt !