Created
December 9, 2015 06:48
-
-
Save show0k/bd9481d2e221d203aa5b to your computer and use it in GitHub Desktop.
Clean STL for 3D simulator
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
#!/bin/bash | |
# Delete 80% of meshes | |
# you need to install meshlab before : | |
# -> sudo apt-get install meshlab on Debian | |
# -> brew install meshlab on OSX | |
for f in `ls *.STL`; do | |
echo $f | |
meshlabserver -i "$f" -s script.mlx -o "$f" | |
done |
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
<!DOCTYPE FilterScript> | |
<FilterScript> | |
<filter name="Snap Mismatched Borders"> | |
<Param type="RichFloat" value="0.01" name="EdgeDistRatio"/> | |
<Param type="RichBool" value="true" name="UnifyVertices"/> | |
</filter> | |
<filter name="Merge Close Vertices"> | |
<Param type="RichAbsPerc" value="0.000250233" min="0" name="Threshold" max="0.000521319"/> | |
</filter> | |
<filter name="Quadric Edge Collapse Decimation"> | |
<Param type="RichInt" value="0" name="TargetFaceNum"/> | |
<Param type="RichFloat" value="0.2" name="TargetPerc"/> | |
<Param type="RichFloat" value="0.3" name="QualityThr"/> | |
<Param type="RichBool" value="false" name="PreserveBoundary"/> | |
<Param type="RichFloat" value="1" name="BoundaryWeight"/> | |
<Param type="RichBool" value="true" name="PreserveNormal"/> | |
<Param type="RichBool" value="true" name="PreserveTopology"/> | |
<Param type="RichBool" value="true" name="OptimalPlacement"/> | |
<Param type="RichBool" value="true" name="PlanarQuadric"/> | |
<Param type="RichBool" value="false" name="QualityWeight"/> | |
<Param type="RichBool" value="true" name="AutoClean"/> | |
<Param type="RichBool" value="false" name="Selected"/> | |
</filter> | |
</FilterScript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To use it: