Error in stl2vrml conversion

1 次查看(过去 30 天)
Matthias
Matthias 2012-11-9
编辑: varun rao 2015-9-6
Hi
I'm trying to build a virtual world from a .STL assemly and I am getting the following error:
"STLB__ASM__216.00.01.1000" is not a valid VRML identifier.
Using the command:
>> stl2vrml('KneeBrace_full_assembly.stl','virtualworlds')
in the forlder where the .STL file is located. the folder virtualworlds also already exists.
Googling the error also doesn't reveal any results.
Any thoughts on what might be the problem?
Best

回答(1 个)

Jan Danek
Jan Danek 2012-11-15
编辑:Jan Danek 2012-11-15
Hi Matthias,
The reason for the error is that the STL file contained the string "STLB__ASM__216.00.01.1000" in the solid name field. This field is used by STL2VRML function to define the corresponding VRML object DEF name - and dots (".", 0x2e) are not allowed in VRML97 DEF names.
1. I assume that your STL file is an ASCII STL file. Open the file in any plain text editor (for instance MATLAB Editor) and replace dots in the name at the first line of the file with something else, I suggest underlines (_).
Most probably, your first line looks like this:
solid STLB__ASM__216.00.01.1000
Change it to:
solid STLB__ASM__216_00_01_1000
(Or, better, to something meaningful for you, like: solid Flywheel_1 )
Valid characters for VRML node names are described in the end of A.3 Appendix of the VRML97 standard:
Of course, you can correct the file also by making sure that your CAD tool doesn't export STL files with dots in solid names.
2. I would like to ask you a favour - please let me know which software, and under which circumstances exported your STL files with dots in solid names. We need this information so that we can make STL2VRML more robust. For instance, I am interested if the "STLB__ASM__216.00.01.1000" name directly corresponds to some CAD part name, etc.
Good luck and thank you for your diagnostic info.
Jan
  1 个评论
varun rao
varun rao 2015-9-6
编辑:varun rao 2015-9-6
Solid parts which are downloaded from grabcad website have this problem. After making the change from STLB ASM 218.00.00.0000 to solid STLB_ASM_218_00_00_0000, I am getting one more error saying 'Product of known dimensions, 12, not divisible into total number of elements, 596882'. Please let me know how to solve this.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Model Import 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by