mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
102.4k stars 35.35k forks source link

parasolid exporter #22723

Closed foobarbecue closed 1 year ago

foobarbecue commented 3 years ago

FYI I'm working on a parasolid exporter (x_t to begin with). Just posting an issue to avoid duplicating effort or in case anyone wants to discuss / collaborate. I expect to have a PR ready in a few weeks.

Mugen87 commented 3 years ago

When I understand it correctly Parasolid is a CAD 3D specification whereas x_t is a file extension indicating that a Parasolid asset is saved in the text format. Is that right?

Besides, can Parasolid be considered as an alternative to STEP?

Sorry for these basic questions but apart from IFCLoader we have not much CAD specific components in this repository.

huangdade commented 2 years ago

Do you want to import x_t files as mesh, or export mesh to x_t files?

foobarbecue commented 2 years ago

@Mugen87 you're correct on all counts. Parasolid is CAD, x_t is the text version of it, and it could be considered an alternative to STEP.

@huangdade I want to export threejs mesh to x_t.

The challenge is that Parasolid describes a full topology, with halfedges and regions and loops and everything, so the first step is to construct a topology from the geometry. For this I was hoping to get a headstart by using https://github.com/stemkoski/stemkoski.github.com/blob/master/Three.js/js/topology.js

Mugen87 commented 1 year ago

Feel free to file a new (external) example similar to webgl_raycaster_bvh or webgl_loader_ifc when your exporter is ready. The idea would be to maintain the exporter itself in a separate repository and then just include the library. Ideally from a CDN (e.g. unpkg).

foobarbecue commented 1 year ago

Ah, sorry for trailing off on this one and thanks for closing. I wasn't making quick enough progress on it and ended up using an 3d file conversion web API instead for the project I was writing it for. So I probably won't get around to completing the exporter.