Obtaining XYZ Coordinates from Mouse Clicks on Curves in Coreform Cubit"

Hello, I would like to obtain the XYZ coordinate values of a position on a curve by clicking with the mouse, or the coordinates of the clicked position. I need these values to be output to the command line. I couldn’t find this functionality in the API. Could you please help me with this? Thank you!

When you just need to know the coordinates of a point on a curve.
You could use the creating vertex by picking widget

Why do you need the coordinates in the command line? What are you gonna do with the queried coordinates?

I want to obtain XYZ coordinates through mouse clicks and develop a plugin that, upon activation, directly generates a vertex at the clicked location. This process should not require using the “By Picking” operation to create the vertex.

You can do this using the SDK. You will just have to create a widget for the gui that is using the pickwidget. With the get_first_location() method from the pickwidget you can query the coordinates.

Here is a code snippet.

float* xyz = PickWidget->get_first_location();
std::string log = "X " + std::to_string(xyz[0]) + " Y " + std::to_string(xyz[1]) + " Z " + std::to_string(xyz[2]) + " \n";
PRINT_INFO("%s", log.c_str());

Have you already tried to compile the sdk examples?

How to download and install sdk? is there any tutorial on how to use it?

The sdk is already shipped with cubit. It consists of the examples and include directory in the cubit installation. In the docs directory you will find the sdk documentation.

There is no tutorial. You will have to know how to use cmake and make and a bit of c++. As you are targeting to build a widget you will probably also need the Qt 5.15 libraries.