Quantcast
Channel: Product Communities
Viewing all articles
Browse latest Browse all 105279

Forum Post: Re: Get Element Range Points ( 8 Points ) Microstation V8 Using MDL Language.

$
0
0

Hi,

You can try this method also.

Extract Polygon Range - Min and MAX points

Get the vertical height of the polygon  (VerHt = Max.Y - Min.y)

Get the horizontal width of the polygon (HorWid = Max.X - Min.X)

assume that the Interval Distance between the horizontal lines is 0.5.

So, the NoOfLines need to be created is (NoOfLines = VerHt / IntervalDist)

In a for loop create horizontal (NoOfLines) lines from the MIN point

for (i=0 to NoOfLines)

  p1 = MIN

  p1.y = MIN.y + (i * IntervalDist)

  p2 = MIN

  p2.x = MIN.x + HorWid

Next i

Then for each created line,

a. find out the intersection point on the polygon.

b. Using 'PartialDelete' method, split the line. You will get 2 lines.

c. Check whether the mid point of each line is inside the polygon, by using 'Point3DInPolygonXY' method.

d. If the point is outside, delete that part.

HTH

Sivag


Viewing all articles
Browse latest Browse all 105279

Trending Articles



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