create box from imported lines

Feel free to ask any question here
Post Reply
RonaldoSurveyor
Posts: 2
Joined: Tue Nov 03, 2015 7:53 pm

create box from imported lines

Post by RonaldoSurveyor »

I am using cc to check the flatness and plumbness (is that a word?) of the walls in a building scan. In cad I have created a best fit rectangle that I import into cc but am struggling with the best method of creating the box primitive to use as the reference. I have tried creating a box the same size and then transforming it to the polyline using match points, but am getting significant residuals. It seems that selecting a "point" on the box does not "snap" (cad language) to the corners. CC only imports plines from cad, so building the 3d model in cad is not a solution. Any suggestions would be appreciated as I am a newbie to cc.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: create box from imported lines

Post by daniel »

Indeed, importing a best fit rectangle from CAD might be difficult if not impossible. But you can compute it directly with CC (with 'Tools > Fit > Plane'). You can select a subset of points to apply the best fit to with the scissors tool.
Daniel, CloudCompare admin
RonaldoSurveyor
Posts: 2
Joined: Tue Nov 03, 2015 7:53 pm

Re: create box from imported lines

Post by RonaldoSurveyor »

Importing the rectangle is actually quite easy - open dxf. The part I cant figure out is extruding the rectangle into a primitive box
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: create box from imported lines

Post by daniel »

Oh sorry I thought you wanted to use the plane primitive directly (as you can compute the distances directly with the plane primitive).

If you use an external polyline, then you should try to align (point-pair based) the polylines vertices with the box vertices (you can hide the real entity and display their child 'vertices' entity instead). And increase the displayed points size!

If you use the 'Plane > Fit' method, and if you know the dimensions of the box, you can create the box primitive in a default position (i.e. XYZ aligned). then copy the orientation matrix of the plane primitive (it should be displayed in the plane properties section - at least in the 2.6.2 version). Eventually apply the transformation to the box (with Edit > Apply Transformation). You may have to translate the box first (with the same method) so that the right side of the box coincides with the fitted plane.
Daniel, CloudCompare admin
Post Reply