Hello,
I have some problems with rotation in the 3D pannel.
I imported my 3D from solidedge with the stl format.
I can successfully successfully rotate "chassis" on the axis of "roues" with the command:
RotateAlong(Chassis,Roues,0,0,angleincrement,0)
Here is the result:
But the is an offset if I use the RotateTo
RotateTo(Chassis,Roues,0,0,angle,0)
Here is the result
Is this a bug or I don't use RotateTo properly?
I can post the fcfx and mesh if necessary.
Another question:
Flowcode lose the link to the mesh if I open the file on another computer (the file system is the same because I work on NAS-Network attach storage and I mount it as a hard disk in windows). What can I do/you do for this?
RotateTO Rotate ALONG and other 3D
Moderator: Benj
-
- Posts: 155
- Joined: Sat Mar 28, 2009 5:44 pm
- Location: LYON FRANCE
- Has thanked: 3 times
- Been thanked: 41 times
- Contact:
Re: RotateTO Rotate ALONG and other 3D
I tried other 3D
MoveTo: work properly
MoveBy: work properly
GetCoods: work properly
GetEuler: Do not work. The exemple in help return the value just once and is not update with the component rotation
GetQuat: Do not work, same proplem as Euler
Is this bug to or I don't use the component properly?
Note: I use V6.0.4.0
MoveTo: work properly
MoveBy: work properly
GetCoods: work properly
GetEuler: Do not work. The exemple in help return the value just once and is not update with the component rotation
GetQuat: Do not work, same proplem as Euler
Is this bug to or I don't use the component properly?
Note: I use V6.0.4.0
Last edited by benp on Fri Feb 07, 2014 8:50 pm, edited 1 time in total.
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: RotateTO Rotate ALONG and other 3D
Hello.
The call RotateTo() can be confusing. It sets the angles to absolutes, so if you have positioned your model to exactly where you want then called RotateTo(0, 0, 0) it will in effect wipe your previous angles and reset the object.
This commonly causes confusing when you have previously rotated by 90-degrees in a specific axis, or if you are trying to rotate exactly around a pivot point (as it looks from your images), as Flowcode will then set the rotations and positions based on the assumption previous rotations have set your model to its current position.
The best way to restore the position of an object (if that is what you want to do) is create a copy of your objects position on start-up, then restore that position whenever you want (I recommend doing this in the start/stop simulation events). I hope this helps. I can provide examples, etc, as needed if you want to do something specific.
Cheers,
Jonny
The call RotateTo() can be confusing. It sets the angles to absolutes, so if you have positioned your model to exactly where you want then called RotateTo(0, 0, 0) it will in effect wipe your previous angles and reset the object.
This commonly causes confusing when you have previously rotated by 90-degrees in a specific axis, or if you are trying to rotate exactly around a pivot point (as it looks from your images), as Flowcode will then set the rotations and positions based on the assumption previous rotations have set your model to its current position.
The best way to restore the position of an object (if that is what you want to do) is create a copy of your objects position on start-up, then restore that position whenever you want (I recommend doing this in the start/stop simulation events). I hope this helps. I can provide examples, etc, as needed if you want to do something specific.
Cheers,
Jonny
-
- Posts: 155
- Joined: Sat Mar 28, 2009 5:44 pm
- Location: LYON FRANCE
- Has thanked: 3 times
- Been thanked: 41 times
- Contact:
Re: RotateTO Rotate ALONG and other 3D
Thank you for your explanations.
I understand that one is absolute and one is relative.
I will do an exemple later because the rotateTO/RotateALONG take more time.
Here is the Get Euler bug (or misunderstanding): This is the geteuler from the exemple on which I only add à rotateX and test.
The euler is not update from geteuler with live rotation.
I understand that one is absolute and one is relative.
I will do an exemple later because the rotateTO/RotateALONG take more time.
Here is the Get Euler bug (or misunderstanding): This is the geteuler from the exemple on which I only add à rotateX and test.
The euler is not update from geteuler with live rotation.
-
- Posts: 155
- Joined: Sat Mar 28, 2009 5:44 pm
- Location: LYON FRANCE
- Has thanked: 3 times
- Been thanked: 41 times
- Contact:
Re: RotateTO Rotate ALONG and other 3D
Here is my RotateTO problem
This is the perfectly working exemple for rotateALONG: This is the rotateTO Why this quick movement at the first rotate TO
In my opinion, it should do exactly the same as RotateALONG exelple
This is the perfectly working exemple for rotateALONG: This is the rotateTO Why this quick movement at the first rotate TO
In my opinion, it should do exactly the same as RotateALONG exelple
-
- Posts: 155
- Joined: Sat Mar 28, 2009 5:44 pm
- Location: LYON FRANCE
- Has thanked: 3 times
- Been thanked: 41 times
- Contact:
Re: RotateTO Rotate ALONG and other 3D
You didn't answer to that question:
Another question:
Flowcode lose the link to the mesh if I open the file on another computer (the file system is the same because I work on NAS-Network attach storage and I mount it as a hard disk in windows). What can I do/you do for this?
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: RotateTO Rotate ALONG and other 3D
Hi. Sorry, I missed that.
I will have a good look into these functions and ensure they all operate as expected. It is possible the GetEuler() has a bug - if so it is an easy fix I think.
I will try to look through your examples today. I think I know what the problem will be anyway, and have a diagram in my head that may help explain things, as previous attempts to talk through the maths behind these things has resulted in greater confusion - perhaps I need to work on my teaching style!
Thank you for your patience.
Jonny
I will have a good look into these functions and ensure they all operate as expected. It is possible the GetEuler() has a bug - if so it is an easy fix I think.
I will try to look through your examples today. I think I know what the problem will be anyway, and have a diagram in my head that may help explain things, as previous attempts to talk through the maths behind these things has resulted in greater confusion - perhaps I need to work on my teaching style!
Thank you for your patience.
Jonny
-
- Posts: 155
- Joined: Sat Mar 28, 2009 5:44 pm
- Location: LYON FRANCE
- Has thanked: 3 times
- Been thanked: 41 times
- Contact:
Re: RotateTO Rotate ALONG and other 3D
Do you have news for the GetEuler, rotateto and rotate along?
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: RotateTO Rotate ALONG and other 3D
Good morning.
I have attached a file that shows RotateTo() along an axis This shows how RotateTo() essentially resets the rotation of the object to an axis. On tests with this program it looks like it is taking the axis of the parent object - I am not sure this is correct but changing this now may have impact on all sorts so I will have to investigate that here. Basically 'RotateTo()' resets the rotation of the object to align it to the angle you want. Where as RotateAlong() is incremental, so takes the previous position into account, RotateTo() is absolute - it does not take the previous position into account so therefore it does not matter where you position the object.
I would use a combination of Position.Get(), Position.Set() and RotateAlong() if that is what you are doing - RotateTo() is to reset to absolute positions and probably not suitable for your demo purposes.
As far as the GetEuler() bug I have raised it as a high priority bug (I am anxious to find out what is going on) but as we are releasing 6.1 shortly I have been asked not to look into anything not on the 6.1 'critical path' - I will keep on trying to push more on this! It looks like the Rotate...() functions are not flagging the Euler as invalid (I use quaternions internally and only convert to Euler angles when necessary as this is costly) - the GetQuat() is working OK, just not the Euler() call.
I will keep pushing, thanks for your patience.
Jonny
I have attached a file that shows RotateTo() along an axis This shows how RotateTo() essentially resets the rotation of the object to an axis. On tests with this program it looks like it is taking the axis of the parent object - I am not sure this is correct but changing this now may have impact on all sorts so I will have to investigate that here. Basically 'RotateTo()' resets the rotation of the object to align it to the angle you want. Where as RotateAlong() is incremental, so takes the previous position into account, RotateTo() is absolute - it does not take the previous position into account so therefore it does not matter where you position the object.
I would use a combination of Position.Get(), Position.Set() and RotateAlong() if that is what you are doing - RotateTo() is to reset to absolute positions and probably not suitable for your demo purposes.
As far as the GetEuler() bug I have raised it as a high priority bug (I am anxious to find out what is going on) but as we are releasing 6.1 shortly I have been asked not to look into anything not on the 6.1 'critical path' - I will keep on trying to push more on this! It looks like the Rotate...() functions are not flagging the Euler as invalid (I use quaternions internally and only convert to Euler angles when necessary as this is costly) - the GetQuat() is working OK, just not the Euler() call.
I will keep pushing, thanks for your patience.
Jonny
- JonnyW
- Posts: 1230
- Joined: Fri Oct 29, 2010 9:13 am
- Location: Matrix Multimedia Ltd
- Has thanked: 63 times
- Been thanked: 290 times
- Contact:
Re: RotateTO Rotate ALONG and other 3D
Hello. Just to let you know the Euler bug has been found and fixed.
This will be available in the next release.
Cheers,
Jonny
This will be available in the next release.
Cheers,
Jonny