sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    How to get Surface (Group of faces) via Ruby API?

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 248 Views 2 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.
    • fuzzybroF Offline
      fuzzybro
      last edited by fuzzybro

      Hi all,

      I have encountered a case where I need to recalculate smooth normals for a Surface of faces (picture 1). This entity is available in the SketchUp editor itself but I have failed to find one in the api. It would be extremely useful to know the surface (i.e. the group of faces) that particular face belongs to. Is there a way to get this?

      I have tried "all_connected" option of a face but it returns all the faces and edges of the mesh. I'm thinking about checking UV coordinates of the face vertices to know if particular vertex belongs to a surface but I think it's a dirty solution. Any ideas?

      All the best,

      Bro

      Update:
      Got it by checking uvw coordinates to determine if a current face is an extension of a previous face, but it's mint.. Is there a cleaner way to check this?


      picture 1 (surface selected)


      picture 2 (face selected)

      [OctaneRender for SketchUp Overview and Demo Version(http://sketchucation.com/click.php?url)]

      Latest updates, tutorials and artwork
      facebook.com/octane4sketchup

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

        These snippets should work: http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=41211#p365380

        1 Reply Last reply Reply Quote 0
        • fuzzybroF Offline
          fuzzybro
          last edited by

          @tt_su said:

          These snippets should work: http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=41211#p365380

          Oh, cool!
          Thanks a lot!

          [OctaneRender for SketchUp Overview and Demo Version(http://sketchucation.com/click.php?url)]

          Latest updates, tutorials and artwork
          facebook.com/octane4sketchup

          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