
I've got one... hehe
How to detect if two faces are EXACTLY coplanar or not?
9 posts
• Page 1 of 1
How to detect if two faces are EXACTLY coplanar or not?So, I've made a script that erases any lines in-between coplanar faces. The only way that I could think of detecting if they are coplanar is by checking their normals for equality, but the returned normal is an approximation, not the true value
![]() I've got one... hehe
Re: How to detect if two faces are EXACTLY coplanar or not?yeah see that's one thing I know nothing about ruby... and I mean nothing.
hopefully someone will save us from stumpage. Re: How to detect if two faces are EXACTLY coplanar or not?Well, define your use of "coplanar". Coplanar means "on the same plane". So:
if face1.plane == face2.plane then puts "faces are coplanar" ; end ; Now, if you also mean 100% "coincident", then the defined bounding box of each face will match. If you mean partially overlapping, then tests would have to be made with various points (vertices) on one face with the bounding box of the other face, and then vice versa as well. Todd Re: How to detect if two faces are EXACTLY coplanar or not?Well, are plane values exact? That I will check tomorrow. As for stumpage you might still be in it.
Re: How to detect if two faces are EXACTLY coplanar or not?
Yeah, by 4 minutes... ![]() Re: How to detect if two faces are EXACTLY coplanar or not?What's that about? What do you have? Can everyone have one? ![]() I had to pull out my superhero eyeglasses to read that! RickW
www.smustard.com Re: How to detect if two faces are EXACTLY coplanar or not?This may not be the best solution, but the logic is sound..
Check for deleted faces just after erasing the edge, and if the face is also deleted, undo and continue with the next edge in the loop. It may not be too costly because the trash loop is already a limited set containing only edges that are candidates for removal. But then again, I've noticed skin.rb can get slow already (not your fault.) Hi
Re: How to detect if two faces are EXACTLY coplanar or not?Ok, I must admit that not knowing how to fix this was pretty stupid. It was the second method I wrote on my first script and I wasn't - and I still am not - very knowledgeable about the API. The only reason that I thought it would stump you guys is that the STUPID google employee at the sketchup help group (not pro) told me that an approximation was as close as I could get
![]()
Re: How to detect if two faces are EXACTLY coplanar or not?Yeehaaa
here's a dummy way with a tetrahedron fudge your model with a face on x,y plane and one edge on the x axis - you hope. this face must be filled draw a flat rectangle joining this edge at both end and extend along the flat plane y. It should fill by itself. the line in between can be removed and it should all fill - if not you screwed up placing your model I think this is fundamental to any modelling (would you start a 2d drg without an origin, scale and xy directions As one door closes another one slams in your face
9 posts
• Page 1 of 1
|