Jump to content
RuudB

Compose/connect/combine lines and arcs within one single polyline

Recommended Posts

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

Share this post


Link to post

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

Share this post


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

Share this post


Link to post

Patrick, thanks for this, it works a treat. :)  This was 3 separate polyline touching and it joined all of them perfectly into one polyline.

Capture.JPG

Edited by Alan Woodwell

Share this post


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

Share this post


Link to post

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 by Patrick Winkler
  • Like 1

Share this post


Link to post

@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

Share this post


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

Share this post


Link to post

@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!

Share this post


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

Share this post


Link to post

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

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.

×
×
  • Create New...