RuudB Posted September 22, 2016 Share Posted September 22, 2016 Dear all, I want to make a freeform 2D object. I drew this already by making lines and arcs, but I cannot find a way to combine them. The "Compose" button in the menu of Vectorworks is doing this, but the node in Marionette is missing. Does someone found a way to do this or created the node? Ruud Quote Link to comment
Vectorworks, Inc Employee SBarrettWalker Posted September 22, 2016 Vectorworks, Inc Employee Share Posted September 22, 2016 Hello, There is currently no "compose" node or its equivalent in Marionette. It is definitely on the wishlist though! There are however always ways to get the result you are looking for - Did you draw the separate pieces in Marionette? If so, there is probably a way to draw it as a single object using Marionette - I would suggest looking at the nodes in the Poly 2D category. If you drew it freehand, is there a particular reason you want to compose it with Marionette instead of using the Compose command? Sarah Quote Link to comment
Patrick Winkler Posted September 22, 2016 Share Posted September 22, 2016 (edited) Hi RuudB, here is a node for composing objects based on the function 'DoMenuTextByName'. Compose.vwx Edited September 22, 2016 by Patrick Winkler Quote Link to comment
RuudB Posted September 23, 2016 Author Share Posted September 23, 2016 22 hours ago, sbarrett said: Hello, There is currently no "compose" node or its equivalent in Marionette. It is definitely on the wishlist though! There are however always ways to get the result you are looking for - Did you draw the separate pieces in Marionette? If so, there is probably a way to draw it as a single object using Marionette - I would suggest looking at the nodes in the Poly 2D category. If you drew it freehand, is there a particular reason you want to compose it with Marionette instead of using the Compose command? Sarah Hi Sarah. I already found a post from April of someone facing the same problem. So I was hoping this to be on the wishlist, luckily it is I drew everything in Marionette, it's a combination of lines and arcs. This is part of a bigger project where I have to draw thousends of different elements, which are just slightly different. That's why I want to use Marionette. 21 hours ago, Patrick Winkler said: Hi RuudB, here is a node for composing objects based on the function 'DoMenuTextByName'. Compose.vwx Thanks Patrick! This sounds amazing. I already heard of that command, but I didn't manage in using it correctly. I will check out the node Quote Link to comment
AlanW Posted September 23, 2016 Share Posted September 23, 2016 (edited) Patrick, thanks for this, it works a treat. This was 3 separate polyline touching and it joined all of them perfectly into one polyline. Edited September 23, 2016 by Alan Woodwell Quote Link to comment
RuudB Posted September 28, 2016 Author Share Posted September 28, 2016 On 22-9-2016 at 2:53 PM, Patrick Winkler said: Hi RuudB, here is a node for composing objects based on the function 'DoMenuTextByName'. Compose.vwx He Patrick, For existing lines in my file this node works perfect. But the problem in my case is that I created lines in Marionette. So I like to link these lines directly to a "Compose" node. Do you know how to do that? I tried a lot already within the script, but I didn't manage to select the lines created. Ruud Quote Link to comment
Patrick Winkler Posted September 28, 2016 Share Posted September 28, 2016 Hi Ruud, can you provide an example file? Quote Link to comment
RuudB Posted September 28, 2016 Author Share Posted September 28, 2016 I made you a simple example of something I like to get worked. I can also sent you the original file, but there I'm creating many lines and arcs. Hope you're able to let this work Node Compose (forum).vwx Quote Link to comment
Patrick Winkler Posted September 28, 2016 Share Posted September 28, 2016 (edited) The problem is SetLinksObject in the node definition . If this property is set the objects are not complete at the point where the Compose-Node is executed. You can disabled the property in the line nodes but then the lines from the previous execution will not get replaced by the new ones. @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): this = Marionette.Node( "Line" ) this.SetDescription( "Creates a new 2D line in the drawing" ) start = Marionette.PortIn( (0,0) ) start.SetDescription( "the line's start point" ) end = Marionette.PortIn( (1,0) ) end.SetDescription( "the line's end point" ) lineH = Marionette.PortOut( "line" ) lineH.SetDescription( "the newly created line" ) #this.SetLinksObjects() # <<<----------- def RunNode(self): vs.MoveTo(self.Params.start.value) vs.LineTo(self.Params.end.value) self.Params.lineH.value = vs.LNewObj() Edited September 28, 2016 by Patrick Winkler 1 Quote Link to comment
Marionette Maven Marissa Farrell Posted September 28, 2016 Marionette Maven Share Posted September 28, 2016 @Patrick Winkler, there's a workaround that can keep the object attached to the network. The only issue I'm running into now is returning the object to pass out of the output port. @RuudB, let me know if this helps at all. Right now, you just won't be able to manipulate the object after it's composed, until I can figure out how to find it... MarionetteCompose_WIP_MFarrell_v2016.vwx Quote Link to comment
Patrick Winkler Posted September 28, 2016 Share Posted September 28, 2016 1 minute ago, MarissaF said: @Patrick Winkler, there's a workaround that can keep the object attached to the network. The only issue I'm running into now is returning the object to pass out of the output port. @RuudB, let me know if this helps at all. Right now, you just won't be able to manipulate the object after it's composed, until I can figure out how to find it... MarionetteCompose_WIP_MFarrell_v2016.vwx Do you mean the copy node? Hav tried this but somehow it did not produce a copy of the objects. Quote Link to comment
Marionette Maven Marissa Farrell Posted September 28, 2016 Marionette Maven Share Posted September 28, 2016 I wrote a new compose node, it's in that file. Hopefully you can make sense of it and see what I did. 1 Quote Link to comment
RuudB Posted September 28, 2016 Author Share Posted September 28, 2016 @Patrick WinklerWow, this works instantly I don't have enough experience to see these things, but good to know! @MarissaFThis looks like a decent node to use in the network. Both thanks a lot for the quick reply! Quote Link to comment
Patrick Winkler Posted September 28, 2016 Share Posted September 28, 2016 14 minutes ago, MarissaF said: I wrote a new compose node, it's in that file. Hopefully you can make sense of it and see what I did. Thanks for the enhancement but with LNewObj you can get problems. The Compose command can create more than one object, thats the reason why I took the handles by: self.Params.out.value = get_Objs_by_Crit ('(VSEL=TRUE)') Quote Link to comment
Marionette Maven Marissa Farrell Posted September 28, 2016 Marionette Maven Share Posted September 28, 2016 Already working on it! This does similar to how you did it. The only remaining issue is that it still returns handles to the lines prior to composing them. MarionetteCompose_WIP_MFarrellv2_v2016.vwx Quote Link to comment
Patrick Winkler Posted September 28, 2016 Share Posted September 28, 2016 I removed the statement which checks if the composed objs are type group and it seem sto work. MarionetteCompose_WIP_PW_v2016.vwx Quote Link to comment
Marionette Maven Marissa Farrell Posted September 28, 2016 Marionette Maven Share Posted September 28, 2016 AHHHH TYPE MISMATCH! I definitely meant to query for polys, not groups. My mistake! Thanks for catching it. Quote Link to comment
Patrick Winkler Posted September 28, 2016 Share Posted September 28, 2016 But we stil not succeeded Now it returns the composed objs and the lines! Quote Link to comment
Marionette Maven Marissa Farrell Posted September 28, 2016 Marionette Maven Share Posted September 28, 2016 I'm not seeing that here... Let me know if you see otherwise. If we find this to be the best working example, I will replace my previous files with this one. MarionetteCompose_WIP_MFarrellv3_v2016.vwx Quote Link to comment
Patrick Winkler Posted September 28, 2016 Share Posted September 28, 2016 Ok, forgot the type check. 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.