You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a region with almost 100 polytopes and a reference polytope. I started to compare each of the polytope from the region with the Reference polytope. I want to delete the polytope in the region if it is not in the reference polytope.
does the Polytope package offer a short way to do this operation? now i do it as follows
import polyope as PC
oldRegion # --> contains 100 polytope
newRegion = []
referencePoly=pc.Polytope(A, b) #--> the reference polytope
for i in oldRegion:
if i <= referencePoly :
newRegion.append(i)
the i form the new region as pc.Region([newRegion])
however if there is an option to delete a polytope within the oldRegion on the fly, that would be more helpful.
Any suggestion on this issue, is highly appreciated
Thank you
Muthu Vallinayagam
Researcher, Institute of Experimental Physics,
TU Freiberg, Germany
The text was updated successfully, but these errors were encountered:
I don't remember such functionality existing in the polytope package. What you are doing makes sense to me. The closest would be to do a set difference between the oldRegion and referencePoly but it would result in a different object where the polytopes in the region overlapping with the reference will be clipped (and difference is potentially less efficient as difference of polytopes might not be polytopes themselves and will result in extra polytopes added to your object). However, you can use the code doing the difference (here) as a reference for implementation.
Dear Users and developers,
I have a region with almost 100 polytopes and a reference polytope. I started to compare each of the polytope from the region with the Reference polytope. I want to delete the polytope in the region if it is not in the reference polytope.
does the Polytope package offer a short way to do this operation? now i do it as follows
import polyope as PC
oldRegion # --> contains 100 polytope
newRegion = []
referencePoly=pc.Polytope(A, b) #--> the reference polytope
for i in oldRegion:
the i form the new region as pc.Region([newRegion])
however if there is an option to delete a polytope within the oldRegion on the fly, that would be more helpful.
Any suggestion on this issue, is highly appreciated
Thank you
Muthu Vallinayagam
Researcher, Institute of Experimental Physics,
TU Freiberg, Germany
The text was updated successfully, but these errors were encountered: