STL,VTK 与ASC 格式的转化

来源:互联网 发布:佛山淘宝客服外包 编辑:程序博客网 时间:2024/05/29 18:20
The only app I know for having this functionality is Alias Spider, a standalone app which complement AliasStudio reverse engineering toolset (www.alias.com).

Otherwise a STL Ascii file can be fairly easily deciphered and converted to a .ASC file. Basically all the information but the vertices XYZ information should be removed from the file.

Depending on the tools you are familiar with and the OS you are running, this can be achieved via simple shell or perl commands.

Or this could also be achieved with an advanced text editor such as Textpad. Here is a way to do it in Textpad:

1. open the STL Ascii file in Textpad
2a. open the Edit > Search dialog
2b. type in "vertex" for Search What
2c. leaving the other options as is, click on the "Mark All" button
(all the lines w/ "vertex" in should be tagged)
2d. close the Search dialog
3. Search > Invert All Bookmarks
(all the lines w/o "vertex" in should be tagged now)
4. Edit > Delete > Bookmarked Lines
(all the remaining lines should have "vertex" w/ their XYZ coordinates)
5. select all the characters and empty spaces before the 1st value (X)
6a. Search > Replace (or hit F8)
6b. the "Find What" field should be automatically filled in with the previous selection
6c. leave the "Replace With" field empty
6d. click on the "Replace All" button
7. save your file w/ a .asc extension

Voila.

This should do it. Otherwise you could pm me and I could convert the file with Spider.
0 0
原创粉丝点击