We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-04-09 06:07 AM
What command should I use?
I want the circle to follow a path. What should I do?
2023-04-09 10:24 AM
Yes, you can use a circle to run along a path. TUBE is the correct command to use for this.
E.g.
TUBE 2, NSP/4, 1+2,
! Define the profile (a circle)
0, 0, 901,
frameDia/2, 360, 4001,
! Define the path (in this case defined earlier with PUT)
GET(NSP)
2023-04-09 06:42 PM
i would like to do this
But the reality is like this. ^^
TUBE 2,8,1+2+16+32,
0,0,901,
0.1,360,4001,
-1, 0,0,0,
0,0,0, 1,
3.230,0,0,1,
3.757,0.150,0,1001,
4.330,0.505,0,1,
4.8757,0.656,0,1001,
8.888,0.656,0,1,
8.888+1,0.656,0,0
What's wrong?
I just want to put smooth curves.
2023-04-09 08:07 PM - edited 2023-04-09 08:13 PM
center point doesn't allow additional status code. It has to be 900.
Last parameter on each line is not status code like other functions. Its the angle of the profile relative to the path.
It should be 0 everywhere
TUBE 2,8,1+2+16+32,
0,0,900,
0.1,360,4001,
-1, 0,0,0,
0,0,0, 0,
3.230,0,0,0,
3.757,0.150,0,0,
4.330,0.505,0,0,
4.8757,0.656,0,0,
8.888,0.656,0,0,
8.888+1,0.656,0,0
2023-04-10 02:30 AM
A TUBE command isn't like a PRISM command. You must define every coordinate along the path. When you do curves, the maximum angle you can 'bend' and still keep a smooth transition is 15° - any sharper than that and you will get lines at the bends.
The below code will model a rectangular hoop with rounded corners.
! Lead-in
PUT -A, 0, 0, 0,
0, 0, 0, 0,
A/2-cornerRadius, 0, 0, 0
cornerCentreX = A/2-cornerRadius
cornerCentreY = B-cornerRadius
! Corner 1
FOR j = 0 TO 90 STEP stepA
PUT cornerCentreX+SIN(j)*cornerRadius, cornerRadius-COS(j)*cornerRadius, 0, 0
NEXT j
PUT A/2, B-cornerRadius, 0, 0
! Corner 2
FOR j = 0 TO 90 STEP stepA
PUT cornerCentreX+COS(j)*cornerRadius, cornerCentreY+SIN(j)*cornerRadius, 0, 0
NEXT j
! Corner 3
cornerCentreX = -A/2+cornerRadius
FOR j = 0 TO 90 STEP stepA
PUT cornerCentreX-SIN(j)*cornerRadius, cornerCentreY+COS(j)*cornerRadius, 0, 0
NEXT j
! Corner 4
FOR j = 0 TO 90 STEP stepA
PUT cornerCentreX-COS(j)*cornerRadius, cornerRadius-SIN(j)*cornerRadius, 0, 0
NEXT j
! Lead-out
PUT 0, 0, 0, 0,
A, 0, 0, 0
! Hoop
TUBE 2, NSP/4, 1+2,
0, 0, 901,
frameDia/2, 360, 4001,
GET(NSP)
2023-04-10 04:17 AM
Isn't this a straight path?
Can't you make a smooth pass like a 3D modeler?
2023-04-10 04:20 AM - edited 2023-04-10 11:40 AM
1. Below you said you can't use 1 for the radius, but you used it. I'm a beginner so it's hard to understand the difference.
Can I ask for a little clarification?
2. May I ask you to explain stepA?
(What is the value of stepA?)
2023-04-10 04:58 AM
1. I didn't say you can't use 1 for the radius - that was julienK. You can't use status codes to create curves like you can with a prism command in the path definition. You can use status codes to create curves in the profile definition.
2. stepA is a variable I set up to be 15 (i.e. a step of 15 degrees). If you want a smoother pass through rounded corners, just make this number smaller: but I have found 15 to give a good enough result. The FOR - TO - NEXT flow control statement can also have a STEP component to it, so instead of counting up by 1, it will count by whatever STEP has been defined. Check out the GDL reference guide for more info.
2023-04-10 04:59 AM
Yes, this is a straight path from point to point. You can't make a 'smooth' pass like you can in Rhino (for example).
2023-04-10 01:45 PM
Example tube ring.