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.
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.
(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.
(no subject) (by Ale)
Is what I was looking for. I just did not think the constraint could also handle this case.
Thank You
Thank You
Thanks ... (by Roland Frank)
Just learned a new trick, thanks ...
Otherwise I would have done it with Lines in Construction Mode.
Otherwise I would have done it with Lines in Construction Mode.
Post a reply to this comment: