I am trying to find intersect line between 2 entities, similar to “Intersect With Selection” in SketchUp but currently using intersect_with function can only do function like “Intersect With Model” for me.
As picture showing above, I want intersection line from the selected entities only when I trying to use intersect_with function, it’s give me intersection lines from the above one that I’m not choose also.
mod = Sketchup.active_model
ents = Sketchup.active_model.active_entities
sel = mod.selection
g = sel.first # The group in which connected the others together.
trans1 = Geom::Transformation.new
trans2 = g.transformation
line = ents.intersect_with(true, trans1, g.entities, trans2, true, g)
Here is my code that I get the result similar like “Intersect With Model”
As soon as you read the forum, “his” forum becomes “yours”, because the essence of the forum is that the participants form (create) it, whether they only read or write too.
I don’t myself. The example you speak of was written by @CAUL
It is an incredibly powerful method, but also massively confusing. As said in that issue thread, there are over 50 hits here in the Developers forum if you search on “intersect_with”.