2 messages in com.googlegroups.sketchuprubyRe: Cut hole - Intersect with model
FromSent OnAttachments
peterthisted15 May 2007 05:39 
Jim15 May 2007 08:39 
Subject:Re: Cut hole - Intersect with model
From:Jim (jim.@gmail.com)
Date:05/15/2007 08:39:46 AM
List:com.googlegroups.sketchupruby

Peter,

I don't understand it myself, but here's something that's one step closer.

entities = Sketchup.active_model.entities group.entities.intersect_with(true, group.transformation, entities, [0,0,0], true, entities.collect)

On May 15, 8:40 am, peterthisted <this@gmail.com> wrote:

I want to cut a hole in my model with a cylinder (group) made for this purpose and erase the cylinder afterwards. But I cannot understand the Ruby language on this one without an example (missing in the Ruby help).

My code so far:

model = Sketchup.active_model entities = model.active_entities pts = [] pts[0] = [-4012.5000000000, -3987.5000000000, 50.0000000000] pts[1] = [-4012.5000000000, -3787.5000000000, 50.0000000000] pts[2] = [-4032.5000000000, -3787.5000000000, 50.0000000000] pts[3] = [-4032.5000000000, -3967.5000000000, 50.0000000000] pts[4] = [-4212.5000000000, -3967.5000000000, 50.0000000000] pts[5] = [-4212.5000000000, -3987.5000000000, 50.0000000000] face = entities.add_face pts status = face.pushpull 10122.5241501304, true centerpoint = Geom::Point3d.new -4000.0000000000, -3887.5000000000, 100.0000000000 vectorcircle = Geom::Vector3d.new 1, 0, 0 circle = entities.add_circle centerpoint, vectorcircle, 9.5000000000 face=entities.add_face(circle) group = entities.add_group(face) status = face.pushpull -45.0000000000, true

How do I go on using this command:

entities.intersect_with recurse, transformation1, entities1, transformation2, hidden, entites2

Thanks for any input Peter