karl- / pb_Stl

STL import/export for Unity, supporting both ASCII and Binary.
MIT License
179 stars 43 forks source link

I have a question about importing STL during runtime. #24

Open JHsGame opened 2 years ago

JHsGame commented 2 years ago

https://stackoverflow.com/questions/46733430/convert-mesh-to-stl-obj-fbx-in-runtime At the end of the answer at the address above, I confirmed and tried that STL can be fetched during runtime. But the code didn't work as I expected. The error appeared from the part called pb_stl. The following is declared using alt + enter to check whether the related namespace is not called. using Parabox.Stl; Nevertheless the code showed an error. please help me.

karl- commented 2 years ago

What is the error exactly?

JHsGame commented 2 years ago

I just read the comments. I'm so sorry for the late reply.

I declared the next part. ->using Parabox.Stl;

Nevertheless, I didn't get the phrase pb_stl.

The syntax for finding an error is two cases:

pb_Stl.WriteFile(path, mesh, FileType.Ascii);

//OR pb_Stl_Exporter.Export(path, new GameObject[] { objMeshToExport }, FileType.Ascii);

The errors in that area are as follows.

The name 'pb_Stl' does not exist in the current context. The name 'pb_Stl_Exporter' does not exist in the current context.

So now we're using the following syntax, and it's actually working. Mesh[] mesh = Importer.Import(path);

I wonder if the function related to pb_Stl has been replaced by Importer. I wonder why it didn't work because of the error.

Additionally, I'm curious about the criteria for how the meshes are divided into pieces after being brought to STL.

There must have been some kind of gibberish, but there must have been some mistakes in using a translator, and some of my mistakes for lack of explanation. Thank you for reading this long article Error .

braneof commented 1 year ago

I'm not doing import, but for export, instead of using pb_Stl.WriteFile it's now Exporter.WriteFile. Based on another issue, it looks like import uses Importer instead of pb_Stl.