Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rather than using a heuristic, choose whichever point is closest to t… #375

Merged
merged 2 commits into from
Feb 27, 2021

Conversation

ryantrinkle
Copy link
Contributor

…he surface

@ryantrinkle
Copy link
Contributor Author

This is a draft because I haven't yet figured out how to check or update the golden tests.

@ryantrinkle
Copy link
Contributor Author

ryantrinkle commented Feb 7, 2021

TODO:

  • i need to look at the golden tests and see if they still look OK

@ryantrinkle
Copy link
Contributor Author

I've examined all the golden examples, and the only significant difference I noticed was that, after this change, the corners of the cubes are sharp rather than being cut off. This seems like an improvement.

All other differences I noticed were small and in mesh that already looked a bit messy/arbitrary.

@ryantrinkle ryantrinkle marked this pull request as ready for review February 27, 2021 15:27
@julialongtin julialongtin merged commit d0a9429 into Haskell-Things:master Feb 27, 2021
@julialongtin
Copy link
Member

alright, you get a merge.
it's a borderline one. according to admesh, objects tend to be slightly more outside of their area than they used to be.. you're right, corners are a hair sharper.. it doesn't change any of the degerate facets..
so, i almost would reject, but your solution clearly has less magic. if someone cares to re-add magic at that point in the program, they can document it better, and be less arbitrary in their magic number selection.

@julialongtin
Copy link
Member

juri@ni:/disk4/faikvm.com/IObjects$ admesh master/LM2596_DC_DC_Converter.stl
ADMesh version 0.98.4, Copyright (C) 1995, 1996 Anthony D. Martin
ADMesh comes with NO WARRANTY. This is free software, and you are welcome to
redistribute it under certain conditions. See the file COPYING for details.
Opening master/LM2596_DC_DC_Converter.stl
Checking exact...
Checking nearby. Tolerance= 0.003244 Iteration=1 of 2... Fixed 0 edges.
Checking nearby. Tolerance= 0.008978 Iteration=2 of 2... Fixed 0 edges.
Removing unconnected facets...
Filling holes...
Checking normal directions...
Checking normal values...
Calculating volume...
Verifying neighbors...

================= Results produced by ADMesh version 0.98.4 ================
Input file : master/LM2596_DC_DC_Converter.stl
File type : ASCII STL file
Header : solid ImplictCADExport
============== Size ==============
Min X = -3.200000, Max X = 46.549999
Min Y = -3.200000, Max Y = 24.299999
Min Z = -0.003553, Max Z = 7.500000
========= Facet Status ========== Original ============ Final ====
Number of facets : 128554 128566
Facets with 1 disconnected edge : 36 0
Facets with 2 disconnected edges : 0 0
Facets with 3 disconnected edges : 0 0
Total disconnected facets : 36 0
=== Processing Statistics === ===== Other Statistics =====
Number of parts : 1 Volume : 5417.523438
Degenerate facets : 0
Edges fixed : 0
Facets removed : 0
Facets added : 12
Facets reversed : 12
Backwards edges : 0
Normals fixed : 57
juri@ni:/disk4/faikvm.com/IObjects$ admesh new/LM2596_DC_DC_Converter.stl
ADMesh version 0.98.4, Copyright (C) 1995, 1996 Anthony D. Martin
ADMesh comes with NO WARRANTY. This is free software, and you are welcome to
redistribute it under certain conditions. See the file COPYING for details.
Opening new/LM2596_DC_DC_Converter.stl
Checking exact...
Checking nearby. Tolerance= 0.003244 Iteration=1 of 2... Fixed 0 edges.
Checking nearby. Tolerance= 0.008978 Iteration=2 of 2... Fixed 0 edges.
Removing unconnected facets...
Filling holes...
Checking normal directions...
Checking normal values...
Calculating volume...
Verifying neighbors...

