• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

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.
  • F Offline
    fuzzybro
    last edited by fuzzybro 8 Dec 2013, 10:00

    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
    • T Offline
      tt_su
      last edited by 8 Dec 2013, 11:26

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

      1 Reply Last reply Reply Quote 0
      • F Offline
        fuzzybro
        last edited by 8 Dec 2013, 11:30

        @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
        1 / 1
        • First post
          1/3
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement