[Plugin] CleanUp
-
This is strange. When I compare the dot product of various faces, I find an overlap in the return value for faces where you can erase the connecting edge:
# Not coplanar # 0.999999999898786 # 0.999999999901467 # 0.99999999992968 # 0.99999999995352 # 0.999999999959393 # 0.999999999974808 # # Coplanar # 0.999999999917881 # 0.999999999918562 # 0.999999999984962 # 0.999999999999148 # 0.999999999999408
-
@ecuadorian said:
Thanks! I think I now remember what the problem might be, also. The model is scaled a lot.
I did notice that - but I exploded it and it still occurs...
-
Could you take the edge, find its connected faces. Then get the object id for those faces, and get all their vertices positions. Then delete the edge if it is planar. Then test to see if those faces still exist. If they do, move on. If they do not, then rebuild them using their vertices' positions? Painful yes, but maybe useful?
Chris
-
@chris fullmer said:
Could you take the edge, find its connected faces. Then get the object id for those faces, and get all their vertices positions. Then delete the edge if it is planar. Then test to see if those faces still exist. If they do, move on. If they do not, then rebuild them using their vertices' positions? Painful yes, but maybe useful?
Chris
I did that kind of stuff in my previous version, prior to 7.1 - wasn't stable. So many cases to take into account. Faces with inner holes etc...
-
I think I might have misunderstood this whole DOT product from vectors... will have to look deeper into it.
-
Can you hit ctrl-z in ruby?
-
@thomthom said:
I think I might have misunderstood this whole DOT product from vectors... will have to look deeper into it.
What do you think is not working? from my quick browse of your script the dot product should do what you want.
-
@chris fullmer said:
Can you hit ctrl-z in ruby?
Yea, http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/sketchup.html#undo
But that would ruin any kind of possibility to undo the whole erase coplanar operation. -
...could create a temp group and use that to replicate the two faces (when within a range where we can't be certain.)
but I'd still try to avoid that if I can calculate this.
-
Hi Thomas, I lost a texture from a face in a 61k faces model. BTW what happens when you have coplaner faces with different textures, or images placed on textured faces (say a run on a wood floor). Didn't read all the post, so sorry if already covered.
-
@honoluludesktop said:
Hi Thomas, I lost a texture from a face in a 61k faces model. BTW what happens when you have coplaner faces with different textures, or images placed on textured faces (say a run on a wood floor).
At the moment it doesn't take into account materials. Only geometry.
Images? You mean an actual Image entity (It says "Image" in Entity Info when you select it?)
-
@honoluludesktop said:
Well, I often import images (as images, not textures), and place them on textured faces.
They would be ignored.
However, I do plan on adding an option for it to respect the material of the geometry. Just got to sort out some other issue first. -
Well, I often import images (as images, not textures), and place them on textured faces.
-
Opps, added image after your post.
-
Seems another very useful plug
About the Ecuadorian file
Why not scale the file *10, apply the plug, then scale 1/10 ? -
@unknownuser said:
Seems another very useful plug
About the Ecuadorian file
Why not scale the file *10, apply the plug, then scale 1/10 ?The scale isn't the issue.
-
This works very well. I have made Ctrl Shift C short cut for it. Thank you!
-
@jim said:
Ack! it doesn't look at materials?
Oh, and thank you!@honoluludesktop said:
Hi Thomas, I lost a texture from a face in a 61k faces model. BTW what happens when you have coplaner faces with different textures, or images placed on textured faces (say a run on a wood floor). Didn't read all the post, so sorry if already covered.
Option to respect materials applied added. On by default.
Ecuadorian:
I adjusted the tolerance so it shouldn't loose any geometry on the model you sent me. Hopefully it won't loose anything in other models either.
But there is some cases where which can be removed is left behind. I hope to address this. I figured it's best to be defensive than aggressive. -
Sounds nice, Thom!
Perhaps you could give the user two or three threshold options. -
@ecuadorian said:
Sounds nice, Thom!
Perhaps you could give the user two or three threshold options.I added an debug option which you can use for now. You can see it in the screenshot.
The closer to1.0
the stricter it is.
Advertisement