================= Results produced by ADMesh version 0.98.4 ================
Input file : new/LM2596_DC_DC_Converter.stl
File type : ASCII STL file
Header : solid ImplictCADExport
============== Size ==============
Min X = -3.200000, Max X = 46.549999
Min Y = -3.200000, Max Y = 24.299999
Min Z = -0.003553, Max Z = 7.506790
========= Facet Status ========== Original ============ Final ====
Number of facets : 128554 128566
Facets with 1 disconnected edge : 36 0
Facets with 2 disconnected edges : 0 0
Facets with 3 disconnected edges : 0 0
Total disconnected facets : 36 0
=== Processing Statistics === ===== Other Statistics =====
Number of parts : 1 Volume : 5417.388672
Degenerate facets : 0
Edges fixed : 0
Facets removed : 0
Facets added : 12
Facets reversed : 12
Backwards edges : 0
Normals fixed : 57
juri@ni:/disk4/faikvm.com/IObjects$ admesh master/
LM2596_DC_DC_Converter.stl lulzbot_long_bearing_holder.stl lulzbot_tool_holding_plate.stl
juri@ni:/disk4/faikvm.com/IObjects$ admesh master/lulzbot_long_bearing_holder.stl
ADMesh version 0.98.4, Copyright (C) 1995, 1996 Anthony D. Martin
ADMesh comes with NO WARRANTY. This is free software, and you are welcome to
redistribute it under certain conditions. See the file COPYING for details.
Opening master/lulzbot_long_bearing_holder.stl
Checking exact...
Checking nearby. Tolerance= 0.000602 Iteration=1 of 2... Fixed 0 edges.
Checking nearby. Tolerance= 0.011456 Iteration=2 of 2... Fixed 0 edges.
Removing unconnected facets...
Filling holes...
Checking normal directions...
Checking normal values...
Calculating volume...
Verifying neighbors...

================= Results produced by ADMesh version 0.98.4 ================
Input file : master/lulzbot_long_bearing_holder.stl
File type : ASCII STL file
Header : solid ImplictCADExport
============== Size ==============
Min X = -0.003400, Max X = 97.000000
Min Y = -0.004201, Max Y = 42.504200
Min Z = -0.010027, Max Z = 23.769173
========= Facet Status ========== Original ============ Final ====
Number of facets : 645480 645482
Facets with 1 disconnected edge : 27 0
Facets with 2 disconnected edges : 0 0
Facets with 3 disconnected edges : 0 0
Total disconnected facets : 27 0
=== Processing Statistics === ===== Other Statistics =====
Number of parts : 1 Volume : 30135.478516
Degenerate facets : 7
Edges fixed : 0
Facets removed : 7
Facets added : 9
Facets reversed : 9
Backwards edges : 0
Normals fixed : 833
juri@ni:/disk4/faikvm.com/IObjects$ admesh new/lulzbot_long_bearing_holder.stl
ADMesh version 0.98.4, Copyright (C) 1995, 1996 Anthony D. Martin
ADMesh comes with NO WARRANTY. This is free software, and you are welcome to
redistribute it under certain conditions. See the file COPYING for details.
Opening new/lulzbot_long_bearing_holder.stl
Checking exact...
Checking nearby. Tolerance= 0.000602 Iteration=1 of 2... Fixed 0 edges.
Checking nearby. Tolerance= 0.011457 Iteration=2 of 2... Fixed 0 edges.
Removing unconnected facets...
Filling holes...
Checking normal directions...
Checking normal values...
Calculating volume...
Verifying neighbors...

