TUBE suddenly mirrors its profile

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
I was creating a door casing essentially made by a TUBE command which can read custom complex profiles from the project, then I faced this weird problem whose reason I still could not figure out.
So I created this simple object for testing purposes.
Notice the TUBE's profile seems to get inverted – as if the X coordinates of its profile are mirrored – if a subtle change in its path is applied. It happens when 'Y deviation in A/2' goes above a certain value, corresponding to an angle of aproximately 9º-10º with horizon.
I attached a short video showing the phenomenon when changing ' Y deviation' dinamically by an editable hotspot. Also attached an image of the parameters and the object (AC26).
Why is this happening and how can I avoid it?
This is the 3D script:
TUBE 5, 7, 1+2+16+32,
0, 0, 1,
X1, 0, 1,
X1, Y2, 1,
0, Y1, 1,
0, 0, 1,
0, 0, -1, ang,
0, 0, 0, ang,
0, 0, ZZYZX, ang,
A/2, ydev, ZZYZX, ang,
A, 0, ZZYZX, ang,
A, 0, 0, ang,
A, 0, -1, ang
And this is the 2D script:
PROJECT2 3, 270, 1
unID = 0
HOTSPOT2 A/2, 0, unID, ydev, 1 !--- base
unID = unID + 1
HOTSPOT2 A/2, ydev, unID, ydev, 2 !--- move
unID = unID + 1
HOTSPOT2 A/2, -1, unID, ydev, 3 !--- ref.
HOTSPOT2 0, 0
HOTSPOT2 A, 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
I use tubes a lot. And ultimately I have just ended up coding the tube a different direction when this happens. I spent some time trying to figure it out but was never able to solve it other than changing the direction the tube is being drawn.
Hopefully someone else has some better experience as I am also curious.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
Changing the direction of the tube path doesn't change the issue.
The 'Y deviation' in my real object has to be parametric, so that the user can set it. So, I need either to avoid this inversion from happening or to understand when it happens, so that I can add a routine to the code that would 'uninvert' it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
I resort to writing separate tubes.
Maybe the angle nets to go negative at some point during the tube?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
Tube is weird.
One thing You can do is to change coordinates of the path. (z->y ).
then rotate the tube back to right position.
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
Yes, that was a good guess, Pertti Paasky. Using Y instead of Z axis (then ROTX to put it back to the intended position) did eliminate the invertion of the polyline. But it added new torsions along the path, that are hard to understand (thus, to avoid).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
I use seperate extrusions instead of a single tube as then it allows you to control the connection at each corner as you may not always want your casing or frame to just fillet.
AC22-28 AUS 3110 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win11 | R5 2600 | 16GB | GTX1660 |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
This ends up being the best method especially with curves in tubes

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
I discovered these days, that TUBEa is in some cases much better then TUBE.
TUBE on top, TUBEa below.
GDL object creation: b-prisma.de

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
Tubes are in some ways extremely limited, as we can see.
There comes an old GDL forum thread into mind.
To quote: "As you can read in the documentation, the W axis of a cross-section at each particular node of TUBE is tied to the Z axis."
Meaning: Tubes whose path does not stay in the XY-plane will deform and have issues to some degree. That's why rotating it later helps – in some cases.
In others, like here, only splitting the parts up will consistently help.
POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»