π‘ LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
Selecting faces by normals?
-
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!
-
@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
Advertisement