Create a dynamo for civil 3d

Hi
I need to create a dynamo whre i have Two different lines(layer 1 and layer 2) intersecting each other at many points.
So whenever Polyline 1 intersects Polyline 2,then polyline 1 should get trimmed between those points and it should make a new line between the point of intersection and that line will follow exactly polyline 2 and then this new line get joined to Polyline 1
There will be many locations where the polylines intersect
2
Skärmbild 2022-12-23 150533

I liked the challenge. How about this:

The offset is to get the right elements from polyline 2. I get the polycurve joined the way you suggest. However, this has not been tested at full extend.


split lines.dyn (41.5 KB)

1 Like

What have you tried so far?

See point number 7 here: How to get help on the Dynamo forums

Hej Its solved i geuss,some errorsin practical drawings.But i will try to fix it.You are best

Unable to create Line. Points are likely coincident

[Moderated]: query about why we post the guidelines.

The intent with their reply is to encourage self evident exploration before asking for help.

Try to understand that the people at these forums are helping and asking queries in their own spare time, and as per our guidelines it is best to present a problem with as much information and evidence of where you have reached first.

This is a common issue on the forums, so we reinforce the guidelines when this happens to help new users avoid asking for help too quickly in their learning journey foremost, and then making the problem more quick to assist with secondly.

No moral police, just people volunteering their time and assistance. Please try to be reasonable. Jacob is one of, if not the most dedicated users on the forum.

4 Likes

Okey I understand now.But the way Small asked was rude.
i mean who asks directly.What have you done. Comeon if you are regular user then have patience to see how post will develop and have some gracefullnes

The coïncident points usually happen when the distance between points is too small. For example when your intersecting point is aproximately ón a vertex. You could advance your script with ‘error handling’ e.g. imperative code blocks with case/if-then statements.

Search this forum for Imperative block for examples.

And then something else: Jacob is an experienced contributor (not only in this forum). Respect the rules as well as the users, he is simply trying to help users getting better experience through this forum…

4 Likes