Rotating a componenet within an object
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-05-10 12:34 AM
2014-05-10
12:34 AM
I have made a simplified trial GDL Object to figure it out. Once I can do it on this I will apply what I have learned to the more complicated Object I want to modify.
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-05-10 05:34 AM
2014-05-10
05:34 AM
First thing is rotation will occure around your local origin.
So you can ADD x,y,z to move to your rotation point.
then add the script for the bit of the object you want to rotate.
Now DEL to stop the rotation
Dell again to go back to your global origin.
So you should end up with something like this.
main object script
ADD x, y, z (to move to rotation point)
ROT x, y, z (to rotate around local origin)
script for rotating element
DEL 1 (to stop rotation)
DEL 1 (to move back to global origin)
Remember if you split the ROT x, y, z into separate ROT x, ROTvy, ROTvz commands then you will need a separate DEL for each one.
Barry.
So you can ADD x,y,z to move to your rotation point.
then add the script for the bit of the object you want to rotate.
Now DEL to stop the rotation
Dell again to go back to your global origin.
So you should end up with something like this.
main object script
ADD x, y, z (to move to rotation point)
ROT x, y, z (to rotate around local origin)
script for rotating element
DEL 1 (to stop rotation)
DEL 1 (to move back to global origin)
Remember if you split the ROT x, y, z into separate ROT x, ROTvy, ROTvz commands then you will need a separate DEL for each one.
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-05-12 06:39 PM
2014-05-12
06:39 PM
This was helpful. It is a bit tricky how to order the descriptors for the objects as it seems to keep the rotation parameter for the remainder of the script. When I tried to add additional Del to the script the check script function triggered an error.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-05-12 07:01 PM
2014-05-12
07:01 PM
The issue with using a mesh is that it has its own origin. Is there any way to adjust the rotation point separately from adjusting where the insertion point of the mesh is.
Or is there a way in the mesh tool to define where the origin point will be.
Or is there a way in the mesh tool to define where the origin point will be.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-05-12 08:51 PM
2014-05-12
08:51 PM
So I figured it out my self. When I create the object from the Mesh the location of the project Origin is the Object origin. So if I place the zero coordinate correctly I do not need to translate the X,Y,Z after.
Thank you for the help
Thank you for the help

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-05-13 05:24 AM
2014-05-13
05:24 AM
A good rule of thumb is when ever you are saving model elements as an object then model them (or move them) to the drawing origin before saving as an object.
Place the point you want as the object origin on the project origin.
In the first few lines of an object created by saving elements will be MUL and ADD.
The MUL is rescaling everything in the script after it based on the A, B and ZZYZX sizes in your parameters
The ADD will be moving everything in the script after it to absolute 0,0,0 - i.e. negating the offset of the elements from the project origin.
Any ROT, ADD, MUL (transformation commands) that you add needs to be before these other commands.
I have noticed that the automated scripts do not always (never?) put the appropriate DEL commands at the end to negate the initial ADD and MUL commands.
Out of habit I always add these myself.
THE DEL commands required for the ADD command you place at the beginning of the script must come after the last DEL commands.
Keep the automated script intact as if it is in a bubble.
Only add commands before and after this script until you really know what you are doing.
Many lines in the automated scripts can be deleted with no harm but it is best just to ignore them.
The simple version of the DEL command will always undo the most recent transformation command in the script - a bit like closing brackets in a mathematical equation.
That is why it is important to have a matching DEL for every transformation command
Barry.
Place the point you want as the object origin on the project origin.
In the first few lines of an object created by saving elements will be MUL and ADD.
The MUL is rescaling everything in the script after it based on the A, B and ZZYZX sizes in your parameters
The ADD will be moving everything in the script after it to absolute 0,0,0 - i.e. negating the offset of the elements from the project origin.
Any ROT, ADD, MUL (transformation commands) that you add needs to be before these other commands.
I have noticed that the automated scripts do not always (never?) put the appropriate DEL commands at the end to negate the initial ADD and MUL commands.
Out of habit I always add these myself.
THE DEL commands required for the ADD command you place at the beginning of the script must come after the last DEL commands.
Keep the automated script intact as if it is in a bubble.
Only add commands before and after this script until you really know what you are doing.
Many lines in the automated scripts can be deleted with no harm but it is best just to ignore them.
The simple version of the DEL command will always undo the most recent transformation command in the script - a bit like closing brackets in a mathematical equation.
That is why it is important to have a matching DEL for every transformation command
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-05-13 06:21 PM
2014-05-13
06:21 PM
Thank you this is helpful. I was able to figure some of this out on my own. After some trial and error I finally got the object to behave the way I wanted it to and now it rotates nicely around the pivot point.
I work for the Zoo and we have allot of unique one off assemblies that only we use. That said we are trying to use these assemblies wherever they work. By taking the time to model these in a way that I can manipulate the function It helps me explain them in meetings with staff and consultants. There is nothing worse than 6 people sitting around for 20 minutes arguing with one another in favor of the same solution.
I work for the Zoo and we have allot of unique one off assemblies that only we use. That said we are trying to use these assemblies wherever they work. By taking the time to model these in a way that I can manipulate the function It helps me explain them in meetings with staff and consultants. There is nothing worse than 6 people sitting around for 20 minutes arguing with one another in favor of the same solution.