Why is different a point3d of element and a point in range3d of element?

I am writing a VBA program to get X size of an element. I tried 2 way.

  1. Using Startpoint and Endpoint of a line element.
  2. Using Range3d of an element.

I tried above 2 ways, I would like to use Range3d, but I can't get correct X size. Please tell me the reason why.

Parents
  • I would like to use Range3d, but I can't get correct X size

    An element's range is not the same as element geometry...

    Text Element Range

    The above example shows the range of a text element when (a) unrotated and (b) rotated. The dimensions of the element don't change, but its bounding box (the range) depends on other factors.

    What use has the range of an element? It makes it easy to perform a spatial sort of elements.  For example, when MicroStation redraws a view it must ignore (for performance purposes) those elements that fall outside the range of the view: a calculation based on element range is much faster than analysis of the precise coordinates of each element.

     
    Regards, Jon Summers
    LA Solutions

  • Thank you, Jan and Jon. I'm sorry, I wrote the code in a hurry for replying, so made a mistake. I hope to be accepted that I write here that I want to do using VBA.

    I have a LineElement that have only start and end points. I wanted to get correct X size using Range3d from the element, because I thought that the points of Range3d from the element are same to the node points of the element. But those node points have values with 4th place after decimal point, but points of Range3d from the element didn't have only 3th place after decimal point.

    So What I wanted to know is the reason why is different values Range3d and Point3d. I know some cases that values are different TextElement or EllipseElement, but I didn't understand why is different those... But now, I could understand it by Jan's replying (Thank you very much!). Plus, I will take care a format when I post.

  • but points of Range3d from the element didn't have only 3th place after decimal point.

    Yes, because the range is stored in element header as integer value (Int64), expressed in UORs (units of resolution), so it's always rounded value. The range is used internally everywhere where very fast (because integer arithmetic, not floating point one) searching, analysis etc. is required, but precision is not so important. It's about searching based on location, to decide whether element should be displayed in a view...

    I have a LineElement that have only start and end points.

    In such case you are lucky guy :-) ... for line, line string and few other element types (shape) their exact size can be calculated easily, whereas circle / ellipse is a bit more complicated and B-spline is another challenge ;-)

    Regards,

      Jan

    Answer Verified By: hirotaka nisimura 

Reply Children
No Data