Can we have a different geometry format than the Mesh?

Hi there,
For USD to be a useful format to exchange between 3D CAD and associated applications, the reasonable expectation is for USD to support geometry in formats like IGES, STEP, X_T, etc., other than the default Mesh form that the USD currently supports. Is there a way to extend the schema to override the “Prim” geometry format and instead have one of the CAD file formats mentioned above?

Thanks.

Yes. The concept you are looking for is a File Format plugin. The usd source code ships with examples for translating Alembic and Obj files. You’ll create a subclass of the SdfFileFormat class and implement the functions it needs. You can support reading only, or both reading and writing.

https://openusd.org/release/api/class_sdf_file_format.html

Hi Peter,
Thanks for the response. Very helpful to know that there exists a way to export/import CAD file formats other than the default Mesh. Can you please point me to a link that has got the examples you have mentioned?

Thanks again.

@Vadi Here are the obj plugin and alembic plugin that Peter mentioned.

Hi Matias,
Thanks for the examples. It is very helpful.