Personal tools
You are here: Home Forum Use Shaper: get point coordinates

Shaper: get point coordinates

Up to Use

Shaper: get point coordinates

Posted by Konyaro at June 12. 2020

Hello,

In Shaper, is it possible to get the coordinates of a point created by "By distance on edge". I tried:

- Point_1.point().x()

- Point_1.point().pnt().x()

But both return a value of 1.797e+308. I’m looking for something similar to geompy.PointCoordinates.

Thank you,

Konyaro

 

Re: Shaper: get point coordinates

Posted by Nabil Ghodbane at June 16. 2020

hi,

question was raised to our developers team. Since Point_1 is not created by defining its coordinates, but  by its distance on edge, the coordinates attributes are not filled.

In order to access the coordinates, they suggest to use instead:

from GeomAPI import GeomAPI_Vertex
p1= GeomAPI_Vertex(Point_1.defaultResult().shape())
p1.x()

 

Thanks again to the developer team for their explanations.

Re: Shaper: get point coordinates

Posted by Konyaro at June 16. 2020

Thanks a lot !

I just had to change your code to: 

from GeomAPI import GeomAPI_Vertex
p1= GeomAPI_Vertex(Point_1.defaultResult().shape())
p1.point().x()

Konyaro

Powered by Ploneboard
Document Actions