eryar / occQt

A simple OpenCASCADE Qt demo.
MIT License
280 stars 129 forks source link

Model Dragger #5

Open eryar opened 8 years ago

eryar commented 8 years ago

Model Dragger is an efficient way to modify the shape's position and orientation in a 3D scene. Here is a Model Editor in a other software: Model Editor Figure 1.1 Model Editor on a Equipment Locator Handle of Model Editor Figure 1.2 Locator Handle of Model Editor

Shape Movement

You can move the shape by drag the handler in one constrain axis when mouse move on to it, as the following pictures show: Linear Movement Handles Figure 1.3 Linear Movement in the constrain direction

You can also move the shape constrained in the plane by the Planar Movement Handles: Planar Movement Figure 1.4 Planar Movement

Shape Rotation

You can rotate the shape by the Rotation Handles, Rotation Handles Figure 1.5 Rotation Handles

OpenSceneGraph Dragger for Reference

In OpenSceneGraph this are some Draggers to edit the model's position, such as: 1.TabPlaneDragger in OpenSceneGraph TabPlaneDragger in OpenSceneGraph

2.TabPlaneTrackballDragger in OpenSceneGraph TabPlaneTrackballDragger in OpenSceneGraph

3.TrackballDragger in OpenSceneGraph TrackballDragger in OpenSceneGraph

4.Translate1DDragger in OpenSceneGraph Translate1DDragger in OpenSceneGraph

5.Translate2DDragger in OpenSceneGraph Translate2DDragger in OpenSceneGraph

6.TranslateAxisDragger in OpenSceneGraph TranslateAxisDragger in OpenSceneGraph

Conclusion

Model Dragger is a tool to modify the shape's position and orientation in 3D software. I will implement such tool in occQt, If you are interested, you can join in!

eryar commented 7 years ago

OpenCASCADE7.1.0 introduce AIS_Mainpulator to do this. I will update occQt by using occt7.1.0 soon.

loopless commented 6 years ago

Hi I have been trying to use your great example with OCCT 7.2.0. I was able to get it to build by adding an extra bool parameters to some of the OCC calls. But although it runs it crashes when I try to create an object like a cone.

eryar commented 6 years ago

@loopless You can send more details of the crashes to me, maybe I can find the problem.

loopless commented 6 years ago

Found the problem... a simple typo mistake on my part when "porting" to 7.2.0.

eryar commented 6 years ago

ok. 在2017年11月15 01时10分, "loopless"notifications@github.com写道:

Found the problem... a simple typo mistake on my part when "porting" to 7.2.0.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.