cancel
Showing results for 
Search instead for 
Did you mean: 

Mirroring a point

Builder
Builder

How would you mirror a point from a selected plane?

2 REPLIES

Re: Mirroring a point

Phenom
Phenom

Have you recorded a journal of the operation? The recorded code will give you most of what you need.

 

If you want to modify the recorded code to allow the user to select the plane, try searching the GTAC solution center for "select plane" or "select datum plane".

 

http://solutions.industrysoftware.automation.siemens.com/view.php?si=nx_api2937

Re: Mirroring a point

Siemens Phenom Siemens Phenom
Siemens Phenom

This is pretty easy to do from first principles

 

Dim q As Position    ' Point on plane
Dim n As Vector      ' Unit vector normal to plane

Dim p As Position    ' The point we want to mirror

Dim mirroredPoint As Position = p - 2*((p-q)*n)*n

The * operation is a vector dot product, where appropriate.

山田
yamada