Skip to main content
1-Visitor
July 22, 2019
Solved

how to find surface type by a point?

  • July 22, 2019
  • 1 reply
  • 1449 views

Hi,

I got one problem. I use ProSolidOutlineGet() to get the bounding box's size.

By maximum and minimum values of X, Y, and Z, I use them to get a plane and get points as starting points in ProSolidRayIntersectionCompute().

Now, I got an interference point on the surface, but I can't find any way or function to get the surface type.

Can I use a point to get the surface type? Does anyone have some advice? 

Best answer by GabrielZaha

The process to find the surface type at a given point involves several steps:

1. Use ProGeometryAtPointFind. This will give you an array of ProSellection objects.

2. for each member of the sellection array get the corresponding modelitem with ProSelectionModelitemGet. Use the type member of the modelitem to find if it's a surface or other type of entity.

3. If is a surface use ProGeomitemToSurface to get the surface handle and then ProSurfaceTypeGet to get the surface type.

1 reply

14-Alexandrite
July 23, 2019

The process to find the surface type at a given point involves several steps:

1. Use ProGeometryAtPointFind. This will give you an array of ProSellection objects.

2. for each member of the sellection array get the corresponding modelitem with ProSelectionModelitemGet. Use the type member of the modelitem to find if it's a surface or other type of entity.

3. If is a surface use ProGeomitemToSurface to get the surface handle and then ProSurfaceTypeGet to get the surface type.

1-Visitor
July 24, 2019

OK, Thank you for your reply. I will try it.