Solids Penetration Check plugin
-
Hello.
I would like to have (make) a plugin that checks all the solids with other solids if they intersect.
The result of the intersection should be a solid (to avoid positive results if solids only touch each other.
I have found only the method Group.intersect suitable to do this.
But the problem is that this method is not only checking the intersection but also remove the two solids and do a new
solid (or face if two solids only touch each other).I would like to know if there is a plugin that already do this.
If not, I would appreciate any idea how to deal with this problem.Thanks for help and have a nice day.
-
I don't know of any script that does this...
What you could do is copy the two groups you are testing into a new temporary group.
tgroup=model.active_entities.add_group()
Get the groups' definitions
def1=group1.entities.parent
and
def2=group2.entities.parent
Add these to the tgroup
tgroup1=tgroup.entities.add_instance(def1, group1.transformation)
and
tgroup2=tgroup.entities.add_instance(def2, group2.transformation)
Now do your boolean code ontgroup1
andtgroup2
.
Any resulting 'igroup
' is left insidetgroup.entities
If there is anything there erasegroup1
andgroup2
and explodetgroup
so the 'igroup
' is left OTHERWISE leavegroup1
andgroup2
alone ?? -
Thank you for the very useful suggestion.
I have almost finished the plugin,but (you can guess) there is a problem.
The transformations of solids are local within the group,but I need it global,because I want to check
also the intersections between the solids from different groups.
So,how to get the global transformation of every solid?
I hope there is an easiest way than store and multiply every transformations from parent-groups. -
@voljanko said:
Here it is,my first public plugin
In some cases the intersections between solids can be considered as mistakes.
Just select some solids and click the Intersection Inspector from the Plugins menu.
The intersections between solids will be highlighted (selected).
To see the hiden intersections,use the x-ray option.What do you think about it?
Can you please make a new post with this? And tag the title with [Plugin] like the rest of the plugins here at the forum.
Otherwise it's impossible to find it - it's buried far down into this thread. -
Here it is,my first public plugin
In some cases the intersections between solids can be considered as mistakes.
Just select some SOLIDS and click the Solids Penetration Check from the Tools menu.
The intersections between solids will be highlighted (selected) and colored red.What do you think about it?
Advertisement