sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Code to check isFaceInFace

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 168 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.
    • schorradtS Offline
      schorradt
      last edited by

      Hello, i need help!

      exists a simple way to check if face 2 in face 1 ?

      i need a function: (pseudocode)

      
      def isFaceInFace(face1, face2){
           CODE TO CHECKING
           if faceinface then
           return true
           else
           return false
           end
      end
      
      

      thx


      Face in Face


      http://www.henryschorradt.de/

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        I think this will work. It checks the loops of face1 and looks for face2.

        
        def isFaceInFace(face1, face2){
        	face1.loops.each { |loop|
        		next if loop.outer?
        		return true if loop.edges.first.faces.include?(face2)
        	}
        	return false
        end
        
        

        Thomas Thomassen β€” SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        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