News:

All posts discussing pricing or where to buy TurboCAD will be deleted.

Main Menu

Is this possible in a PPM?

Started by AussieBloke, December 01, 2020, 07:42:19 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

AussieBloke

I created this simple 2D & 3D drawing for V21 Turbocad for reference in relation to the following. The Vortex is drawn from the steps pretty much below so I just need to find out if this can be repeated in a PPM

I need to create a PPM that will do the following, is this possible?

Q1. Create a loft based on bottom radius, based on the top radius and height?
( none of the radii or height will be known )

A1. Example of a Truncated Cone:
//cone2.ppm – a truncated cone
R1 = Parameter("BaseRadius", 0.5, LINEAR, Interval(0.01, 10));
R2 = Parameter("TopRadius", 0.1, LINEAR, Interval(0, 10));
H = Parameter("Height", 3, LINEAR, Interval(0.05, 20));
Cone2 = Cone(H, R1, R2);
Output(Cone2);

Q2. Draw another Lofted object 1mm smaller in both previous radii, then subtract that from the 1st lofted object?

A2. BooleanSubtraction of two 3D objects

Q3. Draw a polyline or 3D Polyline from the top left radius Q position downto the corresponding bottom left radius Q position? ( these polylines are so that I can draw 3D points at specific intervals or test the correct position of the next drawn arc)

A3.

Q4. Divide the polyline or 3D polyline by the number of arcs required?

A4.

Q5. Starting from the top radius that forms the first loft, draw arcs going down in the Z axis by the number of arcs required?

A5.

Q6. Draw a 3D cylinder unknown diam & height, change the reference point to 1 end of the cylinder then rotate this cylinder so that when viewed in Front Wiew the cylinder is perpendicular to the 3D polyline or polyline from Q3?

A6.

Q7. Move the cylinder from Q6 towards the centre of the Loft by about 10mm along the Z axis, that way I can re-use the cylinder for two subsequent subtractions?

A7.


Q8. Do an array copy of each cylinder around each arc based on the arcs circumference with a probable 3mm spacing ( cylinder of say 1.5mm diam and 1.5mm spacing between the next cylinder ) 

A8.

AussieBloke

Captcha is crap, now its working.

nikkipollard

#2
It is possible. But you wouldn't use a loft-
sweep a profile around a circle.
The holes should be easy but all those holes would be time consuming for you you cant loop through each row
-each row would need to be calculated separately .
On my computer that would be very slow

I have attached a small sample. I have only  done 4 rows of holes but you will get the idea.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Torfinn

Hi Nikki

The ppm's missing hpatt and positive to work.
And you are correct about timeconsuming, on this pc if i run a grating ppm with 10 000 holes, it takes about 35 min. to be finish :)

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

nikkipollard

#4
Thanks Torfinn I fixed that.
I have a grating too It's not super speedy but its not That slow.
Instead of holes I used bars.
I think that reduces the number of  copies - If there are a 100 holes - You would probably have about 22 bars.
- Just a different way of thinking

This took less then a minute to finish
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Torfinn

Yeah, there is differense, the plate is 4 x 1,2 meter and 10 000 holes, if i adjust it to different dimensions and bigger holes it's no  problems :)

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

AussieBloke

Well the speed on my 5 year old pc is ok, so it takes about 4 - 6 minutes to display that vortex that I posted after placing about 350 or so 3D cylinders.

Torfinn what HPATT?
is that short for horizontal pattern

Thanks Nikki Im taking a look at your cones mod now.

Torfinn

Hi Darryl

I assume so :), it was reported as error when i tried Nikki's file
It*s Nikki who give it that name, if you open the ppm file you will see it in there.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

nikkipollard

#8
Sorry Darryl - I originally posted the wrong ppms I have replaced them
I used a mini ppm - (macro ) for the pattern of holes around one circle. - Hpatt.ppm
and used that ppm repeatedly in the main macro.
- I used rows rows of holes. -
You might have wanted a spiral of holes - I think that would be easier to do using Ruby or the SDK and adapting Henrys Logarithmic spiral formulae- discussed a short while ago..
It doesn't look like that is what you meant by vortex. I haven't done this but you could rotate every second row by half the the angle between each hole of that row.

holes2=RotateZ(Move(hpatt(R2,HR,num2,A1,Th*2,1),0,0,H1+H1/2),(360/num2)/2)



Torfinn What I was trying to say is If you change the way your grid is made. Instead of subtracting a 1000 holes from a plate.
Draw the positives- an array of long thin boxes in both directions And Boolean union them together.
You get the same result but for a grating with 100 holes in 1 direction and 10 holes in the other direction you would only need 112 boxes.- much quicker for the computer to calculate 112 boxes then 1000

Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Torfinn

Hi Nikki

Yes i know that :), this was an test long time back when a guy in here made a construction and used grating, i believe i have used it myself 1 or 2 time's and it works like a charm if there is less than 500 hole's, the "funny" part of it was that i for long time did not believe it worked, as it did take about 135 min to be finish on old pc, so i kill it many time before i by accident leave it alone for a couple of hours and when i come back it was finish :)
Nearly everything with repeat for more than ca 500 times will slow down TC.
And in ppm because we cant use block's in TC, so then TC draw and set every object 1 by 1, i have one that make roof tiles, about 1300 on test house, there is a huge difference in time used to set it out, so in TC i use only a plate with material on it.
But on a lean-on roof with less than 500 roof tiles, it just use a couple of second in TC

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

nikkipollard

I don't have enough patience to wait either.
I have been using the SDK for more free form stuff. SDK seems much much slower then ppm but at lease you can calculate how many objects there are going to be first and then give the option to cancel before it starts to draw.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

AussieBloke

Quote from: nikkipollard on December 02, 2020, 09:52:38 PM
Sorry Darryl - I originally posted the wrong ppms I have replaced them
I used a mini ppm - (macro ) for the pattern of holes around one circle. - Hpatt.ppm
and used that ppm repeatedly in the main macro.
- I used rows rows of holes. -
You might have wanted a spiral of holes - I think that would be easier to do using Ruby or the SDK and adapting Henrys Logarithmic spiral formulae- discussed a short while ago..
It doesn't look like that is what you meant by vortex. I haven't done this but you could rotate every second row by half the the angle between each hole of that row.

holes2=RotateZ(Move(hpatt(R2,HR,num2,A1,Th*2,1),0,0,H1+H1/2),(360/num2)/2)


Thanks Nikki for taking the time to create a simple solution, thats appreciated.