Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JHsGame opened this issue Feb 8, 2022 · 3 comments
Open

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

JHsGame opened this issue Feb 8, 2022 · 3 comments

Comments

@JHsGame
Copy link

JHsGame commented Feb 8, 2022

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-
Copy link
Owner

karl- commented Feb 14, 2022

What is the error exactly?

@JHsGame
Copy link
Author

JHsGame commented Apr 6, 2022

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
Copy link

braneof commented Apr 26, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants