DOP Question.
2852 9 0- anon_user_63541013
- Member
- 197 posts
- Joined: 6月 2012
- Offline
- zdimaria
- Member
- 390 posts
- Joined: 1月 2012
- Offline
- anon_user_63541013
- Member
- 197 posts
- Joined: 6月 2012
- Offline
- zdimaria
- Member
- 390 posts
- Joined: 1月 2012
- Offline
First we create a bunch of boxes by copying boxes to points made by a pointsfromvolume sop. Then we use a connectivity and a partition to group them by box, box_0, box_1.. Then in the dopnet we make those rbd obejcts through an rbd fractured object dop. The boxes move because of an initial velocity set in this dop.
While simulating those boxes, we bring them back into geo1 through the dopimport sop. Then, in foreach1, we add centroids to each box. Then we create an attribute ‘insphere’ with a value of 0 on each of these centroids. Then we group these centroids in group1 if they are in the sphere or not. We then take the ones that are in that group and change that ‘insphere’ attribute from 0 to 1.
Back in the dopnet we use a group dop to group objects based on a point expression,
point(“/obj/geo1/POINTS”, $OBJID - 2, “insphere”, 0)
which looks at those points, for the attribute ‘insphere’. For the point number, we use $OBJID - 2, because there are 2 other objects in the dopnet that get made before our boxes, groundplane1 and box - the empty object that is created by the rbd fractured object. So this expression takes the current dop object, lets say box_0, and then looks into geo1, for point 0 of POINTS, and grabs its ‘insphere’ attribute. If its a 0, it doesnt go into the group, if its a 1 it does. The gravity dop then only affects the dop objects that are in that group.
This is not the most efficient way to do this, but I left it simple so that you could get a good idea of whats going on.
While simulating those boxes, we bring them back into geo1 through the dopimport sop. Then, in foreach1, we add centroids to each box. Then we create an attribute ‘insphere’ with a value of 0 on each of these centroids. Then we group these centroids in group1 if they are in the sphere or not. We then take the ones that are in that group and change that ‘insphere’ attribute from 0 to 1.
Back in the dopnet we use a group dop to group objects based on a point expression,
point(“/obj/geo1/POINTS”, $OBJID - 2, “insphere”, 0)
which looks at those points, for the attribute ‘insphere’. For the point number, we use $OBJID - 2, because there are 2 other objects in the dopnet that get made before our boxes, groundplane1 and box - the empty object that is created by the rbd fractured object. So this expression takes the current dop object, lets say box_0, and then looks into geo1, for point 0 of POINTS, and grabs its ‘insphere’ attribute. If its a 0, it doesnt go into the group, if its a 1 it does. The gravity dop then only affects the dop objects that are in that group.
This is not the most efficient way to do this, but I left it simple so that you could get a good idea of whats going on.
.
- anon_user_63541013
- Member
- 197 posts
- Joined: 6月 2012
- Offline
- anon_user_63541013
- Member
- 197 posts
- Joined: 6月 2012
- Offline
- zdimaria
- Member
- 390 posts
- Joined: 1月 2012
- Offline
- anon_user_63541013
- Member
- 197 posts
- Joined: 6月 2012
- Offline
- eetu
- Member
- 606 posts
- Joined: 5月 2007
- Offline
- zdimaria
- Member
- 390 posts
- Joined: 1月 2012
- Offline
-
- Quick Links