Skip to main content
14-Alexandrite
August 28, 2026
Solved

How to build a best fit plane through a cloud of points

  • August 28, 2026
  • 15 replies
  • 240 views

Hello 

I have a lot of measured points and like to create a best fit plane through these points.
Does Creo provide such an option?

Many thanks in advance for your help.

Regards Pius

Best answer by Pius

I somehow lost my comment from yesterday.

I did almost the same but in Excel.
In the Excel (where I have my coordinate) I asked Copilot to calculate a best fit plane through all the points.
Than I took the best fit plane function/formula and inserted the Y and the Z values for 3 matching points, E.G.:
Y=0, Z=0
Y=1000, Z=-250
Y=0, Z=-500
This gave me the X coordinates of tree points on the best fit plane.
These coordinates I entered into the Datum Point Editor in Creo and used them for the “best fit plane”.
I guess it’s what you suggest just with Excel.

Sorry, I thought yesterday this note was already in the chat but seems to be lost somewhere.
But Thank you anyway

15 replies

StephenW
23-Emerald III
August 28, 2026

I don’t think with Creo Parametric there is an option like that.

I think the the manufacturing add in for CMM in Creo has something like that to create construction planes for measuring.

Pius14-AlexandriteAuthor
14-Alexandrite
August 28, 2026

We have these licences, do you think it is included in one of them?
 

 

13-Aquamarine
September 1, 2026

My guess is that you would need the REX extension for reverse engineering.

StephenW
23-Emerald III
August 28, 2026

I do not know.  I would suggest contacting your VAR or PTC to understand what license would be needed and if you have it.

A google search showed the following: 

To access and use the Coordinate Measuring Machine (CMM) manufacturing module in Creo Parametric, you need the optional Pro/CMM extension license (historically and internally referred to as Pro/CMM or CMM Manufacturing). [1, 2, 3, 4]

License Details

  • Module Name: Pro/CMM (CMM Inspection Programming)
  • Function: Allows you to generate associative inspection and probing programs for CMM hardware directly from your 3D models.
  • Requirement Type: It is an add-on option/extension that must be explicitly added to your existing locked or floating license configuration (such as Creo Design Essentials or Advanced). [1, 2]

How to Check if You Have the License

  • Open Creo Parametric.
  • Go to File > Help > System Information.
  • Look at the information window under Configured Option Modules to see if CMM or Pro/CMM is listed.
  • If it is missing, you will need to contact your software administrator or PTC representative to add the extension to your license file. [1, 2, 3]

Pius14-AlexandriteAuthor
14-Alexandrite
August 28, 2026

Thanks for help.

Unfortunately, they are not listed.
☹️

RPN
18-Opal
August 29, 2026

Assume you want to create a single plane through N points of measurement you can use Least Squares because a plane is parameterized by a single equation. The result is the best fit.

 

import numpy as np

# Your 10 points as a (10, 3) array
points = np.array([
[x1, y1, z1],
[x2, y2, z2],
# ... 10 rows total
])

# 1. Compute centroid and center the points
centroid = points.mean(axis=0)
centered = points - centroid

# 2. SVD of the centered points
U, S, Vt = np.linalg.svd(centered)

# 3. Normal vector = last row of Vt (smallest singular value)
normal = Vt[-1]
a, b, c = normal
d = -normal.dot(centroid)

print(f"Plane: {a:.4f}x + {b:.4f}y + {c:.4f}z + {d:.4f} = 0")
print(f"Normal vector: {normal}")
print(f"Point on the plane (centroid): {centroid}")

# Optional: mean squared distance as a goodness-of-fit measure
distances = centered.dot(normal)
rmse = np.sqrt(np.mean(distances**2))
print(f"RMSE (orthogonal distance): {rmse:.6f}")

Code by Claude, not tested with the SVD-Instance

Pius14-AlexandriteAuthor
14-Alexandrite
August 31, 2026

Hello RPN
This sounds some how be doable.
I understand that the points don’t need to be physically in the 3D model, but they are part of the equation? Which would be okay.
But where can I enter such a equation? 
I have now idea?

Pius14-AlexandriteAuthor
14-Alexandrite
August 31, 2026

I did enter the computing program into the d=Relations Editor just copy paste the main part, but inserting a few coordinates of my measured points.
When I try to compute the program the first line “import numpy as np” already was highlighted like: errorExtra symbols found - ignored. !
than every line containing the coordinates where highlighted like: errorInvalid number in relation. 

My impression is, that the string “import numpy as np” is unknown to creo.

Does anyone have further ideas?

RPN
18-Opal
September 1, 2026

No, you can’t do that in this way. Do most not in Creo. Read your point from an Input file, calculate the plane, get 3 Points on this plane, create a datum in Creo with this 3 points.

The code above is in python. I don’t work with python, but ask ChatGPT for a solution in a programming language you like.

Pius14-AlexandriteAuthorAnswer
14-Alexandrite
September 1, 2026

I somehow lost my comment from yesterday.

I did almost the same but in Excel.
In the Excel (where I have my coordinate) I asked Copilot to calculate a best fit plane through all the points.
Than I took the best fit plane function/formula and inserted the Y and the Z values for 3 matching points, E.G.:
Y=0, Z=0
Y=1000, Z=-250
Y=0, Z=-500
This gave me the X coordinates of tree points on the best fit plane.
These coordinates I entered into the Datum Point Editor in Creo and used them for the “best fit plane”.
I guess it’s what you suggest just with Excel.

Sorry, I thought yesterday this note was already in the chat but seems to be lost somewhere.
But Thank you anyway

RPN
18-Opal
September 2, 2026

Can someone of the admins explain why this thread has not all messages here!

Some answers are definitely no longer listed, why? Is it buggy here?

StephenW
23-Emerald III
September 2, 2026

@RPN  The new community provider auto-collapses (if that is a real thing) multiple replies to a post. You have to watch for the “x replies”  under a post to see if  has collapsed them.

 

RPN
18-Opal
September 2, 2026

Thank you 🎊🎈🪅, so minimum 2 people stumbled over the new feature 😅

And what is the reason that sometimes you can give an answer on every item, and sometimes not one at all😅