sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Selecting faces by normals?

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    2 Posts 2 Posters 137 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.
    • C Offline
      Ciacnorris
      last edited by

      Hi guys,

      I encountered another problem on my 3D works:

      I got a shell-similar 3D object (its shape is similar to an half-sphere), and I need to select all external faces. Is there a faster way than doing it manually?

      I mean something like select all faces whose normals are directed outside the sphere volume.

      Any suggestions?

      Thanks! πŸ˜„

      1 Reply Last reply Reply Quote 0
      • sdmitchS Offline
        sdmitch
        last edited by

        @ciacnorris said:

        Hi guys,

        I encountered another problem on my 3D works:

        I got a shell-similar 3D object (its shape is similar to an half-sphere), and I need to select all external faces. Is there a faster way than doing it manually?

        I mean something like select all faces whose normals are directed outside the sphere volume.

        Any suggestions?

        Thanks! πŸ˜„

        mod = Sketchup.active_model
        ent = mod.entities
        sel = mod.selection
        bb=Geom;;BoundingBox.new
        faces=sel.grep(Sketchup;;Face)
        faces.each {|f| bb.add f.bounds}
        ctr=bb.center; sel.clear
        for f in faces
         sel.add f if ctr.vector_to(f.bounds.center).angle_between(f.normal)<90.degrees;
        end
        
        

        Select by Normal.gif

        Nothing is worthless, it can always be used as a bad example.

        http://sdmitch.blogspot.com/

        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