Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

.STL to .ASC

lleh

New member
Hello,


How are you guys doing?. I am trying to convert an .STL file to a .ASC so that i have the xyz coordinates. The only function i have seen converts a binary stl file to an ascii stl file (which is not what i want). Any help or hintsto do this would be greatly appreciated. Also, as i said earlier my primary objective is to get the xyz coordinates from an stl fileso i am open to methods other than converting the stl file to an .asc file. Thanks.


Mark



Edited by: lleh
 
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.
 
Hey Voila,





Thanks alot. It worked perfectly. I feel funny i did not think of it, considering the stl-ascii file looks exactly like an ascii with just the numbers.


Thanls


Mark
 

Sponsor

Articles From 3DCAD World

Back
Top