Subscribe to this thread
Home - General / All posts - points breaking lines
122 post(s)
#12-Feb-20 05:25

Good day!

Is there a way in manifold where points snapped in lines would split the lines into two?

I have attached the sample map file:

<!--[if !supportLists]-->·<!--[endif]-->the points and lines above are before scenario

<!--[if !supportLists]-->·<!--[endif]-->the points and lines below should be the scenario


Sample Points break


9,409 post(s)
#12-Feb-20 05:43

In Manifold 8? (It's a Manifold 8 file.)

That is easy: use the SQL function IntersectLine(geom1, geom2), where geom2 can be a point.

[Added.] Like this.



SELECT L.ID, [Branch]



    ON Touches(L.ID, P.ID)

SPLIT BY Branches(IntersectLine(L.ID, P.ID)) AS [Branch]


Link a new drawing from that result.

In Manifold 9 there is nothing built-in yet. It would require some more verbose SQL.

That would be fun to write--just say if you need it.

122 post(s)
#12-Feb-20 06:19

Hi is there something im missing ?

The points didn't break the line into two.



6,206 post(s)
#12-Feb-20 06:46

It splits them into branches. To break a branched object into separate objects, use Decompose in the Transform toolbar.


9,409 post(s)
#12-Feb-20 07:14

The query does break the lines in two, provided that the points actually touch the lines (within the location precision of the lines drawing),

When you link a new drawing from the query result (just say if you heed help with that, it is essential), the lines are split into separate objects, wherever they are touched by points.

There is no need for Decompose (in this case).

One more thing though: you need to be using a reasonably recent version of Manifold 8. Sometime in the last 10 years? I will check.

122 post(s)
#12-Feb-20 07:45

Thanks sir !


9,409 post(s)
#12-Feb-20 07:30

To be clear, the query can't split the existing lines.

It really can't. You can't change one object into more than one object, while keeping the same object. You can only provide multiple new objects. That needs a new drawing. (A different approach is possible, but much longer.)

The query makes new lines, split. You need to link that as a new drawing as I said.

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.