Once more I need advice from the great community ...
I have uploaded a .dgn file which shows the situation I have to solve.
The dgn shows several line where some of the have got a gap to the next line element - below you can also find a screenshot that shows the gaps (marked with a red shape.
I need to create a program (VBA) that connects the both lines. The connection should look like this
Does anyone have a clue how to do that?
Each advice is very welcome!!
Have you looked at the data clean up utility in MicroStation? It can do under and overrun detection. In the API I would look to the intersect methods and then adjust the vertices of the line element.
HTH,
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx
I have checked the clean up utility - but this feature only finds the gaps - it does not automatically connect the lines.
I don't have an idea yet how to start with the intersection methods - which method are you thinking about?
Unknown said:I don't have an idea yet how to start with the intersection methods - which method are you thinking about?
Search for intersections in VBA help.
Regards, Jon Summers LA Solutions
If you have accesses to Bentley Map, I believe the 'Topology Cleanup' tools will allow you to flag and repair gaps.
Regards
Carl Myhill
Technical Support Engineer
Bentley Systems
I finally got it done ...
I use GetIntersectionPoints to find all lines that have already got a connection to another line.
Then I compare the IntersectionPoint with the start- and endpoint of both of the lines and replace them with the IntersectionPoint if they are not equal and within an area of 100 units.
Afterwards I check mdlMinDist_betweenElms for all the other lines that do not have a connection.
If the Distance is less that 100 units I extend the lines (using Point3dFromAngleDistance).
At the end I have to extend those lines which have got gaps that are in the middle of the second line.
Works fine - thanks for your ideas!!
PS: I can upload my code if you are interested!