You are here: Start » Program Examples » Circle Fitting 3D

Circle Fitting 3D

Aim

The task of the application is to measure distance between 2 holes in a scanned 3D object.

Input

The surface of the scanned object.

Output

Marked holes and their centers of the surface. Calculated distance between holes.

Hints

Having acquired point clouds of the Surface data type, choose the part with the holes using the SurfaceValidPointsRegion filter. Then use FitCircleToEdges3D to locate holes and their centers. Use the PointToPointDistance3D to measure the distance.

Solution (AVS)

  1. In Workspace Explorer open workspace Examples and in Film strip window select CircleFitting3D dataset. Drag the Surface channel to the ACQUIRE section.

  2. Add the SurfaceValidPointsRegion filter to focus on the part with the holes. Open the inRegion editor in the Parameters section and set rectangle containing only the lower located holes, similar to the one on the image below.

  3. Create the local coordinate system based on the marked region:

  4. Add two FitCircleToEdges3D filters. Connect both inSurface inputs to the ReadFilmstrip outSurface output and both inFittingFieldAlignment inputs to the ConvertCoordinateSystem2DTo3D output. For both filters set these parameter:

  5. For the first FitCircleToEdges3D open inFittingField editor from the Properties section and mark the first hole as it is shown on the image below.

  6. For the second FitCircleToEdges3D open inFittingField editor from the Properties section and mark the second hole as it is shown on the image below.

  7. Add the PointToPointDistance3D filter and connect its inPoint inputs with both FitCircleToEdges3D outCircle.Center outputs.Show the found distance on a new preview window.

Macrofilter Main.

Further Readings