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

Is it possible to "graft" in Marionette

Recommended Posts

Hello!

I have a question: Is it possible to "graft" objects in Marionette, like it is possible in Grasshopper?

Example:

There is a list of 5 curves. I want to divide each curve into 10 equal segments, but at the same time, keep each division as separate list. The desired output -  list of 5 lists, containing 10 elements each.

I tried to solve this using e.g. Mix and Chunk List nodes, but it gives strange output.

 

Bonus question.

Is there any kind of documentation explaining what nodes outputs mean: e.g. "Vectorworks Handle type: 111"?

example001.vwx

Share this post


Link to post

I'm attaching a simple example - hopefully it will help you better understand the Chunk node.

How the Chunk node works - you provide it a list and an integer. The integer represents how many elements you want in each list, in my example (based on your example text), I want 10 elements in each list.

The output is 5 lists of 10 items.

Marionette_ChunkingLists_MFarrell.vwx

 

I also modified the network in your attached file to update it to what I *think* you wanted to do.

example001_MFarrell.vwx

 

Also - I do hope you'll give me my bonus points 😉 The handle types can be found here: http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#objects

  • Like 2

Share this post


Link to post

Thank you for your time and answers!

I have some more questions according to your files:

1. Why Chunk node works on list of points, but it does not on list of objects (curves)?

2. I wanted to divide list of curves into sorted list of curves (List1[0,1,2,3,4,5,6,7] into List2[[0,1],[2,3],[4,5],[6,7]] where each element is a curve), then divide them.

As I understand you divided all curves into segments and then sorted them into lists, am I right? Is there any way to do it "my way"?

 

The thing I want to achieve is to implement nodes from "wicker007.vwx" into the file i uploaded earlier. So in general, full script should work like this: Input solid -> create contours  -> for each contour implement nodes from "wicker007". Is this possible to be done?

 

 

wicker007.vwx

Share this post


Link to post

The chunk node *does* work on curves, the issue is that the Divide Curves node does not understand how to use that input.

 

Here's a network that I think accomplishes what you're looking for. What you'll need to do is just approach things a little differently - manipulate your lists later on when they're not objects and are instead point data.

 

I included valves at the end to show you different results - when you just generate curves, you're missing the last point which doesn't give you a closed curve. The easiest way to circumvent that is to first create closed 3D polys then convert to curves afterward (You could, of course, manipulate the points instead as you did in your wicker file.)

 

Screen Shot 2019-05-15 at 10.17.08 AM.png

example001_MFarrell_v2.vwx

  • Love 1

Share this post


Link to post

Great, thank you very much!

I think I would never reach to this point without you.

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.

×