-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Pose node #5978
Add Pose node #5978
Conversation
…o feature-pose-node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me
@stefaniapedrazzi and @ygoumaz: can you please also review this PR again before I merge it? |
I didn't find any major issue.
|
Yes, we discussed this point with @BenjaminDeleze yesterday and I believe we could indeed remove this option. However, since there is a warning about loss of information during this operation, I believe it is okay for the user. And also, it seems odd to allow users to transform a Transform into a Solid, but prevent the other way round. For example, with the BiscuitBox, it works better than with the Table because the children of the Solid are Pose nodes. Hence, in that case, you can transform the BiscuitBox to a Solid, and to a Transform and back to a Solid without loosing the geometries (but you will loose the physics, boundingObjects, etc.). |
Loosing boundingObject or physics is expected and not as problematic as loosing all the children information. |
I agree with @stefaniapedrazzi that the warning should at least be more specific and list the information that will be lost, in particular children Solid objects. |
I am improving this warning... |
I just fixed the two issues reported by @stefaniapedrazzi. I guess we can merge it now? |
Just for note, I could reproduce similar issues on master/develop branches ( reported here #6063). |
Ok, I still can produce a different behavior between both branches:
However, this additional behavior may be a side effect from the existing bug and not directly related to the addition of the Pose node. We may merge the PR and fix it when addressing #6063. |
Yes, in any case #6063 needs to be fixed and it will change this code. So, I agree we can merge this PR and fix #6063 in a separate PR (this one is already very big). |
This PR aims at introducing a new node named
Pose
which basically inherits fromGroup
, adding only thetranslation
androtation
field. TheTransform
node inherit fromPose
adding thescale
node.All
Solid
nodes inherit fromPose
and not fromTransform
any more.The
Transform
node may only containShape
,CadShape
,Group
,Pose
orTransform
nodes in itschildren
list.This has 3 mains advantages:
Solid
nodes (however PROTOs ofSolid
nodes may still have a working scale parameter, which may be either scalar or vector).Solid
nodes and bounding objects.Device
nodes (which inherit fromSolid
).Scaling
Solid
node is not something realistic as in the real world, it is not possible (or very difficult) to scale objects, whereas it is super easy to change their translation and rotation.See the most relevant update documentation pages: