Palle Posted November 28, 2018 Share Posted November 28, 2018 Hi all, I'm trying to generate an object to be produced IRL, inspired by the object in the reference image. But I want only a specified number of steps of framed boxes, until the inner box, which is a solid, as seen in the other image. I want to be able to tweak the parameters, so I can find the right scaling factor and rotation. The parameters I want to control are: > Dimensions of biggest box > Total number of box repetitions. > End angle of the solid (smallest) box > The initial size of the profile for the frame boxes (which is also scaled down for each box in the ref image - but could be a fixed value in stead) So far, I've built a script that makes solid cubes, scales and rotates them. Two questions: > I need a way to generate the frame boxes in stead of solid cubes. So I can actually see the framed boxes with the chosen profile size. This is my biggest struggle.. > And for versatility, a better way to generate the list of scaling values for the boxes. As is, I have to populate the list myself. Any suggestions for other ways to better build a script like this is great. Appreciate any help..! Palle Marionette Kais object.vwx 1 Quote Link to comment
mjm Posted November 29, 2018 Share Posted November 29, 2018 10 hours ago, Palle said: Hi all, I'm trying to generate an object to be produced IRL, inspired by the object in the reference image. But I want only a specified number of steps of framed boxes, until the inner box, which is a solid, as seen in the other image. I want to be able to tweak the parameters, so I can find the right scaling factor and rotation. The parameters I want to control are: > Dimensions of biggest box > Total number of box repetitions. > End angle of the solid (smallest) box > The initial size of the profile for the frame boxes (which is also scaled down for each box in the ref image - but could be a fixed value in stead) So far, I've built a script that makes solid cubes, scales and rotates them. Two questions: > I need a way to generate the frame boxes in stead of solid cubes. So I can actually see the framed boxes with the chosen profile size. This is my biggest struggle.. > And for versatility, a better way to generate the list of scaling values for the boxes. As is, I have to populate the list myself. Any suggestions for other ways to better build a script like this is great. Appreciate any help..! Palle Marionette Kais object.vwx Cool! Quote Link to comment
STERNontwerp Posted November 29, 2018 Share Posted November 29, 2018 Since it is symmetrical you could start with just a path-extrude of a square and mirror/rotate that six times. Quote Link to comment
Palle Posted November 29, 2018 Author Share Posted November 29, 2018 23 minutes ago, STERNontwerp said: Since it is symmetrical you could start with just a path-extrude of a square and mirror/rotate that six times. Gotcha. But which node would you use for mirroring them? Quote Link to comment
STERNontwerp Posted November 29, 2018 Share Posted November 29, 2018 There's a Mirror node in 'Operations' Quote Link to comment
STERNontwerp Posted November 29, 2018 Share Posted November 29, 2018 When you input something else then 9 into 'Number of Boxes', then it goes wrong. The squares are out of line and there are still 9. There are 9 outputs of the ordered list when you input 3 into Number of Boxes. Maybe there is a solution without the ordered list with the [mul list] node (basic math), [Repeat], and [Sequence]? Quote Link to comment
Palle Posted November 29, 2018 Author Share Posted November 29, 2018 34 minutes ago, STERNontwerp said: There's a Mirror node in 'Operations' But only for 2D objects, right? So, mirror all paths before extrusion? And yes, I know the problem - and that's what I also want to solve. The ordered-list-node I use for generating the list of sizes does not relate to the input for number of boxes, so right now after changing the input, I would have to also make new nodes and connecting to make the sequence. Repeat and sequence. Will try that.. Quote Link to comment
STERNontwerp Posted November 29, 2018 Share Posted November 29, 2018 It works with 3D objects, but I don't think it works with groups. You could use [Ungroup] & [Solid Boolean] (Objects/Solid) To make 1 object from the path-extruded squares. (But actually you don't have to mirror, move and rotate should be enough) Quote Link to comment
Vectorworks, Inc Employee Stephan Moenninghoff Posted November 29, 2018 Vectorworks, Inc Employee Share Posted November 29, 2018 @Palle You need to supply a list of values to the rect and, subsequently, extrude node. That will take care of everything. The ordered list is not necessary for this kind of thing. Quote Link to comment
Vectorworks, Inc Employee Stephan Moenninghoff Posted November 29, 2018 Vectorworks, Inc Employee Share Posted November 29, 2018 (edited) Try this. It's not far off, just needs some refinement. Vortex Box.vwx Edited November 29, 2018 by Stephan Moenninghoff Quote Link to comment
Palle Posted December 3, 2018 Author Share Posted December 3, 2018 @Stephan Moenninghoff Thanks for the code. However, I am looking for an expression that gives me size increments that are NOT constant. The have to gradually become less and less, never reaching zero. Therefore, I apply the scaling factor to each step. The question is really, how do I express that in Marionette? INPUTS: - Start value - Number of steps - Scaling factor (i.e. 92% of previous list item) OUTPUT: Decreasing or increasing list of values Quote Link to comment
Vectorworks, Inc Employee Stephan Moenninghoff Posted December 3, 2018 Vectorworks, Inc Employee Share Posted December 3, 2018 Use a function perhaps, like x*x*50 or something similar? Quote Link to comment
Palle Posted December 3, 2018 Author Share Posted December 3, 2018 Solved it, thanks! You pointed in the right direction: [the scaling factor] to the power of [a list of values from 0-max] gives the perfect list. Quote Link to comment
Palle Posted December 19, 2018 Author Share Posted December 19, 2018 (edited) Got back to the task - after some weeks away from it.. It's easy to input a list into rectangle/extrude nodes to give different sizes of closed boxes, but with my frame box (made inside the wrapper with solid boolean) is there a way to scale CSG solids - or - is there a way to input the different sizes in to this wrapper node? marionette Kais object 4.vwx Edited December 26, 2018 by Palle solved it Quote Link to comment
Palle Posted December 26, 2018 Author Share Posted December 26, 2018 (Solved previous question - the code is now a marionette object) All of a sudden, I'm getting an error message "object is not subscriptable". I understand it's about an int node connected to a rectangle node inside the wrapper called 'OPEN BOXES'. Can anyone explain what this error is about? marionette Kais object 5.vwx marionette Kais object 5.vwx Quote Link to comment
Vectorworks, Inc Employee SBarrettWalker Posted January 7, 2019 Vectorworks, Inc Employee Share Posted January 7, 2019 Hi @Palle- It looks like you have an integer node attached to the "vRot" input of the rectangle nodes in one of your wrappers. This input requires a vector - that is what the "v" means. It looks like all of the Int nodes you are using have a value of 0 so you are not looking to rotate any of the rectangles. If you simply remove these Int nodes and leave those rectangle inputs open the script will work how you want. Quote Link to comment
Vectorworks, Inc Employee SBarrettWalker Posted January 7, 2019 Vectorworks, Inc Employee Share Posted January 7, 2019 I noticed that your rectangle nodes are named and when I remove the Int node then those names appear on the outside of the wrapper. To keep this from happening, you can attach a 2D Vector node with the values of 1 for X and 0 for Y to the vRot inputs of the rectangles. Those are the default values for no rotation. 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.