sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    [solved] merging two triangle faces of a mesh-square

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 3 Posters 656 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • artmusicstudioA Offline
      artmusicstudio
      last edited by artmusicstudio

      hi,

      in my project i iterate thru selected elements and separate

      edges
      faces
      groups
      components

      but

      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


      140701-a.png


      140701-b.png

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        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'... πŸ˜•

        TIG

        1 Reply Last reply Reply Quote 0
        • tt_suT Offline
          tt_su
          last edited by

          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".

          1 Reply Last reply Reply Quote 0
          • artmusicstudioA Offline
            artmusicstudio
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement