xfetus / pe

:microscope: public-engagement: Ultrasound simulator to Find a fETus with UltraSound (FETUS)
5 stars 1 forks source link

How to simplify meshes in STL format #11

Closed mxochicale closed 3 years ago

mxochicale commented 3 years ago

Hi @nomadtahir

From our STL fetuses we might be able to simplify meshes as Michael Fogleman did here https://www.michaelfogleman.com/projects/mesh-simplification/ https://github.com/fogleman/simplify

Actions for MX:

mxochicale commented 3 years ago

Simplify meshes

cd $HOME/repositories
#git clone git@github.com:fogleman/simplify.git
#cd simplify
#go get -u github.com/fogleman/simplify/cmd/simplify
go install github.com/fogleman/simplify/cmd/simplify@latest
go env # to see where the bin files are in your user account
cd  $HOME/go/bin
./simplify -f 0.1 $HOME/xfiles/xfetus/public-engagement-project/3D-printing/foetuses/static-fetus/references/stl-files/legacy/week-12-growing-baby.stl $HOME/xfiles/xfetus/public-engagement-project/3D-printing/foetuses/static-fetus/references/stl-files/meshes-less-than-300000triangles/week-12-growing-baby-f01.stl
mxochicale commented 3 years ago
* Other factors 
  * (./simplify -f 0.05)

./simplify -f 0.05 $HOME/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/legacy/week-12-growing-baby.stl $HOME/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/meshes-factor-tests/week-12-growing-baby-f005.stl Loading /home/mx19/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/legacy/week-12-growing-baby.stl Input mesh contains 300038 faces Simplifying to 5% of original... Output mesh contains 15000 faces Writing /home/mx19/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/meshes-factor-tests/week-04-growing-baby-f001.stl


  * (./simplify -f 0.04)

./simplify -f 0.04 $HOME/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/legacy/week-12-growing-baby.stl $HOME/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/meshes-factor-tests/week-12-growing-baby-f004.stl Loading /home/mx19/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/legacy/week-12-growing-baby.stl Input mesh contains 300038 faces Simplifying to 4% of original... Output mesh contains 12000 faces Writing /home/mx19/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/meshes-factor-tests/week-12-growing-baby-f004.stl


  * (./simplify -f 0.03)

./simplify -f 0.03 $HOME/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/legacy/week-12-growing-baby.stl $HOME/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/meshes-factor-tests/week-12-growing-baby-f003.stl Loading /home/mx19/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/legacy/week-12-growing-baby.stl Input mesh contains 300038 faces Simplifying to 3% of original... Output mesh contains 9000 faces Writing /home/mx19/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/meshes-factor-tests/week-12-growing-baby-f003.stl


  * (./simplify -f 0.02)

./simplify -f 0.02 $HOME/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/legacy/week-12-growing-baby.stl $HOME/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/meshes-factor-tests/week-12-growing-baby-f002.stl Input mesh contains 300038 faces Simplifying to 2% of original... Output mesh contains 6000 faces Writing /home/mx19/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/meshes-factor-tests/week-12-growing-baby-f002.stl


  * (./simplify -f 0.01)

./simplify -f 0.01 $HOME/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/legacy/week-12-growing-baby.stl $HOME/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/meshes-factor-tests/week-12-growing-baby-f001.stl Loading /home/mx19/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/legacy/week-12-growing-baby.stl Input mesh contains 300038 faces Simplifying to 1% of original... Output mesh contains 3000 faces Writing /home/mx19/repositories/xfetus/public-engagement-project/3D-printing/static-fetus/cads/stl-files/meshes-factor-tests/week-12-growing-baby-f001.stl