LDraw.org Discussion Forums

Full Version: measurement in 3 Dimension
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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).
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
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