0
$\begingroup$

I parsed CAD file and got following vertices for solid rectangular hollow body called duct. with following vertices

(1512,-8027, 1973) (1512,-7027,1973) (1512,-7027,2973) (1512,-8027,2973) (1675,-8027,1973) (1675,-7027,1973) (1675,-7027,2973) (1675,-8027,2973)

How to get its length/height/width?

  • 0
    It would be nice to refer some library for the purpose, I have multiple shapes of duct with different number of vertices 8, 32, 882017-02-17

1 Answers 1

1

You have matrix $a$ $$\left[\begin{array}{ccc} 1512&-8027&1973\\ 1512&-7027&1973\\ 1512&-7027&2973\\ 1512&-8027&2973\\ 1675&-8027&1973\\ 1675&-7027&1973\\ 1675&-7027&2973\\ 1675&-8027&2973\\ \end{array}\right]$$ As a first step I would suggest subtracting $1512$ from the first coordinate, adding $8027$ to the second coordinate and subtracting $1973$ from the third coordinate. This operation leave your body intact as it amounts to simple shift in the origin. After you do this you get matrix $a'$ $$\left[\begin{array}{ccc} 0&0&0\\ 0&1000&0\\ 0&1000&1000\\ 0&0&1000\\ 163&0&0\\ 163&1000&0\\ 163&1000&1000\\ 163&0&1000\\\end{array}\right]$$ so that your body is $163\times1000\times1000$.