Jump to content

Getting position data from dops into a group.


Recommended Posts

Hi all, I am trying to get the position data of my simulation in dops and group them according to a certain condition. However I don't seem to be getting what I am hoping for. Can anyone point out to me what did I do wrong?

The expression I used was,

if(dopfield("/obj/dopnet1", "rbdfracturedobject1", "Position", "Options", 0, "py")>0, 1, 0)

And my file in case.

Thanks!

velocity_check3.hip

Link to comment
Share on other sites

a few things:

no /obj/dopnet1 exists, it is /obj/geo1/dopnet1, but you better reference it just as ".."

no rbdfracturedobject1 dop object exists, it's just a name for the node, the objects are called piece1-piece99 so use $OBJNAME instead

"py" refers to pivot y value, to get position(translation) use "ty"

no if() is needed for simple comparison

so it would look like this:

dopfield("..", $OBJNAME, "Position", "Options", 0, "ty")>0

edit: since you can have more dop objects with the same name maybe $OBJID would be better than $OBJNAME

Edited by anim
Link to comment
Share on other sites

a few things:

no /obj/dopnet1 exists, it is /obj/geo1/dopnet1, but you better reference it just as ".."

no rbdfracturedobject1 dop object exists, it's just a name for the node, the objects are called piece1-piece99 so use $OBJNAME instead

"py" refers to pivot y value, to get position(translation) use "ty"

no if() is needed for simple comparison

so it would look like this:

dopfield("..", $OBJNAME, "Position", "Options", 0, "ty")>0

edit: since you can have more dop objects with the same name maybe $OBJID would be better than $OBJNAME

Thanks man, it worked perfectly.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...