Tube command Problem

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-02-23 07:33 AM
I was trying to make this hand bar for a ladder, using "Tube" command in ArchiCAD 18, as you can see in this image.
The problem that I have got, is that the profile gets skewed in plan, and I have got no clue how to set it right, by rotating it around its center axe.
PS: I have also tried to use Xform, but to no use


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-02-23 09:11 AM
Barry.
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-02-23 09:20 AM
for __dx = -1 to 1 step 2 for __n = 1 to 3 step 1 if __dx = -1 then __m = 4 if __dx = 1 then __m = 3 put nbBIM_pltPos[__m][__n] next __n add get(3) : mulx -__dx if nbBIM_LadderRail = 1 then for __n = 1 to vardim1(nbBIM_railSq) : put nbBIM_railSq[__n] : next __n else for __n = 1 to vardim1(nbBIM_railCir) : put nbBIM_railCir[__n]: next __n endif __nProfile = nsp/3 put 0.0000, 0.0000,-1, 0, 0.0000, 0.0000, 0.0030, 0, 0.0000, 0.0000, h1-nbBIM_ProWidth*3.5, 0 for i = 0 to nbBIM_slpeAngleLft+90 step 360/nbBIM_resol put 0.0000, (-3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(i)), h1-3.5*nbBIM_ProWidth+3*nbBIM_ProWidth*sin(i), 0 next i put 0, -3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(nbBIM_slpeAngleLft+90), h1-3.5*nbBIM_ProWidth+3*nbBIM_ProWidth*sin(nbBIM_slpeAngleLft+90), 0 for i = nbBIM_slpeAngleLft+90 to 180 step 360/nbBIM_resol put 0, -d5-0.44-nbBIM_ProWidth+3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(i), h6-ws+3*nbBIM_ProWidth*sin(i), 0 next i put 0, -d5-0.44-nbBIM_ProWidth+3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(180), h6-ws+3*nbBIM_ProWidth*sin(180), 0 if nbBIM_RailMount = 1 then put 0, -d5-0.44-nbBIM_ProWidth,-nbBIM_poolDepth+0.0030,0, 0, -d5-0.44-nbBIM_ProWidth,-1,0 else for i = 180 to 270 step 360/nbBIM_resol put tan(-nbBIM_angledw)*(-d5-0.44+nbBIM_ProWidth*cos(i)), -d5-0.44+nbBIM_ProWidth*cos(i), -h7-nbBIM_stpsNu*h3-0.1100+nbBIM_ProWidth*sin(i)+nbBIM_ProWidth,nbBIM_angledw next i put 0, -d5-0.44+nbBIM_ProWidth*cos(270), -h7-nbBIM_stpsNu*h3-0.1100+nbBIM_ProWidth*sin(270)+nbBIM_ProWidth,nbBIM_angledw put 0, 1.0000, -h7-nbBIM_stpsNu*h3-0.1100+nbBIM_ProWidth*sin(270)+nbBIM_ProWidth, nbBIM_angledw endif __mProfile = (nsp-__nProfile*3)*0.25 xform 1, -nbBIM_dw/(0.44+d5+nbBIM_ProWidth), 0, 0, 0, 1, 0, 0, 0, 0, 1, 0 tube __nProfile, __mProfile, 1+2, get(nsp) del 3 next __dx


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-02-23 09:36 AM
I was expecting a simple rectangular polygon following the tube path.
But it looks like you have been busy making just about every aspect of it customisable.
You might need to attach the entire object (zip file) if you can so I don't have too try and guess the variable default values.
Or I will try and create a simple tube that follows a similar path when I get a chance later.
Barry.
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-02-26 02:54 AM
It is the XFORM command that is creating the twist in the side rails.
The only way I can think of to fix this is not to use XFORM to to stretch the rail into the steps, but instead define the actual points in the TUBE path itself.
This will mean calculating the x-distance offset, but it should just be the same proportion of the y-distance.
This image should help to explain.
Barry.
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-02-26 08:37 AM
Thank you for trying to solve this.
About the xForm, actually that was my last resort that I had










- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-02-26 09:55 AM
I think I have got the path correct (maybe not - it's pretty hard to follow).
put 0.0000, 0.0000,-1, 0, 0.0000, 0.0000, 0.0030, 0, 0.0000, 0.0000, h1-nbBIM_ProWidth*3.5, 0 for i = 0 to nbBIM_slpeAngleLft+90 step 360/nbBIM_resol put (((w2-w1)/2)*(-3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(i)))/(-d5-0.44-nbBIM_ProWidth), (-3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(i)), h1-3.5*nbBIM_ProWidth+3*nbBIM_ProWidth*sin(i), 0 !!!! put 0.0000, !!!! (-3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(i)), !!!! h1-3.5*nbBIM_ProWidth+3*nbBIM_ProWidth*sin(i), !!!! 0 next i put ((w2-w1)/2)*(-3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(nbBIM_slpeAngleLft+90))/(-d5-0.44-nbBIM_ProWidth), -3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(nbBIM_slpeAngleLft+90), h1-3.5*nbBIM_ProWidth+3*nbBIM_ProWidth*sin(nbBIM_slpeAngleLft+90), 0 !!!! put 0, !!!! -3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(nbBIM_slpeAngleLft+90), !!!! h1-3.5*nbBIM_ProWidth+3*nbBIM_ProWidth*sin(nbBIM_slpeAngleLft+90), !!!! 0 for i = nbBIM_slpeAngleLft+90 to 180 step 360/nbBIM_resol put ((w2-w1)/2), -d5-0.44-nbBIM_ProWidth+3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(i), h6-ws+3*nbBIM_ProWidth*sin(i), 0 !!!! put 0, !!!! -d5-0.44-nbBIM_ProWidth+3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(i), !!!! h6-ws+3*nbBIM_ProWidth*sin(i), !!!! 0 next i put ((w2-w1)/2), -d5-0.44-nbBIM_ProWidth+3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(180), h6-ws+3*nbBIM_ProWidth*sin(180), 0 !!!! put 0, !!!! -d5-0.44-nbBIM_ProWidth+3*nbBIM_ProWidth+3*nbBIM_ProWidth*cos(180), !!!! h6-ws+3*nbBIM_ProWidth*sin(180), !!!! 0 if nbBIM_RailMount = 1 then put ((w2-w1)/2), -d5-0.44-nbBIM_ProWidth,-nbBIM_poolDepth+0.0030,0, 0, -d5-0.44-nbBIM_ProWidth,-nbBIM_poolDepth-1,0 !!!! put 0, -d5-0.44-nbBIM_ProWidth,-nbBIM_poolDepth+0.0030,0, !!!! 0, -d5-0.44-nbBIM_ProWidth,-1,0 else for i = 180 to 270 step 360/nbBIM_resol put tan(-nbBIM_angledw)*(-d5-0.44+nbBIM_ProWidth*cos(i)), -d5-0.44+nbBIM_ProWidth*cos(i), -h7-nbBIM_stpsNu*h3-0.1100+nbBIM_ProWidth*sin(i)+nbBIM_ProWidth,nbBIM_angledw next i put 0, -d5-0.44+nbBIM_ProWidth*cos(270), -h7-nbBIM_stpsNu*h3-0.1100+nbBIM_ProWidth*sin(270)+nbBIM_ProWidth,nbBIM_angledw put 0, 1.0000, -h7-nbBIM_stpsNu*h3-0.1100+nbBIM_ProWidth*sin(270)+nbBIM_ProWidth, nbBIM_angledw endif __mProfile = (nsp-__nProfile*3)*0.25 !!!! xform 1, -nbBIM_dw/(0.44+d5+nbBIM_ProWidth), 0, 0, !!!! 0, 1, 0, 0, !!!! 0, 0, 1, 0 tube __nProfile, __mProfile, 1+2+64, get(nsp)I have multiple commented out your nodes and added what i think is the path.
And I have commented out the XFORM.
There are not rotations in the tube nodes so I am not sure where the rotation is coming from.
If I get a chance I will try with something simpler.
Just for my own curiosity if nothing else.
Barry.
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-02-26 10:05 AM
The Tube command is based on a vector math algorithm deep inside of ArchiCAD's source code and it depends on many factors:
1- The origin of the coordinate system in relation to path's node 1.
2- If the path passes through one side of the axe of the coordinate system to another (from +ve to negative).
If I could know the algorithm, may be we would be able to overcome it.
Or an spread sheet that calculate the counter twist for us will do


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-02-26 10:57 AM
If I sheared the base of the profile in the opposite direction of the tube profile, then I can bypass the file twisting all together.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-02-26 11:30 AM
Although it appears promising but ...
Definitely there is a correlation between Tube command, the path it takes when crossing path axis
