Align to Coordinate System Using Surface Approximation in RevoScan

I would like to suggest a feature in RevoScan software that could significantly simplify working with 3D scans. It involves the ability to align the point cloud to the coordinate system by approximating a surface through a selection of points in the point cloud.

Feature Description:
The idea is that users can select a group of points in their point cloud (see attached screenshot). After selecting these points, there should be an option to choose a plane (X, Y, or Z plane) to which this surface should be aligned.

Process:

  1. Selection of points in the point cloud (screenshot).
  2. Choosing the plane (X, Y, Z) to which the surface should be aligned.
  3. The software uses the method of approximation to draw a surface through the selected points and aligns this surface to the chosen coordinate plane.

Benefits:
Improved editing of the point cloud: Aligning to a plane allows users to more effectively edit and modify the point cloud.
Creation of a better mesh: An aligned point cloud leads to a higher quality and more precise mesh.
Easier model integration: Aligned models can be more easily integrated and edited in other software.
Increased accuracy and efficiency: This feature could enhance the precision of 3D models and make the editing process more efficient.
I believe this feature would provide significant added value to RevoScan and its users. It would improve flexibility and precision in editing 3D scans and significantly enhance the end product.

I look forward to feedback and hope that this idea could be considered in future updates.

Python example for alignment with code, after that u can snap this plane to your coordinate system XY or Z:

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

# generate random 3d points for testing
np.random.seed(0)
n_points = 100
x = np.random.uniform(-5, 5, n_points)
y = np.random.uniform(-5, 5, n_points)
z = 3*x + 2*y + np.random.normal(0, 2, n_points)  # random plain with noise

# calculate plain with smallest quads
A = np.column_stack((x, y, np.ones(n_points)))
C, _, _, _ = np.linalg.lstsq(A, z, rcond=None)

# create plain
xx, yy = np.meshgrid(np.linspace(-5, 5, 10), np.linspace(-5, 5, 10))
zz = C[0]*xx + C[1]*yy + C[2]

# visualisation for watch
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(x, y, z, color='b', label='random points')
ax.plot_surface(xx, yy, zz, color='r', alpha=0.5, rstride=100, cstride=100)

ax.set_xlabel('X-Axis')
ax.set_ylabel('Y-Axis')
ax.set_zlabel('Z-Axis')
ax.legend()

plt.show()

18 Likes

updated: with code

1 Like

Hi @SphaeroX

Thank you very much for your detailed suggestions and code! We will communicate with the R&D team and thank you again for your input.

1 Like

I think this is a fantastic idea.

4 Likes

Here u can See the result with transformation to xy

2 Likes

It seems to me that the scanners with an IMU in them can provide inclination data to Revo Scan so that the initial orientation is set automatically.

1 Like

Yeah but i dont know if they use it for Alignment? Either way, this is a very useful feature for the other scanners too. But also if you want to rotate an object, for example, or put it on one side for later post-processing in CAD.

2 Likes

Yes, they are (at least supposed to be) using the IMU for alignment. My results with the POP 3 were less than what I wanted. I am hoping that the Miraco will be better at this (I already have some test cases to run experiments).

However, it is my observation that most people start scanning objects in their primary orientation (engine blocks aside), so incorporating the scanner’s orientation in the mapping will reduce the amount of work to be done. For those scanners with no IMU, setting a flag in Revo Scan to identify the floor and use that to set orientation would be a suitable workaround for older models.

Your suggestion would be useful for selecting a new orientation, but it seems to me that it would require a fair amount of noise reduction and pre-processing to make sure that the three or more ‘smudges’ used to specify the plane are on a properly-smoothed surface.

Alternatively, expanding the re-orientation function to start with sweeping out a convenient area on a surface and using it as a reference to semi-automatically expand the selection to the boundaries of that surface, then calculating an average for the surface plane would provide a more accurate result.

1 Like

Noise reduction would not be necessary since the algorithm already calculates the average of the selected points through approximation. The user simply needs to select the optimal points, and the algorithm takes care of the rest. This significantly simplifies the process and allows for quick and efficient determination of accurate orientation.

I’m looking forward to the Miraco, it will be the first scanner with an IMU for me, I had the Range and still have the mini.

1 Like

Yes, but a wider selection of points, as I mentioned in my post, would provide more accurate results, in my experience. Using the smudges as the seed to find the boundaries of the selected flat surface by adjusting the tolerances would be faster and less error-prone than manually sweeping out more areas.

The user has a free choice whether he wants accuracy or speed. He can select all points on an area or just a few spots.

This feature would speed up and improve my workflow. Currenly I import into Onshape, and try to find three points that are somewhat representative of the surface, and align accordingly.

Also, hopefully this could also be used to introduce a concept of ”known flat” or ”known straight” edge as well. Using my Inspire, some surfaces appear curved even though they are flat in reality. This happens when scanning from one side of the item only, something like scanning a wall or a floor. No amount of dots/features will fix that at least for my scans. Being able to ”force” an area flat would help in some reverse engineering situations.

1 Like

@Revopoint-Jane is there anything new about it? i think its a really important feature for reverse engineering

1 Like

something like this:

Align a Coordinate System With the Rough and Precise Positioning Tool in Artec Studio (youtube.com)

or this one:
GOM Inspect Video tutorial 02 - Alignment to the global coordinate system (youtube.com)

heres a example application, with this u can transform your meshes to the world coordinate system:

SphaeroX/align_mesh_to_coord (github.com)

2 Likes

i have updated the code, u have to sleect 2 axes to align now:

2 Likes

+1, works great!

ps: maybe a brush tool with adjustable size? :smiley:

@Revopoint-Jane @Revopoint @PUTV

I would like to point out again that the alignment of the scanned object after the scan is essential. Not everyone can afford expensive software to align the scan to do reverse engineering.

So again, please introduce an option so that you can align your mesh correctly in the coordinate system.

5 Likes