Snap to point clouds similar to Trimble Scan Essential

Hi,

Recently I found the trimble scan essential plugin (Extension | SketchUp Extension Warehouse) for SketchUp. It has the ability to snap to imported point clouds, which is quite awesome. A video tutorial is on Scan Essentials - Skill Builder - YouTube .

I know that we can build a custom tool and implement the snap function using InputPoint or PickHelper. However, how can we enable snap in native tool, such as PushPull, Rectangle, for point clouds? What is the entity behind for the Point Clouds?

Thanks,
Han

The APIs do not expose the properties of native tools.

What does it say in the Entity Info inspector ?
(I would think that they’d be Sketchup::ConstructionPoint entities within a group.)

Perhaps post a model with a small point cloud here …

I think the point clouds is not imported as any kind of Entity. It is not selectable and a simple Sketchup.active_model.entities.to_a returns an empty array.

I believe it is just native OpenGL objects that is hooked into the SketchUp rendering system (such as SwapBuffer).
What I am wondering is how to get native tool to snap to this kind of object? I know how to build kd-tree for point cloud picking, but there is no such interface for me to implement the picking in C/C++.

The InputPoint of LineTool says it is from point as below.
image

The scene is a road point clouds.

I think this plugin has hooked into the Sketchup::InputPoint.pick function, all the plugins using the function Sketchup::InputPoint.pick (e.g., the tutorial on github) are aware of the point clouds under the hook.

1 Like

This cannot be done with our current open APIs. Scan Essentials is a Trimble extension and gets some special privileges. While we like to provide useful API for everyone, there are cases when one of our own teams needs access to something that we don’t want to make public because it risks breaking things if used wrongly. I don’t know if that is the case here.

Feel free to add a feature request to our issue tracker. Information about possible use cases help us prioritize what to add.

1 Like