I have used this method a few times. Look at my Zorro script for an example.
entities.intersect_with recurse, transformation1, entities1, transformation2, hidden, entites2
Let's say you want to intersect two groups. Assume that group 1 is a cube and group 2 is a sphere.
First get the necessary entities objects:
cube_entities=group1.entities
sphere_entities=group2.entities
Then, get the transformations of each group:
cube_trans=group1.transformation
sphere_trans=group2.transformation
Let's ignore recursion.
recursion=false
To perform the intersection and make the intersection lines appear in the cube group:
cube_entities.intersect_with(recursion,cube_trans,cube_entities,cube_trans,false,[group2])
The API docs seem to be incorrect. The last argument of this method must be an array of entities, not an entities object. The last argument is the just list of entities that you want intersect with.
To make the intersection lines appear in the sphere group:
sphere_entities.intersect_with(recursion,sphere_trans,sphere_entities,sphere_trans,false,[group1])
However, the following might also work but I haven't tried it this way:
cube_entities.intersect_with(recursion,cube_trans,sphere_entities,sphere_trans,false,[group2])
To make the intersection lines appear in some other entities object, I would try this (haven't tested):
cube_entities.intersect_with(recursion,cube_trans,some_other_entities,some_other_entities_trans,false,[group2])
@unknownuser said:
Arguments
recurse - true if you want this entities object to be recursed (intersection lines will be put inside of groups and components within this entities object)
transformation1 - the transformation for this entities object
entities1 - the entities where you want the intersection lines to appear
transformation2 - the transformation for entities1
hidden - true if you want hidden geometry in this entities object to be used in the intersection
entities2 - an entities object, or an array of entity
Hope this works...
Dale