Vishesh Chanana Sat, 04/21/2018 - 02:03 Forums: Data Exchange and Application FrameworkWhat is the process to read a point cloud in opencascade. I found out I could use the AIS_pointcloud class to process point clouds but I dont see any method that could help me read a file in it. Daniel Neander Sat, 04/21/2018 - 05:41 You have to create a Graphic3d_ArrayOfPoints from the file yourself. The create a point cloud from that array. Log in to post comments Vishesh Chanana Sun, 04/22/2018 - 02:10 I actually have a .pcd file. Do I need to use the Graphic3d_ArrayOfPoints. Isn't there a direct way of converting the pcd file into an AIS_pointcloud type? Log in to post comments Daniel Neander Sun, 04/22/2018 - 07:06 I would say to use Graphic3d_ArrayOfPoints. Looking at the pcd file docs, the points under "DATA" is the point cloud, so you should be able to create a Graphic3d_ArrayOfPoints from that. There is a great example in ViewerTest_ObjectCommands.cxx that demonstrates Graphic3d_ArrayOfPoints use with AIS_PointCloud. Hope that helps. Log in to post comments Vishesh Chanana Mon, 04/30/2018 - 02:24 So, After converting it into an AIS_PointCloud, is it possible to convert this into a TopoDS_Shape? Log in to post comments Daniel Neander Mon, 04/30/2018 - 05:40 Absolutely Handle(AIS_Shape) AISshape = Handle(AIS_Shape)::DownCast(AISpointcloud); Then AIS_Shape has a method to get the TopoDS_Shape I recommend you reading the documentation as it explains all of this Log in to post comments Guido van Hilst... Mon, 04/30/2018 - 12:43 Maybe I am wrong, but I dont think you can just create a TopoDS_Shape from loose points with AIS_PointCloud? I think AIS_PointCloud is for visualization of bunch of points. (It is not derived from AIS_Shape?) If you want to create TopoDS_Shapes from a bunch of unrelated points you need a surface-construction-algorithm? Log in to post comments
Sat, 04/21/2018 - 05:41
You have to create a Graphic3d_ArrayOfPoints from the file yourself. The create a point cloud from that array.
Sun, 04/22/2018 - 02:10
I actually have a .pcd file. Do I need to use the Graphic3d_ArrayOfPoints. Isn't there a direct way of converting the pcd file into an AIS_pointcloud type?
Sun, 04/22/2018 - 07:06
I would say to use Graphic3d_ArrayOfPoints.
Looking at the pcd file docs, the points under "DATA" is the point cloud, so you should be able to create a Graphic3d_ArrayOfPoints from that.
There is a great example in ViewerTest_ObjectCommands.cxx that demonstrates Graphic3d_ArrayOfPoints use with AIS_PointCloud.
Hope that helps.
Mon, 04/30/2018 - 02:24
So, After converting it into an AIS_PointCloud, is it possible to convert this into a TopoDS_Shape?
Mon, 04/30/2018 - 05:40
Absolutely
Handle(AIS_Shape) AISshape = Handle(AIS_Shape)::DownCast(AISpointcloud);
Then AIS_Shape has a method to get the TopoDS_Shape
I recommend you reading the documentation as it explains all of this
Mon, 04/30/2018 - 12:43
Maybe I am wrong, but I dont think you can just create a TopoDS_Shape from loose points with AIS_PointCloud?
I think AIS_PointCloud is for visualization of bunch of points. (It is not derived from AIS_Shape?)
If you want to create TopoDS_Shapes from a bunch of unrelated points you need a surface-construction-algorithm?