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

Export file types and efficency #83

Open
julianstirling opened this issue Jul 1, 2024 · 2 comments
Open

Export file types and efficency #83

julianstirling opened this issue Jul 1, 2024 · 2 comments

Comments

@julianstirling
Copy link
Collaborator

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.

@jmwright
Copy link
Contributor

jmwright commented Jul 1, 2024

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.

@julianstirling
Copy link
Collaborator Author

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.

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

2 participants