Currently we export multiple file types from CadQuery using ExSource. I think we currently build each from scratch which isn't efficient.
Some thoughts
Can cqcli/exsource be modified to allow multiple file types to be exported without rebuilding the shape
Can we import STLs into CadQuery if we are assembling them?
in #79 there @jmwright mentions"
I believe there is a plugin that allows STLs to be imported, but STL->STEP conversion can get pretty messy if it is a complex shape with non-planar faces.
I STL import is something to look into. The messyness STL->STEP conversion depends on the implementation. STEP itself is happy to hold mesh information. So as long as there is no attempt to change the underlying shape to B-rep then nothing should break. For our case as we are only doing assembly rather than modification of the shape there is no reason we need to be modifying the STLs, so conversion to B-rep shouldn't be needed. It is worth checking whether the plug in always tries to do B-rep conversion.
If it doesn't this will allow STLs made in other programs like OpenSCAD to be assembled with CadQuery, which would be nice.
The STL importer I was referencing is here, and is part of the cqMore library. I used it to convert a 3D scan of a camera trap from STL to STEP in CadQuery. The result is here. I had to clean up and simplify the mesh in MeshLab before CadQuery could handle it.
Right, that super useful. I can imagine a 3D scan having a much more complex mesh than our shelves. We can also use admesh to check for and clean mesh issues if we need to.
Currently we export multiple file types from CadQuery using ExSource. I think we currently build each from scratch which isn't efficient.
Some thoughts
in #79 there @jmwright mentions"
I STL import is something to look into. The messyness STL->STEP conversion depends on the implementation. STEP itself is happy to hold mesh information. So as long as there is no attempt to change the underlying shape to B-rep then nothing should break. For our case as we are only doing assembly rather than modification of the shape there is no reason we need to be modifying the STLs, so conversion to B-rep shouldn't be needed. It is worth checking whether the plug in always tries to do B-rep conversion.
If it doesn't this will allow STLs made in other programs like OpenSCAD to be assembled with CadQuery, which would be nice.