Closed thomthom closed 11 years ago
Btw, you see the symptom easier if you import it with the Merge coplanar faces feature. But it's also there without - so it's not the clean up operation doing this.
I just ran a healing function I wrote for Vertex Tools and that fixed all the issues in this model. It's basically the same trick that's been used to merge co-linear edges - create a temp group with dummy zero length edges for each vertex to heal and explode the group.) That triggers SketchUp's own healing process. I made it heal every vertex in the mesh and that merged the edges and cleaned out the zero length ones.
Neat!
We really need to find some more, large test files. I'm curious how these cleanups affect performance on big models.
I'm not implementing this healing function yet. Want to get the rest of the code cleaned up first. And run more STL tests to see how geometry imports.
As for performance, cleaning up takes longer than importing. Testing with a semi-complex model like the Harrier: https://www.dropbox.com/sh/gm8sv1vzcrrp0yb/9Q_p4VFHXy/harrier_jet.stl
You can see how it takes much longer to process. If you've ever used CleanUp you get an idea of the time. I'm porting code from that. In CleanUp I added lots of statusbar updates for each cleanup step as well an percent value. I didn't add that to this plugin because under Windows SketchUp whites out - something I used Win32 API in CleanUp to force UI refresh.
Once we've mapped out the various geometry oddities we get when importing we can profile the cleaning operation and see exactly how much the performance is affected.
Idea:
After geometry has been imported the importer checks of the imported group is a solid. If it is not it will perform a series of repair functions. If that also fails it gives up and alerts the user.
That seems like a logical thing to do. In the most robust GUI version of the importer, should we give the user the ability to bypass this auto-repair? I'm always hesitant to use those options blindly, but I do like to try them to see what they do. In other words, I'm not always confident that the computer will know how I want it to fix things for me better than I know. So the ability to toggle auto-repair on and off would be nice in my opinion.
Chris
On Wed, Oct 31, 2012 at 10:22 AM, Thomas Thomassen <notifications@github.com
wrote:
Idea:
After geometry has been imported the importer checks of the imported group is a solid. If it is not it will perform a series of repair functions. If that also fails it gives up and alerts the user.
— Reply to this email directly or view it on GitHubhttps://github.com/SketchUp/sketchup-stl/issues/20#issuecomment-9953699.
Yea, I know what you mean. I'm also sceptical to auto-magical features. However, I'm also hesitate to add too many options. The UI quickly becomes cluttered and confusing.
In regard to healing vertices - the only effect should be triggering the SketchUp healing mechanism. It doesn't remove or change the geometry in any other way. I'd consider it safe - unlike the Merge feature. Only thing is that it takes extra processing time. But the extra time can fix lots of small issues that'd take a long time to fix manually.
So, how about a vote:
When geometry is imported and it's detected to not be a solid, should we run an automatic pass that tries to heal the entities? The operation is simply adding a set of temp zero length edges for each vertex into a temp group which is then exploded. This triggers SketchUp's own healing mechanisms. I have used this in Vertex Tools and CleanUp and never seen a bad side-effect from it - other that a little extra processing time.
I prefer that it just does it automatically - less options to fiddle around with. "Just works".
Yey or Ney?
I vote Yey.
I second the motion, or the Yey.
On Fri, Nov 16, 2012 at 9:29 AM, Scott Lininger notifications@github.comwrote:
I vote Yey.
— Reply to this email directly or view it on GitHubhttps://github.com/SketchUp/sketchup-stl/issues/20#issuecomment-10452753.
Jody
Same, yey.
On Fri, Nov 16, 2012 at 8:32 AM, eternus notifications@github.com wrote:
I second the motion, or the Yey.
On Fri, Nov 16, 2012 at 9:29 AM, Scott Lininger notifications@github.comwrote:
I vote Yey.
— Reply to this email directly or view it on GitHub< https://github.com/SketchUp/sketchup-stl/issues/20#issuecomment-10452753>.
Jody
— Reply to this email directly or view it on GitHubhttps://github.com/SketchUp/sketchup-stl/issues/20#issuecomment-10452842.
+1
On Fri, Nov 16, 2012 at 2:28 PM, ChrisFullmer notifications@github.comwrote:
Same, yey.
On Fri, Nov 16, 2012 at 8:32 AM, eternus notifications@github.com wrote:
I second the motion, or the Yey.
On Fri, Nov 16, 2012 at 9:29 AM, Scott Lininger < notifications@github.com>wrote:
I vote Yey.
— Reply to this email directly or view it on GitHub< https://github.com/SketchUp/sketchup-stl/issues/20#issuecomment-10452753>.
Jody
— Reply to this email directly or view it on GitHub< https://github.com/SketchUp/sketchup-stl/issues/20#issuecomment-10452842>.
— Reply to this email directly or view it on GitHubhttps://github.com/SketchUp/sketchup-stl/issues/20#issuecomment-10462881.
Reference file:
https://www.dropbox.com/s/62mizso4bm4pd3g/carcassone_tile_holderV5.stl
When imported it's not a solid. There are a few places where I need to draw new edges on top of a few existing ones to make them merge properly.
There's also a couple of zero length edges.
Is this due to the data in the STL, or is it the importer?
If it's the STL data - is there something we can do to correct it? (Erase zero length edges, force vertex healing?)