To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 8319
8318  |  8320
Special: 
[DAT] (requires LDraw-compatible viewer)
Subject: 
Re: Precision in .DAT files
Newsgroups: 
lugnet.cad
Date: 
Thu, 11 Jul 2002 22:49:32 GMT
Viewed: 
361 times
  
Marek Idec wrote...
Dear All,
I didn't find in LDraw file format specification anything about a precision
used in  co-ordinates and scaling parameters. In most of files I found
precision maximum 4 digits  after decimal point. I'm pretty sure that I saw
a file with 6 digits precision.
Are there any formal limitations regarding precision? What is reasonable choice?

Another question related to this subject. If one uses only lines, triangles
and quads in created part, then is very easy to judge whether there are gaps
between them or no. What about other primitives used, especialy transformed
(scalled, rotated etc.)? How to stick other vertices to them? What is the
maximum distance between two points to be considered as one point?

That's a good question!
When you interface to primitives I think it is important to stick to the scaled coordinates
from the primitive file.
E.g. if you scale a 4-4cyli.dat by 10 this quad from 4-4cyli.dat
4 16 0.9239 0 0.3827 0.7071 0 0.7071 0.7071 1 0.7071 0.9239 1 0.3827
in effect becomes
4 16 9.239 0 3.827 7.071 0 7.071 7.071 1 7.071 9.239 1 3.827
and you should stick to these values, and not to:
4 16 9.2388 0 3.8268 7.071 0 7.071 7.071 1 7.071 9.2388 1 3.8268
(higher precision 4 decimals)

Several programs (including LDView and L3Lab) analyze vertices.
Although they have to allow for small differences, the vertex matching
will be more safe if you use actual scaled coordinates rather than
new calculated ones.
/Lars



Message has 1 Reply:
  Re: Precision in .DAT files
 
(...) You are absolutely right. Usually scalling to bigger sizes decreases precision. Considering however fractional factors (not only decreasing sizes of primitives, but also more precise like 5.3 instead of 5) or rotations of primitives answer is (...) (22 years ago, 12-Jul-02, to lugnet.cad)

Message is in Reply To:
  Precision in .DAT files
 
Dear All, I didn't find in LDraw file format specification anything about a precision used in co-ordinates and scaling parameters. In most of files I found precision maximum 4 digits after decimal point. I'm pretty sure that I saw a file with 6 (...) (22 years ago, 9-Jul-02, to lugnet.cad)

4 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR