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)

Delta X and Delta Y Constraint (by Ale)
Hi Jonathan,
I would add two constraints:
Delta X
Delta Y
Is the distance between two points in the X and Y Axis.

I tried the follwing code, in the ConstraintBase::GenerateReal method i added

case PT_PT_DISTANCE_X:
{
EntityBase *a = SK.GetEntity(entityA);
EntityBase *b = SK.GetEntity(entityB);
if (workplane.v == EntityBase::FREE_IN_3D.v) {
}
else {
Expr *au, *av;
Expr *bu, *bv;
a->PointGetExprsInWorkplane(workplane, &au, &av);
b->PointGetExprsInWorkplane(workplane, &bu, &bv);
AddEq(l, au->Minus(bu)->Minus(exA), 0);
}
}break;

but it is not working properly, how can I do?

In the attached image is an example of the constraints I'm trying to get.
Sat Mar 14 2015, 17:16:57, download attachment deltax_deltay_constraint.png
(no subject) (by Jonathan Westhues)
Why not just use the projected-distance constraint, as attached? Select two points and a vector, then choose Constrain -> Distance.
Sat Mar 14 2015, 17:24:36, download attachment projd.slvs
(no subject) (by Ale)
Is what I was looking for. I just did not think the constraint could also handle this case.

Thank You
Sat Mar 14 2015, 18:57:55
Thanks ... (by Roland Frank)
Just learned a new trick, thanks ...
Otherwise I would have done it with Lines in Construction Mode.
Sun Mar 15 2015, 08:06:04, download attachment Construction-Mode.jpg
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-2018 SolveSpace contributors. Most recent update Nov 22 2018.