LDraw.org Discussion Forums
measurement in 3 Dimension - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw File Processing and Conversion (https://forums.ldraw.org/forum-22.html)
+--- Thread: measurement in 3 Dimension (/thread-17573.html)



measurement in 3 Dimension - Jarema - 2015-10-12

Code:
# This 2.54 mean about centimeter. For DPI parameter use screen.physicalDpiX or screen.physicalDpiY.
def convert_pixels_to_cms(pixels, dpi):
            return (pixels / dpi) * 2.54
[quote Small Car Official Set 3177]
Source brickset.com/sets/3177-1/Small-Car
Minimum -45.00 -92.00 -90.00
Maximum 45.00 23.00 70.00
Perimeter 90x115x169
[/quote]
  • First question is how translate length from Z axis to physical metric.
  • Second question is when you have LDU how get width and height in physical metric.
  • I know about LDCalc but we work in this scenario with 3D without scaling and without transformation.



Re: measurement in 3 Dimension - Roland Melkert - 2015-10-12

I'm not entirely sure what you mean, but here's my 2cts

Jarema Wrote:First question is how translate length from Z axis to physical metric.
You will need a bounding box of the 3D data you want to measure.

Jarema Wrote:Second question is when you have LDU how get width and height in physical metric.
Divide it by 2.5 (don't confuse this with mm2inch which divides again by a similar 2.54).


Re: measurement in 3 Dimension - Max Martin Richter - 2015-10-13

In my eyes the only thing you need, is to know, that 0.4 mm is 1 LDU. Followed by some calculations it should be easy to get the dimensions.

/Max


Re: measurement in 3 Dimension - Jarema - 2015-10-13

Code:
Bounding Box:
  Minimum Point  -45.00 -92.00 -90.00
  Maximum Point 45.00  23.00  70.00
Perimeter of Box: 90x115x169
So, if this is correct:
X = 45.00 + 45.00 = 90.00
Y = 92.00 + 23.00 = 115.00
Z = 90.00 + 70.00 = 160.00

90 LDU * 0.4 mm = 36mm = 3,6 cm
115.00 LDU * 0.4 mm = 46 mm = 4,6 cm
160.00 LDU * 0.4 mm= 64 mm = 6,4 cm