Getting Problem on ProjectPointOnPerpendicular2 to the line Element.

Dear all,

              I am using Microstation v8 2004 Edition and VBA. I need to apply the pattern from base element to Secondary Element the pattern correctly came but in some places the pattern came wrong.Here i attached my dgn  and Explain the error in dgn please refer it.

Thanks & Regards,

Karthik M

5277.Testing.dgn

  • Hi Karthik,

    without a code, that can be tested, I don't see any possibility how to think about your question, because nobody know how you work with elements. Especially if the model is 3D, so every line has to be calculated individually, because in fact you are creating "surface" between the line strings.

    With regards,

    Jan
  • Hi Jan,

               Thanks for your reply. Here i attached my tool and one video clip for explaining how the tool is working please find it.

    Regards,

    Karthik M

    ApplyPattern.mvba

  • Hi Karthik,

    I think there is no problem with ProjectPointOnPerpendicular2 method and based on your video I guess it works exactly as designed. My assumption is that the behaviour is defined by elements distance, so if the same element on the other side is closer, this intersection is returned.

    In other words: How the method should know, wheather there are more possible projections (on both sides of element), what is assumed as right one? The method returns the closest result only.

    The approach you use is too simple, you have to investigate more advanced approach to process situations correctly. I am not sure if one common solution exists, but I suppose for standard situations like this one (without extreme situations like self-intersections or crossing elements) the alogrithm would be not too complex.

    With regards,

    Jan
  • Hi jan,
    Thanks for your response i find the crossing of the elements its find the error thank you.
    Regards,
    Karthik M