Hello,
I want to draw a hollow cylinder respectively a cylinder with a inner radius (like in the DrawCircle-Command).
Is there any way to do that without a 3D-Model or a Mesh?
Background: I need this for a better looking Curved Conveyor, but the Mesh from the normal conveyors doesn'l look good enough and I have problems to scale them right.
Thanks
DrawCircle for 3D (aka hollow cylinder)
Re: DrawCircle for 3D (aka hollow cylinder)
Hello ptis,
You can use the following code to draw a cylinder:
Regards,
Bart
You can use the following code to draw a cylinder:
Code: Select all
DrawCylinder(
0, {X-Location from Atom origin}
0, {Y-Location from Atom origin}
0, {Y-Location from Atom origin}
20, {Height, 50 % in positive z-direction, 50% in negative z-direction}
10, {Radius in X-direction}
10, {Radius in Y-direction}
360, {Angle of the cylinder (360 for a complete round cylinder)}
Z_AXIS, {Axis around which the cylinder is drawn}
CP_SIDES + CP_BOTTOM + CP_TOP {Which sides are drawn. Only use CP_SIDES for a hollow cylinder}
)
Bart
Re: DrawCircle for 3D (aka hollow cylinder)
Hello ptis,
I thought about your idea of having an inner radius on a cylinder and came up with a solution. In the attached model, you can find the 4DScript to draw a hollow cylinder on the On3DDraw event of the product. Play with the variables to adjust the shape of your cylinder.
Regards,
Bart
I thought about your idea of having an inner radius on a cylinder and came up with a solution. In the attached model, you can find the 4DScript to draw a hollow cylinder on the On3DDraw event of the product. Play with the variables to adjust the shape of your cylinder.
Regards,
Bart
- Attachments
-
- Hollow Cylinder.mod
- (4.2 KiB) Downloaded 320 times
Re: DrawCircle for 3D (aka hollow cylinder)
Hello BartC,
a combination of Cone and Cylinder... clever idea! It works! Thanks!
But one more little question: If I rotate this model (with rotatecoords) the shading is obviously wrong. ED shades the model like it wouldn't be rotated. Is there any way to fix this? I guess the only way is to do the "RotateCoords" by myself and don't use the ED-RotateCoords?
Thanks
a combination of Cone and Cylinder... clever idea! It works! Thanks!
But one more little question: If I rotate this model (with rotatecoords) the shading is obviously wrong. ED shades the model like it wouldn't be rotated. Is there any way to fix this? I guess the only way is to do the "RotateCoords" by myself and don't use the ED-RotateCoords?
Thanks
Re: DrawCircle for 3D (aka hollow cylinder)
*bump*
ptis wrote:But one more little question: If I rotate this model (with rotatecoords) the shading is obviously wrong. ED shades the model like it wouldn't be rotated. Is there any way to fix this?