Hey TIG,
Thanks a lot again that is really helpful
Three more things though, one I do have nested components (otherwise my model is unmanageble) which makes it troublesome to use it like this in my final script. (btw I only use components)
Secondly what if I just want to find intersecting components (groups/element) and not also touching ones.
The last thing is I now understand both codes except for a part concerning the first script
grp = ens.add_group()
grp.transform!(tr1) ### so can see cut lines IF erase! is disabled at the end !
ges = grp.entities
es1.intersect_with(true, tr1, ges, tr1, true, e2)
if ges[0]
int = true
else
int = false
end
A few things here, sometimes the intersection lines fail to show up. (this is when I have nested component but these components are not touching or intersecting anything)
the intersect_with is still unclear to me.
we make a group of the first entity 1 which we call grp
then do a transformation (now is this a simple translation or a true transformation and how should I envision that in skp)
We say ges= the entities that were transformed
Now we intersect all the entities in ges with e2, which if an intersect occurs removes all elements from ges as for as I understand. However what's the reason the es1.intersect_with.
Also why can't we by example use something like this
result = e1.intersect(e2)
if result == nil
int = false
else
int = true
Please keep in mind this is my first time doing any programming in ruby and for SU, so I had to read up on some of the coding before I could reply.
Thank you very much for the help