cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

REVOLVE hides extra lines?

Hello everyone, I created a script with the GDL REVOLVE command, but this is not what I want. I want to clear out the extra lines, as if it is not allowed.

this my code:
pen 1
material 60
roty 90
RESOL 6
REVOLVE 12, 360, 64,
        -0.2778735712153, 0.2017007160007,     0,
        -0.3351696591221, 0.186390306818,     0,
        -0.3889480822817, 0.1613876765317,     0,
        -0.4375833232646, 0.1274485596708,     0,
        -0.4375833232646, 1.293496448338E-17,     0,
        -2.440725391568E-16, 0.003989203055807,     0,
        -2.391851946749E-16, 0.1274485596708,     0,
        -0.04863524098297, 0.1613876765317,     0,
        -0.1024136641425, 0.186390306818,     0,
        -0.1597097520494, 0.2017007160007,     0,
        -0.2187916616323, 0.2068561285738,     0,
        -0.2778735712153, 0.2017007160007,     0

This picture is the effect I want.
1 Solution

Accepted Solutions
Anonymous
Not applicable
thanks for lingwisyer
RevolvedShellAngular Unable to control the number of segments,
So I made a little modification using the loop statement
pen 1
material 60
roty 90
RESOL 6

for i = 1 to 6 
	rotx 60*i-60
	REVOLVE 12, 60,  1+2+4+8+16+32,
			-0.2778735712153, 0.2017007160007,     1,
			-0.3351696591221, 0.186390306818,     1,
			-0.3889480822817, 0.1613876765317,     1,
			-0.4375833232646, 0.1274485596708,     2,
			-0.4375833232646, 1.293496448338E-17,     1,
			-2.440725391568E-16, 0.003989203055807,     1,
			-2.391851946749E-16, 0.1274485596708,     2,
			-0.04863524098297, 0.1613876765317,     1,
			-0.1024136641425, 0.186390306818,     1,
			-0.1597097520494, 0.2017007160007,     1,
			-0.2187916616323, 0.2068561285738,     1,
			-0.2778735712153, 0.2017007160007,     0
	del 1
next i
del 1

Go to post

6 Replies 6
use REVOLVE{2} or {3} variant.

Piotr
Anonymous
Not applicable
I modified the code again and the problem persists.I have tried many times and can't solve the problem.
mask = 4*j3 + 8*j4 + 16*j5 + 32*j6 + 64*j7 + 128*j8 + 256*j9, where each j can be 0 or 1.
pen 1
roty 90
RESOL 6
s=2
REVOLVE{2} 12, 0,360,  64,60,
        -0.2778735712153, 0.2017007160007,     s,60,
        -0.3351696591221, 0.186390306818,     s,60,
        -0.3889480822817, 0.1613876765317,     s,60,
        -0.4375833232646, 0.1274485596708,     s,60,
        -0.4375833232646, 1.293496448338E-17,     s,60,
        -2.440725391568E-16, 0.003989203055807,     s,60,
        -2.391851946749E-16, 0.1274485596708,     s,60,
        -0.04863524098297, 0.1613876765317,     s,60,
        -0.1024136641425, 0.186390306818,     s,60,
        -0.1597097520494, 0.2017007160007,     s,60,
        -0.2187916616323, 0.2068561285738,     s,60,
        -0.2778735712153, 0.2017007160007,     s,60
Lingwisyer
Guru
Instead of drawing your poly line as 8 segments, can you draw it as a single segment instead using Additional Status Codes? eg. 3000?


Ling.

EDIT: Actually, I am not sure how that would work given the Resol statement...

AC22-29 AUS 3200Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | R5 2600 | 16GB | GTX1660
Lingwisyer
Guru
If you use RevolvedShellAngular instead, then there is no need for the Resol statement. This allows you to use code 3000 removing the vertices that cause the horizontal divides. Flipping the shell surface then removes the spokes on the top and bottom faces, though you will need to change your coordinates to reflect the internal size instead of the actual size.

REVOLVEDSHELLANGULAR 60, 60,		!topMat, bottomMat,
60, 60, 60, 60, 60,			!sideMat_1, sideMat_2, sideMat_3, sideMat_4, defaultMat,
5, 0, 0.1, 1, 0, 0, 360,		!n, offset, thickness, flipped, trimmingBody, alphaOffset, alpha,
1, 6,					!segmentationType, nOfSegments,
0, 0, 1, 0,
0, 1, 0, 0,
1, 0, 0, 0,

0, 0,	8,
0, 2,	1,
5, -2,	900,
10, 2,	3000+2,
10, 0,	8


Ling.

AC22-29 AUS 3200Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | R5 2600 | 16GB | GTX1660
Anonymous
Not applicable
thanks for lingwisyer
RevolvedShellAngular Unable to control the number of segments,
So I made a little modification using the loop statement
pen 1
material 60
roty 90
RESOL 6

for i = 1 to 6 
	rotx 60*i-60
	REVOLVE 12, 60,  1+2+4+8+16+32,
			-0.2778735712153, 0.2017007160007,     1,
			-0.3351696591221, 0.186390306818,     1,
			-0.3889480822817, 0.1613876765317,     1,
			-0.4375833232646, 0.1274485596708,     2,
			-0.4375833232646, 1.293496448338E-17,     1,
			-2.440725391568E-16, 0.003989203055807,     1,
			-2.391851946749E-16, 0.1274485596708,     2,
			-0.04863524098297, 0.1613876765317,     1,
			-0.1024136641425, 0.186390306818,     1,
			-0.1597097520494, 0.2017007160007,     1,
			-0.2187916616323, 0.2068561285738,     1,
			-0.2778735712153, 0.2017007160007,     0
	del 1
next i
del 1
Lingwisyer
Guru
licheng6095 wrote:
RevolvedShellAngular Unable to control the number of segments,

You can just increase the second number in line 3 to increase the number of segments (!nOfSegments). Or are you talking about the segmentation of the curve?



Ling.

AC22-29 AUS 3200Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | R5 2600 | 16GB | GTX1660

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!