Created
November 14, 2012 10:07
-
-
Save Uko/4071330 to your computer and use it in GitHub Desktop.
String for parsing ASCII STL 3D format with regex. Normal can be retrieved by groups 1, 4 and 7, vertices by (10, 13, 16), (19, 22, 25), (28, 31, 34)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"facet\\s+?normal" + | |
"\\s+?(-?\\d+(\\.\\d+([eE][+-]\\d+)?)?)" + | |
"\\s+?(-?\\d+(\\.\\d+([eE][+-]\\d+)?)?)" + | |
"\\s+?(-?\\d+(\\.\\d+([eE][+-]\\d+)?)?)" + | |
"\\s+?outer\\s+?loop" + | |
"\\s+?vertex" + | |
"\\s+?(-?\\d+(\\.\\d+([eE][+-]\\d+)?)?)" + | |
"\\s+?(-?\\d+(\\.\\d+([eE][+-]\\d+)?)?)" + | |
"\\s+?(-?\\d+(\\.\\d+([eE][+-]\\d+)?)?)" + | |
"\\s+?vertex" + | |
"\\s+?(-?\\d+(\\.\\d+([eE][+-]\\d+)?)?)" + | |
"\\s+?(-?\\d+(\\.\\d+([eE][+-]\\d+)?)?)" + | |
"\\s+?(-?\\d+(\\.\\d+([eE][+-]\\d+)?)?)" + | |
"\\s+?vertex" + | |
"\\s+?(-?\\d+(\\.\\d+([eE][+-]\\d+)?)?)" + | |
"\\s+?(-?\\d+(\\.\\d+([eE][+-]\\d+)?)?)" + | |
"\\s+?(-?\\d+(\\.\\d+([eE][+-]\\d+)?)?)" + | |
"\\s+?endloop\\s+?endfacet" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment