Scissor tool center setting

Feel free to ask any question here
Post Reply
xiaolu
Posts: 36
Joined: Fri Apr 02, 2021 9:42 am

Scissor tool center setting

Post by xiaolu »

hello~

When I use the scissors tool, I cut a small piece down and the center of the view is still in the original position.


like this
DeepinScreenshot_select-area_20210907112559.png
DeepinScreenshot_select-area_20210907112559.png (89.89 KiB) Viewed 2161 times

I want the center of the cut piece to be set to the center of the interface, to make it easier for me to rotate it.
like this
DeepinScreenshot_select-area_20210907112717.png
DeepinScreenshot_select-area_20210907112717.png (60.62 KiB) Viewed 2161 times
I know that I can set the center point to this position by double-clicking, but many times the double-click is not accurate and I need to double-click many times.

So I would like to implement it in code so that it will come to the center by itself.

Could you please give me some advice?

thanks~
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scissor tool center setting

Post by daniel »

I guess you would have to call the updateConstellationCenterAndZoom method of the 3D view, with the right bounding-box. And the right bounding-box should be ccGraphicalSegmentationTool::segment method (when CC determines if each point is inside or outside of the segmentation polygon).
Daniel, CloudCompare admin
xiaolu
Posts: 36
Joined: Fri Apr 02, 2021 9:42 am

Re: Scissor tool center setting

Post by xiaolu »

Thanks,
This solves my problem
Post Reply