Trimble Business Center

 View Only
Expand all | Collapse all

Project Cleanup- Joining Misaligned Linestrings

  • 1.  Project Cleanup- Joining Misaligned Linestrings

    Posted 11-17-2020 11:16

    I have never had any luck with this. I've got two lines with only a .05' gap and a 0*6'34" misalignment and I cannot get them to join using project cleanup regardless the size of the Misconnection Tolerance. What am I missing here? 



  • 2.  Re: Project Cleanup- Joining Misaligned Linestrings

    Posted 11-17-2020 16:02

    I've had this happen to me as well.

     

    • Sometimes it has been that one or more of the lines has a UCS applied (you can see a UCS, if present, in the properties panel for the object; and you can run the Convert to Linestring macro on it to eliminate this).
    • Sometimes it seems to be related with line direction. If the line directions run more or less opposite of each other, I've had trouble getting them to automatically join. EDIT->Reverse Line Direction can help here.
    • Sometimes the line geometry will loop back on itself, and this messes things up. I use EDIT on the line and scroll through the horizontal segments to see if they loop back.
    • Sometimes there are duplicate lines stacked on top of each other and the algorithm doesn't know how to pick one to use for the join.

     

    There are doubtless other reasons why this could be happening, but these are a few I've experienced.



  • 3.  Re: Project Cleanup- Joining Misaligned Linestrings

    Posted 11-17-2020 22:00

    Thank you for the reply. I had not thought of the UCS possibility. After doing some more testing, it appears this tool does NOT work for 3D lines at all, even they have no misalignment. That's unfortunate and explains why I've have limited success with it.    



  • 4.  Re: Project Cleanup- Joining Misaligned Linestrings

    Posted 11-18-2020 04:21

    Joining 3D lines is a pretty dangerous thing to do - Project Cleanup was designed to fix imported 2D CAD linework. If the data is 3D and the two end points are not exactly the same elevation we don't join them - the options would be

     

    1) Move one end to the other - probably not a good answer

    2) Move the other end to the other - probably not a good answer

    3) Move both ends to an average location - probably not a good answer

    4) Connect with a vertical line between the ends - probably not a good answer

     

    This is why we don't join them if they are 3D and mismatched

     

    When the lines are touching at their end points but are drawn in opposite directions, we do reverse the lines to join the lines if they are touching. Where the end points do not touch, project cleanup does try to join the lines but it does "edit the lines" also to make a line that has a continuous forward direction - i.e.it does a degree of trimming and extending and clipping of lines to try and make a line that somewhat fits the data within the connection tolerance.

     

    We all know how bad source CAD data can be and Source CAD provided as Vector PDF can be worse - while the command tries to fit something to the source, it will never always work - however if you can provide specific examples where you expect something to work but doesn't, please provide the example data and the settings that you are using in Project Cleanup and we can take a look - in my experience the problem is often with the data not the command because it would be impossible to build a tool that can cope with all of the variances that can happen in CAD files.

     

    One other thing that causes it to fail is multiple lines on top of each other, it is extremely common to have two or more lines that follow the same path that sit partially or fully on top of each other - unless you clean that up first, the join function will not work fully. The challenge with this is that the lines have to be clean before the Join will actually work - sometimes I have to run Cleanup two or more times to clean out all of the Duplicate Lines or Overlapping line loops - running it just once does not get them all and this will often be the issue.

     

    As you pointed out UCS is a more and more common issue also - if some lines (typically the Arcs) have UCS then they will not join to straight lines that do not have UCS. Use the Convert to Linestring TML to remove the UCS before running Project Cleanup.

     

    Hope that this helps

     

    Alan



  • 5.  Re: Project Cleanup- Joining Misaligned Linestrings

    Posted 11-18-2020 04:34

    I just ran some tests to check what you are saying about 3D lines never joining - I found the following

     

    1) If two lines have different elevations at the common end point they do not join (as I mentioned in the prior post).

    2) If the two lines have the same elevation at the common end point and the common end point is truly shared then the two lines will join OK.

    3) If the two lines are 3D and the ends are mismatched in location but have a common elevation even though they are separated, then the tool tries to trim and extend the two lines to join at a common location and if needed it computes a new elevation for the intersection point to form a continuous line (i.e. if the two lines have different slopes but a starting common elevation and the ends are within the tolerance specified).

     

    So the tool is doing a lot, however I am sure that there are situations that cause it to fail as mentioned in the prior post - If those failure modes can be captured and provided to us the I am sure development can look at it to see what the issue is and why it is failing to further improve the command.

     

    Alan



  • 6.  Re: Project Cleanup- Joining Misaligned Linestrings

    Posted 11-18-2020 04:54

    Thanks Alan, your right. It does work for 3D lines in your examples. It appears that any misalignment, even very small (in one of my linestrings only 0*00'31") is what is causing the trouble. The tool is very smart and useful as is, in many of my cases a simply connecting the lines within tolerance would work fine, but I guess that's really a connect rather than a join. Thanks for all your great insight Alan.



  • 7.  Re: Project Cleanup- Joining Misaligned Linestrings

    Posted 11-19-2020 14:10

    One other thing that will cause them not to join is if they are not on the same layer. Same layer, elevation and within the tolerance given are all required. If the projected cleanup doesn't work, sometimes the Join Command using the option to join all selected lines works.



  • 8.  Re: Project Cleanup- Joining Misaligned Linestrings

    Posted 11-19-2020 14:33

    I see value in this tool more as a standalone tool. Carlson had this as a standalone tool and it is very useful for isolating contours and joining them. And with working with pdf data that is segmented. 



  • 9.  Re: Project Cleanup- Joining Misaligned Linestrings

    Posted 11-21-2020 19:55

    Patrick, I think the tool works well for contours and pdf data, don't you? It's on misaligned 3D data where it lacks.