Jump to content
  • 0

Merge Colinear Line Tool


brian-rwc

Question

Vectorworks needs to have a tool long available in Autocad (sometimes called the "glue" tool) where you can select 2 colinear lines and they will get merged or "glued" together as a single line object.

This is not at all similar to the current VW polyline tool as the merged lines would become a true line object. Colinear lines merged as polylines are never as easy to work with or manage accurately when you really just want them to be a single line.

I remember this as being an immensely useful tool in Autocad and I've always been surprised VW has never offered it.

(BTW - please let me know if already a feature and I am just not seeing it)

I would think it would be one of the easiest features to program. With 2 colinear lines selected the tool would just need to be programmed to calculate the furthest endpoints between both lines and replace them with a single line sharing the same endpoints. The lines wouldn't even need to share a common endpoint. They could be miles apart as long as they were colinear.

Link to comment

8 answers to this question

Recommended Posts

  • 0

Try the command: Modify>Compose. Many segments of pretty much any object type (arcs, lines, polys, etc) can be "composed" into a single object. One Rule: the objects must be precisely and exactly intersecting (i.e.: the end of one object must be exactly coincident with the end of the next, etc).

Link to comment
  • 0

I've tried Modify>Compose before but the problem with that is it creates a 'Polygon' object not a true merged line object. Polygons that look like lines don't always blend nicely with other line geometry and if that "Polygon Line" occurs at an angle there is no immediate indication what the angle is and then you have 4 or 8 selection handles you need to deal with that seem to get in the way.

Furthermore if there is an inadvertent kink in that "Polygon Line" it can be difficult to detect until other line work has been drawn parallel or perpendicular to that crooked line and random errors get perpetuated throughout the drawing.

When I need to "merge" two lines I usually end of using the extend tool to extend the line to some other object then delete the overlapping line. Or when merging very long lines (critically important not to be crooked) I do the following archaic process:

1. group the lines together (to isolate them)

2. enter the group

3. draw a temporary extension line at end of the furthest line

4. delete the line meeting the extension line

5. extend the other line to the extension line

6. delete the extension line

7. exit the the group

8. ungroup the group

I know it's ridiculously cumbersome but at least I don't have to deal with Polygons. For grid lines and building datum lines the last thing I would want is for those to be Polygons.

I think there has got to be a better way! It's the type of issue you would of thought could of been addressed with the earliest versions of MiniCAD.

Link to comment
  • 0

Ah. So maybe I was being a little dense, but I think I finally understand what you're after. If you don't mind me asking, if it's a single line you want, how did it come to exist as more than one segment in the first place? Are these imported .dwg files? Is it sloppy drafting? To me, as long as there weren't a multitude of these to fix I would just draw a new line (connect point A with point B) then Send to Back and delete the two (or more) original segments...

Link to comment
  • 0

These lines come to exist through normal processes of 2D drafting whether drawing plans, details or elevations. I wouldn't say it has anything to do with sloppy drafting.

It's just a matter of needing to use CAD to compose and develop a design as we are figuring things out. Most of us do not know 100% of the exact steps and procedures we are going to use when starting a drawing.

Sometimes you split a line and then several stages later realize you would like to heal the line back to the way it was (without undoing your prior work). That's just one example but I think there are innumerable situations where the need for this tool could occur.

As another example Vectorworks provides the Add Surface tool for merging two Polygons. They could of just said "draw the Polygon correctly the first time" and there is no need for the Add Surface tool. Fortunately they didn't do that!

Link to comment
  • 0

This is totally crazy. But...

This will convert colinear overlapping lines to one line:

1. Select the lines

2. Convert to nurbs. Modify > Convert > Convert to Nurbs or option-command-N

3. Modify > Convert > Convert to Lines

4. Ungroup.

You now have one line on the screen plane. It doesn't matter what the planes of the original lines were, or what view the drawing was in, if looking at layer plane lines. The new single line will be on the screen plane.

It should be relatively easy (famous last words!) to write a script to do this...

mk

Link to comment
  • 0

This is just a proof of concept. But attached is a clumsy script that will do it. It requires a return to dismiss a dialog box (make sure Hidden Line is selected in that dialog box).

Select the lines in the drawing. Run the script. Only one line remains.

It's not a real solution: Lines of differing line weights or line colors confuse it. Lines of different classes get put into unexpected classes.

But I think a real script could be written to do it.

hth

mk

Link to comment

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
Answer this question...

×   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.

×
×
  • Create New...