We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Bending a Prism??

JGoode
Expert
Hello,

I am trying to make a prism at a 90 degree angle with a radius of 10mm but I have no idea how to script it correctly.

Any help would be appreciated,

Thanks
ArchiCAD 23

Windows 10
4 REPLIES 4
Barry Kelly
Moderator
PRISMs just have a height so are in effect straight.

To curve you polygon shape it is probably best to use the REVOLVE command.
This will give you just a curved profile to the specified angle.
You control the smoothness (segmentation) of the curve with the RESOL command before the revolve.


You could also use the TUBE command but it is a little more complicated.
Essentially you have the same polygon but then you give it a path with x, y, z co-ordinates - so it does not have to be a just a curve - it can follow any path.
The more points you set in the path the smoother the curve will be.

The first and last point in the path are dummy points just to establish the angle of the end surface.
The end surface will bisect the angle defined by the first 3 points and the last 3 points in the list.

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
JGoode
Expert
Barry wrote:
PRISMs just have a height so are in effect straight.

To curve you polygon shape it is probably best to use the REVOLVE command.
This will give you just a curved profile to the specified angle.
You control the smoothness (segmentation) of the curve with the RESOL command before the revolve.


You could also use the TUBE command but it is a little more complicated.
Essentially you have the same polygon but then you give it a path with x, y, z co-ordinates - so it does not have to be a just a curve - it can follow any path.
The more points you set in the path the smoother the curve will be.

The first and last point in the path are dummy points just to establish the angle of the end surface.
The end surface will bisect the angle defined by the first 3 points and the last 3 points in the list.

Barry.
Hi Barry, thanks for the reply! Do you have any sort of example script?

Thanks
ArchiCAD 23

Windows 10
Barry Kelly
Moderator
Here is a 90° revolve for a 10mm round profile curving with an 80mm radius.
profile_rad = 0.005
revolve_rad = 0.080

REVOLVE 7, 90, 1*0+2*0+4*0+16*1+32*1+64*0,
                profile_rad,       revolve_rad,      1, 
        0,       revolve_rad,    900, 
                   0,          180,   4011+64, 
               -profile_rad,       revolve_rad,      1, 
        0,       revolve_rad,    900, 
                   0,          180,   4011+64, 
                profile_rad,       revolve_rad,     1
I will see what I can find for a TUBE as well.

Barry.
revolve.jpg
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
Barry Kelly
Moderator
Here is a tube.
Can be more than just a simple curve - you define the path for it to follow.
The dummy nodes are marked in red.
The points between are the path.
The first seven co-ordinates are the profile shape (round in this case).
profile_rad = 0.005

TUBE 7, 18, 51,
profile_rad, 0.0, 1,
0, 0.0, 900,
0, 180, 4000,
-profile_rad, 0.0, 1,
0, 0.0, 900,
0, 180, 4000,
profile_rad, 0.0, 1,

-0.1, 0, 0, 0,
0, 0, 0, 0,
0.06367140388221, 0, 0, 0,
0.07133369552651, 0.0005952433182987, 0, 0,
0.07882204397126, 0.002318743681414, 0, 0,
0.0859664547359, 0.005147738336344, 0, 0,
0.09260476324691, 0.009017973839743, 0, 0,
0.1524367191209, 0.05051875591474, 0, 0,
0.1609741469947, 0.05387205483239, 0, 0,
0.1700752270737, 0.05501338288658, 0, 0,
0.1793046684196, 0.05383910007662, 0, 0,
0.1879460033734, 0.05039107776036, 0, 0,
0.1954004986649, 0.04493459948133, 0, 0,
0.2012639732361, 0.03779580958294, 0, 0,
0.2051680634349, 0.02942319141533, 0, 0,
0.2068892434645, 0.02034403381879, 0, 0,
0.2073142210857, 0.01737428732972, 0, 0,
0.2093970665567, 0.003530027058421,0, 0
Barry.
tube.jpg
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