xibyte / jsketcher

Parametric 2D and 3D modeler written in pure javascript
http://web-cad.org
Other
1.49k stars 279 forks source link

Export as FCStd #179

Closed samuk closed 1 year ago

samuk commented 2 years ago

Would it be possible to support export in FCStd format as well as the import?

https://github.com/xibyte/jsketcher/issues/160#issuecomment-1198938774

mmiscool commented 2 years ago

We can do an export to brp. That is the OpenCASCADE internal format. FreeCAD opens those files with out any resistance. A FCStd file is just a zip file containing some XML and a collection of brp files.

Would brp export fit your use case or do you absolutely need FCStd output?

samuk commented 2 years ago

Yes it sounds like brp would do the job. Thanks

mmiscool commented 2 years ago

Ok. I think we can get this working relatively soon. Stay tuned for when this will drop.

samuk commented 1 year ago

Actually thinking about this, proper FCStd would be preferable. I'm thinking of future integration with Github/Gitlab where you could load your FCStd from a git URL and then save your changes to Git.

Does that seem at all viable/on your roadmap?

mmiscool commented 1 year ago

Import / export functionality relating directly to FCStd is really only for single direction data migration. It would not be especially good for active community design as each time a model is loaded or stored only the geometry is preserved. The part history would not be preserved going from one CAD application to another.

samuk commented 1 year ago

Is it possible to record the part history in a FCStd? I realise it's probably low-priority work. I do think frictionless compatibility with FreeCAD would aid adoption and resolve some use cases where FreeCAD currently has more functionality.

Put another way: If Jsketcher fulfils 90% of my design needs I'm likely to use it, and do finishing work in Freecad.

If I can't do finishing work in Freecad, then I'd probably have to use Freecad for the whold project from start to finish.

mmiscool commented 1 year ago

Well for now I pushed the "Export BREP" command. If you run from the dev branch you can give it a try.

samuk commented 1 year ago

Thanks, will have a go.

mmiscool commented 1 year ago

@samuk Was the export brep adequate for loading models produced in JSketcher to FreeCAD?

samuk commented 1 year ago

To be completely honest I found working with FLOSS cad tools so frustrating, I've just started working in ways that don't require 3D modeling. I'll try again in a couple of years, but the learning curve was too steep.

mmiscool commented 1 year ago

Closing issue for now.