Jump to content
Developer Wiki and Function Reference Links Read more... ×

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

Share this post


Link to post
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

Share this post


Link to post

I would do it like this

 

1. copy to not loose your original circles.

2. get list length and repeat one of the random numbers to get as many random numbers as your number of circles are

 

All nodes are in the default library

 

2002136562_Bildschirmfoto2019-01-12um10_27_04.thumb.png.e0044d3d33c9ce61621c80f89d6a7885.png

  • Like 3

Share this post


Link to post
8 hours ago, DomC said:

2002136562_Bildschirmfoto2019-01-12um10_27_04.thumb.png.e0044d3d33c9ce61621c80f89d6a7885.png

 

^ this is super helpful. When I was playing around I tried using the Random node but couldn't figure out how to get it to repeat.....

Thanks for sharing!

 

Kevin

 

Share this post


Link to post

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

Share this post


Link to post

@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

Share this post


Link to post
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

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×