================= Results produced by ADMesh version 0.98.4 ================
Input file : new/lulzbot_long_bearing_holder.stl
File type : ASCII STL file
Header : solid ImplictCADExport
============== Size ==============
Min X = -0.003400, Max X = 97.000000
Min Y = -0.004201, Max Y = 42.504200
Min Z = -0.014218, Max Z = 23.778023
========= Facet Status ========== Original ============ Final ====
Number of facets : 645480 645482
Facets with 1 disconnected edge : 27 0
Facets with 2 disconnected edges : 0 0
Facets with 3 disconnected edges : 0 0
Total disconnected facets : 27 0
=== Processing Statistics === ===== Other Statistics =====
Number of parts : 1 Volume : 30135.929688
Degenerate facets : 7
Edges fixed : 0
Facets removed : 7
Facets added : 9
Facets reversed : 9
Backwards edges : 0
Normals fixed : 833
juri@ni:/disk4/faikvm.com/IObjects$ admesh master/lulzbot_tool_holding_plate.stl
ADMesh version 0.98.4, Copyright (C) 1995, 1996 Anthony D. Martin
ADMesh comes with NO WARRANTY. This is free software, and you are welcome to
redistribute it under certain conditions. See the file COPYING for details.
Opening master/lulzbot_tool_holding_plate.stl
Checking exact...
Checking nearby. Tolerance= 0.000040 Iteration=1 of 2... Fixed 0 edges.
Checking nearby. Tolerance= 0.015574 Iteration=2 of 2... Fixed 0 edges.
Removing unconnected facets...
Filling holes...
Checking normal directions...
Checking normal values...
Calculating volume...
Verifying neighbors...

================= Results produced by ADMesh version 0.98.4 ================
Input file : master/lulzbot_tool_holding_plate.stl
File type : ASCII STL file
Header : solid ImplictCADExport
============== Size ==============
Min X = -0.000000, Max X = 100.000000
Min Y = 0.078912, Max Y = 118.800003
Min Z = -0.032054, Max Z = 6.030220
========= Facet Status ========== Original ============ Final ====
Number of facets : 722208 722218
Facets with 1 disconnected edge : 30 0
Facets with 2 disconnected edges : 0 0
Facets with 3 disconnected edges : 0 0
Total disconnected facets : 30 0
=== Processing Statistics === ===== Other Statistics =====
Number of parts : 1 Volume : 56750.714844
Degenerate facets : 0
Edges fixed : 0
Facets removed : 0
Facets added : 10
Facets reversed : 10
Backwards edges : 0
Normals fixed : 88
juri@ni:/disk4/faikvm.com/IObjects$ admesh new/lulzbot_tool_holding_plate.stl
ADMesh version 0.98.4, Copyright (C) 1995, 1996 Anthony D. Martin
ADMesh comes with NO WARRANTY. This is free software, and you are welcome to
redistribute it under certain conditions. See the file COPYING for details.
Opening new/lulzbot_tool_holding_plate.stl
Checking exact...
Checking nearby. Tolerance= 0.000040 Iteration=1 of 2... Fixed 0 edges.
Checking nearby. Tolerance= 0.015574 Iteration=2 of 2... Fixed 0 edges.
Removing unconnected facets...
Filling holes...
Checking normal directions...
Checking normal values...
Calculating volume...
Verifying neighbors...

================= Results produced by ADMesh version 0.98.4 ================
Input file : new/lulzbot_tool_holding_plate.stl
File type : ASCII STL file
Header : solid ImplictCADExport
============== Size ==============
Min X = -0.000000, Max X = 100.000000
Min Y = 0.078912, Max Y = 118.800003
Min Z = -0.045336, Max Z = 6.030220
========= Facet Status ========== Original ============ Final ====
Number of facets : 722208 722218
Facets with 1 disconnected edge : 30 0
Facets with 2 disconnected edges : 0 0
Facets with 3 disconnected edges : 0 0
Total disconnected facets : 30 0
=== Processing Statistics === ===== Other Statistics =====
Number of parts : 1 Volume : 56750.851562
Degenerate facets : 0
Edges fixed : 0
Facets removed : 0
Facets added : 10
Facets reversed : 10
Backwards edges : 0
Normals fixed : 88
juri@ni:/disk4/faikvm.com/IObjects$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants