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

    Code to check isFaceInFace

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 151 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