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

RE: Measure of distances in VBA

$
0
0

[quote user="Xavi García Maranges"]When I have two elements connected between them vertex to vertex or vertex to any point of the another line , the distance must be = 0 [/quote]

MicroStation 7 (MicroStation/J and earlier) used the IGDS 32-bit integer coordinate system.  With integer coordinates it was possible for a distance to be exactly zero.

MicroStation 8 uses floating-point coordinates.  Any floating-point computation is prone to arithmetic errors due to approximations in the computer representation of real numbers.  Most computers comply with IEEE standard 754.  For further information refer to any text book that covers computational theory.

[quote user="Xavi García Maranges"]Usually I obtain values like Exp -12[/quote]

A common term for a minimum acceptable error is epsilon (Greek ε).  That is, if the absolute value of a computation is less than ε then the result is considered to be zero.  The value of ε is application-dependent, but for practical purposes in CAD 10-12 is small enough.  Probably 10-8 is small enough for most uses.

[quote user="Xavi García Maranges"]in any some cases like I say of -4[/quote]

Unfortunately a B-spline can only approximate a straight line.  You're probably seeing that large error because of limitations in the B-spline maths.  If precision is important to you, then you're going to have to invest in learning geometric algebra in order to write your own algorithms to achieve what you want.


Viewing all articles
Browse latest Browse all 7260

Trending Articles



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