[solved] merging two triangle faces of a mesh-square
-
hi,
in my project i iterate thru selected elements and separate
edges
faces
groups
componentsbut
when i select a square from a sandbox-mesh, my group info shows not FACE , but (german) "Oberflaeche", which is something like "surface" or "plane???".
now the question is, how can i "filter" it in an iteration ( >> if innerface.is_a?(Sketchup::?????),
because otherwise this square is regarded as two faces (2 triangles).
i have to delete the smooth-diagonal to get a clear face for my further operations.
so:
is there a way, how to identify this kind of SURFACE ?
thanx
stan
-
If you have Hidden-Geometry 'Off' and you Select a bound Face [aka one that's part of a 'Surface'] - then all connected are Selected, and then 'Entity Info' says it's a 'Surface'.
If you have Hidden-Geometry 'On' and you Select a Face [which might also form part of a 'Surface'] - then only that Face is Selected, and then 'Entity Info' says it's a 'Face'.
In the API code... when you 'Select' [or refer to] a Face it is always referenced as a Face.
BUT you can check if it's part of a 'Surface' by looking through its face.loop.edges and seeing if any of them have smooth/soft set true - if they are, then it is also part of a 'Surface'...To go back to what I think was the original question...
If you want to find [and then perhaps erase] non-essential edges, which perhaps 'triangulate' otherwise coplanar faces in a quad, then there are several long established plugins/methods that already do that... so you can look at their methods and learn...
Search for 'erase/delete coplanar edges'...
-
CleanUp does this. It takes all the points of the two faces to compare and create a best fit plane - then checks if all the points are on that plane.
That is also what SketchUp does internally. Comparing normals will give false positives.If you look at QuadFace Tools you can also find surface detection - as it treats two triangles as one unit. There I made custom iterators and classes to wrap around "surfaces".
-
hi tt,
to finish this topic,
i learned how to identify a surface and handle its parts (faces) and now i can manupulate its elements, as needed.thanx to all in this topic for helping and ttheir ideas.
stan
Advertisement