Gabriel Chan Posted January 11, 2019 Share Posted January 11, 2019 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 Quote Link to comment
Vectorworks, Inc Employee klinzey Posted January 11, 2019 Vectorworks, Inc Employee Share Posted January 11, 2019 It's possible. I would post the question on the Marionette forum or the Vectorscript Forum. 2 Quote Link to comment
Kevin McAllister Posted January 11, 2019 Share Posted January 11, 2019 (edited) 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 Random Extrude.vwx Edited January 11, 2019 by Kevin McAllister Clarity 1 Quote Link to comment
DomC Posted January 12, 2019 Share Posted January 12, 2019 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 3 Quote Link to comment
Kevin McAllister Posted January 12, 2019 Share Posted January 12, 2019 8 hours ago, DomC said: ^ 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 Quote Link to comment
Gabriel Chan Posted January 14, 2019 Author Share Posted January 14, 2019 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 Quote Link to comment
Gabriel Chan Posted January 14, 2019 Author Share Posted January 14, 2019 Seems I have found the answer to my question after a bit more digging at this weblink: http://developer.vectorworks.net/index.php/VS:Search_Criteria Subtypes are under ST, so the criteria I had to make was ST=CIRCLE. Marionette is getting more interesting! Quote Link to comment
Marionette Maven Marissa Farrell Posted January 14, 2019 Marionette Maven Share Posted January 14, 2019 @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! 2 Quote Link to comment
Gabriel Chan Posted January 14, 2019 Author Share Posted January 14, 2019 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 Quote Link to comment
Recommended Posts
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.