Create a new setOf from 2 SetOfs

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Create a new setOf from 2 SetOfs

LE Ba Danh
Hello,
I want to create a new setOf from 2 SetOfs. In version 0.0, I use:
DEM::Intersect< DEM::DiscreteElement<_3D> >(xMinSet, yMinSet, load_Matrix);

How to do it in Granoo2.0?

Thank,

Danh
Reply | Threaded
Open this post in threaded view
|

Re: Create a new setOf from 2 SetOfs

Damien André
Administrator
Hello, you can do as :

Core::SetOf<DEM::DiscreteElement> inter("NEW"); // Create a new setOf
inter.Intersection(xMinSet, yMinSet); // Now, this setOf is the intersection


Hope this help !
Reply | Threaded
Open this post in threaded view
|

Re: Create a new setOf from 2 SetOfs

Damien André
Administrator
To avoid an automatic deleltion of your SetOf, you can use :

Core::SetOf<DEM::DiscreteElement>* inter = new Core::SetOf<DEM::DiscreteElement>("NEW"); // Create a new setOf
inter->Intersection(xMinSet, yMinSet); // Now, this setOf is the intersection

This problem comes from C++ not from GranOO

kind regards, Damien.
Reply | Threaded
Open this post in threaded view
|

Re: Create a new setOf from 2 SetOfs

LE Ba Danh
Thank Damien,
It works.

Best regards,

Danh