In Part:Geometry:

- Fixing Hyperbola classes to get CCW emulation (like Ellipse classes).

In Sketcher:
- The Sketcher representation deals with the right branch of the Hyperbola only.
- Solver model is: Center, Focus1 (focus of the right branch), minor radius (b).
- HyperbolicArcRangeToEndPoints code is the one of Ellipse <= Awaiting DeepSOIC help ;)
- ConstraintPointOnHyperbola solver constraint is now implemented and should be working.
- No InternalAligment constraints implemented yet.
This commit is contained in:
Abdullah Tahiri
2016-01-12 15:52:14 +01:00
committed by wmayer
parent 590e3fbec6
commit 27a76afa94
11 changed files with 478 additions and 65 deletions

View File

@@ -577,6 +577,13 @@ int System::addConstraintPointOnEllipse(Point &p, Ellipse &e, int tagId)
return addConstraint(constr);
}
int System::addConstraintPointOnHyperbolicArc(Point &p, ArcOfHyperbola &e, int tagId)
{
Constraint *constr = new ConstraintPointOnHyperbola(p, e);
constr->setTag(tagId);
return addConstraint(constr);
}
int System::addConstraintEllipticalArcRangeToEndPoints(Point &p, ArcOfEllipse &a, double *angle, int tagId)
{
Constraint *constr = new ConstraintEllipticalArcRangeToEndPoints(p,a,angle);
@@ -594,6 +601,23 @@ int System::addConstraintArcOfEllipseRules(ArcOfEllipse &a, int tagId)
return addConstraintPointOnEllipse(a.end, a, tagId);
}
int System::addConstraintHyperbolicArcRangeToEndPoints(Point &p, ArcOfHyperbola &a, double *angle, int tagId)
{
Constraint *constr = new ConstraintHyperbolicArcRangeToEndPoints(p,a,angle);
constr->setTag(tagId);
return addConstraint(constr);
}
int System::addConstraintArcOfHyperbolaRules(ArcOfHyperbola &a, int tagId)
{
addConstraintHyperbolicArcRangeToEndPoints(a.start,a,a.startAngle, tagId);
addConstraintHyperbolicArcRangeToEndPoints(a.end,a,a.endAngle, tagId);
addConstraintPointOnHyperbolicArc(a.start, a, tagId);
return addConstraintPointOnHyperbolicArc(a.end, a, tagId);
}
int System::addConstraintPointOnArc(Point &p, Arc &a, int tagId)
{
return addConstraintP2PDistance(p, a.center, a.rad, tagId);