Jump to content
Developer Wiki and Function Reference Links ×

Random Extrude


Gabriel Chan

Recommended Posts

Here's a tricky one to start the year...

 

I have a set design that roughly has 1500 circles, all of the same diameter of 60mm. I'm looking to extrude them at a range of different heights, somewhere between 200mm and 800mm.

 

The dispersion of these different heights should be as random as possible to create an organic feel.

 

Is there any way of efficiently doing the above, possibly with scripts?

 

Gabriel

Link to comment
3 hours ago, Gabriel Chan said:

Here's a tricky one to start the year...

 

I have a set design that roughly has 1500 circles, all of the same diameter of 60mm. I'm looking to extrude them at a range of different heights, somewhere between 200mm and 800mm.

 

The dispersion of these different heights should be as random as possible to create an organic feel.

 

Is there any way of efficiently doing the above, possibly with scripts?

 

Gabriel

 

 

I spent a few minutes messing around with this and here's something that might give you a start. Its based on a random node from this thread - link.

 

This network looks for circles and extrudes them randomly. You can adjust the criteria by clicking on the Objs by Crit node (so for example it could look for circles in a specific class). Note that the network is destructive so the only way to undo it is to use the Undo function.

 

There might be a way to make your base collection of circles into control geometry ( @Marissa Farrell is it possible to iterate through control geometry? ). There's also likely a way to count how many objects you're selecting and automatically define n, the number of objects you need random numbers for. Otherwise you will need to enter it manually for your situation like I did.

 

Kevin

 

20066927_ScreenShot2019-01-11at10_29_35AM.thumb.png.28a928ef300cc3987934db07ee044222.png

850436678_ScreenShot2019-01-11at10_32_21AM.thumb.png.5ba071e39a3c239a27a0768a0b5cc8d2.png

Random Extrude.vwx

Edited by Kevin McAllister
Clarity
  • Like 1
Link to comment

This is way over my head... Goodness.. But I'm trying. My very first Marionette!

 

I think based on all the descriptions of the nodes I understand what is going on, and also the Debugging mode helps to see what data is flowing through.

 

I have managed in the very first node "Objs by Crit" to get inputs to recognise rectangles (i.e. the default criteria T=Rect) or ovals (T=Oval). However, when I input T=Circle, I get this Execution Error pop up:

 

Error: Invalid call-back function parameter type. Parameter index= 0 name=objectHandle

 

So I went to search for the list of Object criteria and I found this

http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#attrCrit

 

So yes, under types there aren't any circles??

 

They do appear under Sub types though... How would I get the node to recognise the circles?

 

Gabriel

Link to comment
  • Marionette Maven

@Gabriel

I'm assuming you're using a version prior to 2019 - in 2019, there's a new button in the OIP of the Objects by Criteria node that will display the Criteria dialog and populate that text field for you. Not so helpful if using 2017 still, as stated in your signature, but something to look forward to if you choose to upgrade!

  • Like 2
Link to comment
2 hours ago, Marissa Farrell said:

@Gabriel

I'm assuming you're using a version prior to 2019 - in 2019, there's a new button in the OIP of the Objects by Criteria node that will display the Criteria dialog and populate that text field for you. Not so helpful if using 2017 still, as stated in your signature, but something to look forward to if you choose to upgrade!

Thanks Marissa. I am indeed on 2017. Planning to upgrade on a five year cycle - gotta make the price of the software count! Will be certain to look out for improvements in Marionette next time I upgrade. Meanwhile, will be taking baby steps to learn Marionette.

 

Cheers,

 

Gabriel

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...