JSModeler icon indicating copy to clipboard operation
JSModeler copied to clipboard

There's no import examples, and no usage in reference

Open vongoethe opened this issue 7 years ago • 3 comments

I cannot find any information about import operation. How is it used? Nothing in the examples and tutorials, even nothing in the docs. Could you please provide some information? Thanks

vongoethe avatar Feb 16 '17 08:02 vongoethe

Hi!

Definitely I have to create some documentation :)

Until this I recommend you to see examples in the sandbox folder: https://github.com/kovacsv/JSModeler/blob/development/sandbox/importeralltypes.html https://github.com/kovacsv/JSModeler/blob/development/sandbox/importerdragdrop.html https://github.com/kovacsv/JSModeler/blob/development/sandbox/importerurl.html

Viktor

kovacsv avatar Feb 16 '17 10:02 kovacsv

From the examples, I understand that imported data is converted to JSON, and can only be used with ConvertJSONDataToRenderBodies for rendering. Is there a way a to merge the imported data with a JSM.Body?

My goal is to import an OBJ file, add some mesh generated with JSM and export the result to OBJ. I don't need to render with three.js. Is it possible?

mauricesvay avatar Sep 17 '17 15:09 mauricesvay

Unfortunately this convertion is not implemented at the moment, but JSONData is a triangulated representation of the model, so it is easy to convert it to an obj file.

You can create JSONData from a model with the ConvertModelToTriangleModel and ConvertTriangleModelToJsonData functions.

kovacsv avatar Sep 27 '17 06:09 kovacsv