Skip to main content
18-Opal
August 17, 2018
Solved

Can I create a coordinate system in the toolkit using points and planes?

  • August 17, 2018
  • 1 reply
  • 1913 views

I tried to create a coordinate system by looking at UgGeneralCsysCreate.c.
Origin Reference uses PRO_VALUE_TYPE_SELECTION as its data.
PRO_VALUE_TYPE_SELECTION selects a coordinate system and refers to the direction and offset of that coordinate system.
PRO_CSYS_ORIENTMOVE_MOVE_OPT_ROT_X and PRO_CSYS_ORIENTMOVE_MOVE_OPT_TRAN_X can be used to set the orientation or offset of the referenced coordinate system.


My question starts here.
Can I create a coordinate system by selecting two datum points and planes without selecting a coordinate system?
For example, The direction from the first datum point to the second datum point is the Z axis.
The opposite of the direction from the point to the plane is the Y axis.

 

The tasks that are done at Creo are as follows and I need to implement them in a toolkit.

image_7.png

1. The first selected datum point becomes the circular reference of the coordinate system.

image_8.png

2. The Z axis direction is set with reference to the second selected datum point.

image_10.png

3. The Y axis is the direction you flipped over to for the last selected plane.

 

Is it possible?
If is possible, how do I modify the options in the code in the user guide?

If not, are there any other good ways?

Best answer by CHASEONHO

Success.
I attach the source code here.
A code that creates a coordinate system with two points and one plane.
You used the search keyword PRO_E_CSYS_ORIENTSELAXIS1_OPT and referenced CS221868.
Have a nice day

 

Warm Regards,

SeonHo

1 reply

CHASEONHO18-OpalAuthor
18-Opal
August 17, 2018

Creation of coordinate system succeeded using PRO_E_CSYS_ORIENTSELAXIS1_REF
However, the axis marking is not what I want.
The first reference is X, and the second reference is Z.
How can I modify the initial reference from X to Z?

CHASEONHO18-OpalAuthorAnswer
18-Opal
August 17, 2018

Success.
I attach the source code here.
A code that creates a coordinate system with two points and one plane.
You used the search keyword PRO_E_CSYS_ORIENTSELAXIS1_OPT and referenced CS221868.
Have a nice day

 

Warm Regards,

SeonHo