Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: Project points to the surface?

$
0
0

Hi Karthik,

in my opinion some analytic geometry facts should be clarified: You asked "Project points to the surface", but as you wrote, you have non-planar shape in your design file. They are two completely different things, something like to say line and circle are the same. And you should be aware that regardless MicroStation allows to create non planar shapes, it's usually treated as incorrect geometry that cannot be used for geometry computation.

With quite big simplification:

  • A surface is geometry where every point of the surface is defined. There are plenty of types of surface like B-spline etc. and usually local surface coordinates are defined and X,Y on surface can be converted into X,Y,Z in space.
  • Shape is MicroStation term, I guess more often (planar) polygon term is used. If shape is planar, it's possible to calculate any point belonging to shape internal area, because it's in fact simple plane. But if you  have non planar shape, there is no math formula available defining what is inside the shape. MicroStation is able to work with non planar shapes, but it's MicroStation specific and can be changed anytime (in fact the process how non planar shapre are processed is different in V8i and CONNECT Edition).

The summary is that even if you will find some method (I guess not in VBA but maybe in MDL) how to project point to non planar shape, it's not defined anywhere what does it mean and how it works.

I don't know concrete solution (did you try to search this forum?), but I guess it's about to convert the shape into some more correct geometry (SmartSurface, mesh, maybe also B-spline surface, but I am not quite if it's good idea) and in the second step to find a method calculating the intersection between ray and the element. I think for example there is such function available for mesh in MDL API.

Alternative solution can be - but only if the unplanarity is very little and is caused by creation error, not because the shape is e.g. terrain boundary - to calculate an average plane from the shape vertices, so the solution will be converted into intersection between ray and plane, which is easy and can be done in VBA.

With regards,

 Jan


Viewing all articles
Browse latest Browse all 7260

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>