Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragging in assembly doesn't work #699

Closed
Christoph-D opened this issue Sep 17, 2020 · 5 comments · Fixed by #700
Closed

Dragging in assembly doesn't work #699

Christoph-D opened this issue Sep 17, 2020 · 5 comments · Fixed by #700

Comments

@Christoph-D
Copy link
Contributor

System information

SolveSpace version: Built from source at 094eff7.
Operating system: Ubuntu 18.04

Expected behavior

I followed the tutorial on http://solvespace.com/box.pl. I expected the following behavior after importing base.slvs:

We can grab any point with the mouse, and left-drag; the entire part will move along with us, within the plane of the screen.
We also can grab a point with the mouse, and Shift+left-drag. This rotates the part into and out of the plane of the screen, about that point.

Actual behavior

I can click on only some points of the part, and no matter which point I drag, and no matter if I press shift or ctrl, the part rotates about its origin.

I found no way to drag the part or to rotate about anything else than the part's origin.

Additional information

I used the file base.slvs from the zip file provided on http://solvespace.com/box.pl.

@Christoph-D
Copy link
Contributor Author

git bisect claims that f952991 is the culprit. THe commit message also indicates that this commit changed drag behavior:

Fix issue161 and 174. Use the same logic for selction and dragging, but ignore entites that are inherently undraggable.

@Christoph-D
Copy link
Contributor Author

@phkahler as the author of f952991.

@Christoph-D
Copy link
Contributor Author

Christoph-D commented Sep 17, 2020

f952991 introduced a new function CanBeDragged. This function returns false for Entity::Type::POINT_N_ROT_TRANS. This entity type appears to be used only in Group::Type::LINKED groups, because linking is the only place that calls CopyEntity(..., CopyAs::N_ROT_TRANS), and CopyEntity is the only function that can set Entity::Type::POINT_N_ROT_TRANS.

Maybe Entity::Type::POINT_N_ROT_TRANS should always be considered draggable in CanBeDragged? This fixes the issue for me but I'm not sure if this would be a correct fix.

@phkahler
Copy link
Member

@Christoph-D thanks for tagging me. Incomming pull request 700 should fix it without breaking things.

Oh, your comment just updated. Yes, that is the fix.

@Christoph-D
Copy link
Contributor Author

Thanks!

@phkahler phkahler linked a pull request Sep 17, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants