SolveSpace Logo SOLVESPACE -- parametric 2d/3d CAD
Examples
Tutorials
Features
Download
Reference
Technology
Library
Forum
Contact
USER FORUM

(you are viewing a thread; or go back to list of threads)

How to handle dragging points / entities in solver (by Max)
Hi,

I am attempting to integrate your standalone solver in my program but I am having difficulty working out how to utilise it's dragging functionality.

I assume I should set the point's parameter values to the new dragged position.
I can then set Slvs_System::dragged[] to the above parameters.
I can finally constrain that point with SLVS_C_WHERE_DRAGGED

This seems to work, however the resultant position doesn't lie exactly on the input position.
As a work around, instead of using the constraint / dragged[], I attempted to change the group of the dragged point, so that it is fixed. This now ensures the point I drag will end on the input position.

I also noticed that it seems to make no difference whether I use the SLVS_C_WHERE_DRAGGED constraint or not so i'm not sure what this is actually doing?

So my first question is: How should I use dragging properly?

And my second question is: Is there a way to drag a selection of items such that they stay relative to each other?
Wed Jul 6 2022, 12:35:48
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2022 SolveSpace contributors. Most recent update June 2 2022.