Sketcher Ellipse: code cleanup
deleting redundant overloaded functions involving arc-of-ellipse, a few todo comments, not implemented methods, System(constraintlist) constructor.
This commit is contained in:
parent
ab7d980de0
commit
684036fae8
|
@ -1084,13 +1084,11 @@ int Sketch::addTangentConstraint(int geoId1, int geoId2)
|
|||
GCSsys.addConstraintTangent(l, c, tag);
|
||||
return ConstraintsCounter;
|
||||
} else if (Geoms[geoId2].type == Ellipse) {
|
||||
// TODO: real implementation
|
||||
GCS::Ellipse &e = Ellipses[Geoms[geoId2].index];
|
||||
int tag = ++ConstraintsCounter;
|
||||
GCSsys.addConstraintTangent(l, e, tag);
|
||||
return ConstraintsCounter;
|
||||
} else if (Geoms[geoId2].type == ArcOfEllipse) {
|
||||
// TODO: real implementation
|
||||
GCS::ArcOfEllipse &a = ArcsOfEllipse[Geoms[geoId2].index];
|
||||
int tag = ++ConstraintsCounter;
|
||||
GCSsys.addConstraintTangent(l, a, tag);
|
||||
|
@ -1104,11 +1102,8 @@ int Sketch::addTangentConstraint(int geoId1, int geoId2)
|
|||
GCSsys.addConstraintTangent(c, c2, tag);
|
||||
return ConstraintsCounter;
|
||||
} else if (Geoms[geoId2].type == Ellipse) {
|
||||
// TODO: real implementation
|
||||
GCS::Ellipse &e = Ellipses[Geoms[geoId2].index];
|
||||
int tag = ++ConstraintsCounter;
|
||||
GCSsys.addConstraintTangent(e, c, tag);
|
||||
return ConstraintsCounter;
|
||||
Base::Console().Error("Direct tangency constraint between circle and ellipse is not supported. Use tangent-via-point instead.");
|
||||
return -1;
|
||||
}
|
||||
else if (Geoms[geoId2].type == Arc) {
|
||||
GCS::Arc &a = Arcs[Geoms[geoId2].index];
|
||||
|
@ -1120,16 +1115,12 @@ int Sketch::addTangentConstraint(int geoId1, int geoId2)
|
|||
GCS::Ellipse &e = Ellipses[Geoms[geoId1].index];
|
||||
|
||||
if (Geoms[geoId2].type == Circle) {
|
||||
GCS::Circle &c = Circles[Geoms[geoId2].index];
|
||||
int tag = ++ConstraintsCounter;
|
||||
GCSsys.addConstraintTangent(e, c, tag);
|
||||
return ConstraintsCounter;
|
||||
Base::Console().Error("Direct tangency constraint between circle and ellipse is not supported. Use tangent-via-point instead.");
|
||||
return -1;
|
||||
} else if (Geoms[geoId2].type == Arc) {
|
||||
GCS::Arc &a = Arcs[Geoms[geoId2].index];
|
||||
int tag = ++ConstraintsCounter;
|
||||
GCSsys.addConstraintTangent(e, a, tag);
|
||||
return ConstraintsCounter;
|
||||
}
|
||||
Base::Console().Error("Direct tangency constraint between arc and ellipse is not supported. Use tangent-via-point instead.");
|
||||
return -1;
|
||||
}
|
||||
} else if (Geoms[geoId1].type == Arc) {
|
||||
GCS::Arc &a = Arcs[Geoms[geoId1].index];
|
||||
if (Geoms[geoId2].type == Circle) {
|
||||
|
@ -1138,11 +1129,8 @@ int Sketch::addTangentConstraint(int geoId1, int geoId2)
|
|||
GCSsys.addConstraintTangent(c, a, tag);
|
||||
return ConstraintsCounter;
|
||||
} else if (Geoms[geoId2].type == Ellipse) {
|
||||
|
||||
GCS::Ellipse &e = Ellipses[Geoms[geoId2].index];
|
||||
int tag = ++ConstraintsCounter;
|
||||
GCSsys.addConstraintTangent(e, a, tag);
|
||||
return ConstraintsCounter;
|
||||
Base::Console().Error("Direct tangency constraint between arc and ellipse is not supported. Use tangent-via-point instead.");
|
||||
return -1;
|
||||
} else if (Geoms[geoId2].type == Arc) {
|
||||
GCS::Arc &a2 = Arcs[Geoms[geoId2].index];
|
||||
int tag = ++ConstraintsCounter;
|
||||
|
@ -1593,7 +1581,7 @@ int Sketch::addPointOnObjectConstraint(int geoId1, PointPos pos1, int geoId2)
|
|||
else if (Geoms[geoId2].type == ArcOfEllipse) {
|
||||
GCS::ArcOfEllipse &a = ArcsOfEllipse[Geoms[geoId2].index];
|
||||
int tag = ++ConstraintsCounter;
|
||||
GCSsys.addConstraintPointOnArcOfEllipse(p1, a, tag);
|
||||
GCSsys.addConstraintPointOnEllipse(p1, a, tag);
|
||||
return ConstraintsCounter;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -176,9 +176,6 @@ public:
|
|||
int addAngleConstraint(int geoId1, PointPos pos1, int geoId2, PointPos pos2, double value);
|
||||
/// add angle-via-point constraint between any two curves
|
||||
int addAngleViaPointConstraint(int geoId1, int geoId2, int geoId3, PointPos pos3, double value);
|
||||
/// add ellipse XDir axis angle constraint with respect to XAxis or a lines
|
||||
int addEllipseAngleXUConstraint(int geoId, double value);
|
||||
int addEllipseAngleXUConstraint(int geoId1, int geoId2, double value);
|
||||
/// add an equal length or radius constraints between two lines or between circles and arcs
|
||||
int addEqualConstraint(int geoId1, int geoId2);
|
||||
/// add a point on line constraint
|
||||
|
|
|
@ -945,19 +945,6 @@ ConstraintPointOnEllipse::ConstraintPointOnEllipse(Point &p, Ellipse &e)
|
|||
rescale();
|
||||
}
|
||||
|
||||
ConstraintPointOnEllipse::ConstraintPointOnEllipse(Point &p, ArcOfEllipse &a)
|
||||
{
|
||||
pvec.push_back(p.x);
|
||||
pvec.push_back(p.y);
|
||||
pvec.push_back(a.center.x);
|
||||
pvec.push_back(a.center.y);
|
||||
pvec.push_back(a.focus1.x);
|
||||
pvec.push_back(a.focus1.y);
|
||||
pvec.push_back(a.radmin);
|
||||
origpvec = pvec;
|
||||
rescale();
|
||||
}
|
||||
|
||||
ConstraintType ConstraintPointOnEllipse::getTypeId()
|
||||
{
|
||||
return PointOnEllipse;
|
||||
|
|
|
@ -157,6 +157,7 @@ System::System()
|
|||
{
|
||||
}
|
||||
|
||||
/*DeepSOIC: seriously outdated, needs redesign
|
||||
System::System(std::vector<Constraint *> clist_)
|
||||
: plist(0),
|
||||
c2p(), p2c(),
|
||||
|
@ -226,6 +227,7 @@ System::System(std::vector<Constraint *> clist_)
|
|||
addConstraint(newconstr);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
System::~System()
|
||||
{
|
||||
|
@ -499,8 +501,6 @@ int System::addConstraintPointOnCircle(Point &p, Circle &c, int tagId)
|
|||
|
||||
int System::addConstraintPointOnEllipse(Point &p, Ellipse &e, int tagId)
|
||||
{
|
||||
// TODO: Implement real constraint => Done
|
||||
|
||||
Constraint *constr = new ConstraintPointOnEllipse(p, e);
|
||||
constr->setTag(tagId);
|
||||
return addConstraint(constr);
|
||||
|
@ -516,21 +516,11 @@ int System::addConstraintEllipticalArcRangeToEndPoints(Point &p, ArcOfEllipse &a
|
|||
|
||||
int System::addConstraintArcOfEllipseRules(ArcOfEllipse &a, int tagId)
|
||||
{
|
||||
/* addConstraintP2PAngle(a.center, a.start, a.startAngle, tagId);
|
||||
return addConstraintP2PAngle(a.center, a.end, a.endAngle, tagId);*/
|
||||
|
||||
addConstraintEllipticalArcRangeToEndPoints(a.start,a,a.startAngle, tagId);
|
||||
addConstraintEllipticalArcRangeToEndPoints(a.end,a,a.endAngle, tagId);
|
||||
|
||||
addConstraintPointOnArcOfEllipse(a.start, a, tagId);
|
||||
return addConstraintPointOnArcOfEllipse(a.end, a, tagId);
|
||||
}
|
||||
|
||||
int System::addConstraintPointOnArcOfEllipse(Point &p, ArcOfEllipse &a, int tagId)
|
||||
{
|
||||
Constraint *constr = new ConstraintPointOnEllipse(p, a);
|
||||
constr->setTag(tagId);
|
||||
return addConstraint(constr);
|
||||
addConstraintPointOnEllipse(a.start, a, tagId);
|
||||
return addConstraintPointOnEllipse(a.end, a, tagId);
|
||||
}
|
||||
|
||||
int System::addConstraintPointOnArc(Point &p, Arc &a, int tagId)
|
||||
|
@ -606,37 +596,11 @@ int System::addConstraintTangent(Line &l, Circle &c, int tagId)
|
|||
|
||||
int System::addConstraintTangent(Line &l, Ellipse &e, int tagId)
|
||||
{
|
||||
// TODO: real ellipse implementation => Done
|
||||
Constraint *constr = new ConstraintEllipseTangentLine(l, e);
|
||||
constr->setTag(tagId);
|
||||
return addConstraint(constr);
|
||||
}
|
||||
|
||||
int System::addConstraintTangent(Line &l, ArcOfEllipse &a, int tagId)
|
||||
{
|
||||
// TODO: real ellipse implementation => Done
|
||||
Constraint *constr = new ConstraintEllipseTangentLine(l, a);
|
||||
constr->setTag(tagId);
|
||||
return addConstraint(constr);
|
||||
}
|
||||
|
||||
int System::addConstraintTangent(Ellipse &e, Circle &c, int tagId)
|
||||
{
|
||||
// TODO: elipse
|
||||
/*double dx = *(c.center.x) - *(e.center.x);
|
||||
double dy = *(c.center.y) - *(e.center.y);
|
||||
double d = sqrt(dx*dx + dy*dy);*/
|
||||
|
||||
/*Constraint *constr = new ConstraintPoint2EllipseDistance(c.center,e,c.rad);
|
||||
constr->setTag(tagId);
|
||||
return addConstraint(constr); */
|
||||
|
||||
|
||||
//return addConstraintTangentCircumf(e.center, c.center, e.radmaj, c.rad,
|
||||
// (d < *e.radmaj || d < *c.rad), tagId);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int System::addConstraintTangent(Line &l, Arc &a, int tagId)
|
||||
{
|
||||
return addConstraintP2LDistance(a.center, l, a.rad, tagId);
|
||||
|
@ -669,19 +633,6 @@ int System::addConstraintTangent(Circle &c, Arc &a, int tagId)
|
|||
(d < *c.rad || d < *a.rad), tagId);
|
||||
}
|
||||
|
||||
int System::addConstraintTangent(Ellipse &e, Arc &a, int tagId)
|
||||
{
|
||||
// TODO: elipse
|
||||
/*double dx = *(a.center.x) - *(e.center.x);
|
||||
double dy = *(a.center.y) - *(e.center.y);
|
||||
double d = sqrt(dx*dx + dy*dy);Constraint *constr = new ConstraintEllipseTangentLine(l, e);
|
||||
constr->setTag(tagId);
|
||||
return addConstraint(constr);
|
||||
return addConstraintTangentCircumf(e.center, a.center, e.radmaj, a.rad,
|
||||
(d < *e.radmaj || d < *a.rad), tagId);*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
int System::addConstraintCircleRadius(Circle &c, double *radius, int tagId)
|
||||
{
|
||||
return addConstraintEqual(c.rad, radius, tagId);
|
||||
|
@ -714,24 +665,6 @@ int System::addConstraintEqualRadii(Ellipse &e1, Ellipse &e2, int tagId)
|
|||
return addConstraint(constr);
|
||||
}
|
||||
|
||||
int System::addConstraintEqualRadii(ArcOfEllipse &a1, ArcOfEllipse &a2, int tagId)
|
||||
{
|
||||
addConstraintEqual(a1.radmin, a2.radmin, tagId);
|
||||
|
||||
Constraint *constr = new ConstraintEqualMajorAxesEllipse(a1,a2);
|
||||
constr->setTag(tagId);
|
||||
return addConstraint(constr);
|
||||
}
|
||||
|
||||
int System::addConstraintEqualRadii(ArcOfEllipse &a1, Ellipse &e2, int tagId)
|
||||
{
|
||||
addConstraintEqual(a1.radmin, e2.radmin, tagId);
|
||||
|
||||
Constraint *constr = new ConstraintEqualMajorAxesEllipse(a1,e2);
|
||||
constr->setTag(tagId);
|
||||
return addConstraint(constr);
|
||||
}
|
||||
|
||||
int System::addConstraintEqualRadius(Circle &c1, Arc &a2, int tagId)
|
||||
{
|
||||
return addConstraintEqual(c1.rad, a2.rad, tagId);
|
||||
|
@ -862,102 +795,6 @@ int System::addConstraintInternalAlignmentEllipseFocus2(Ellipse &e, Point &p1, i
|
|||
return addConstraintInternalAlignmentPoint2Ellipse(e,p1,EllipseFocus2Y,tagId);
|
||||
}
|
||||
|
||||
int System::addConstraintInternalAlignmentPoint2Ellipse(ArcOfEllipse &a, Point &p1, InternalAlignmentType alignmentType, int tagId)
|
||||
{
|
||||
Constraint *constr = new ConstraintInternalAlignmentPoint2Ellipse(a, p1, alignmentType);
|
||||
constr->setTag(tagId);
|
||||
return addConstraint(constr);
|
||||
}
|
||||
|
||||
int System::addConstraintInternalAlignmentEllipseMajorDiameter(ArcOfEllipse &a, Point &p1, Point &p2, int tagId)
|
||||
{
|
||||
double X_1=*p1.x;
|
||||
double Y_1=*p1.y;
|
||||
double X_2=*p2.x;
|
||||
double Y_2=*p2.y;
|
||||
double X_c=*a.center.x;
|
||||
double Y_c=*a.center.y;
|
||||
double X_F1=*a.focus1.x;
|
||||
double Y_F1=*a.focus1.y;
|
||||
double b=*a.radmin;
|
||||
|
||||
// P1=vector([X_1,Y_1])
|
||||
// P2=vector([X_2,Y_2])
|
||||
// dF1= (F1-C)/sqrt((F1-C)*(F1-C))
|
||||
// print "these are the extreme points of the major axis"
|
||||
// PA = C + a * dF1
|
||||
// PN = C - a * dF1
|
||||
// print "this is a simple function to know which point is closer to the positive edge of the ellipse"
|
||||
// DMC=(P1-PA)*(P1-PA)-(P2-PA)*(P2-PA)
|
||||
double closertopositivemajor=pow(X_1 - X_c - (X_F1 - X_c)*sqrt(pow(b, 2) + pow(X_F1 - X_c,
|
||||
2) + pow(Y_F1 - Y_c, 2))/sqrt(pow(X_F1 - X_c, 2) + pow(Y_F1 - Y_c, 2)),
|
||||
2) - pow(X_2 - X_c - (X_F1 - X_c)*sqrt(pow(b, 2) + pow(X_F1 - X_c, 2) +
|
||||
pow(Y_F1 - Y_c, 2))/sqrt(pow(X_F1 - X_c, 2) + pow(Y_F1 - Y_c, 2)), 2) +
|
||||
pow(Y_1 - Y_c - (Y_F1 - Y_c)*sqrt(pow(b, 2) + pow(X_F1 - X_c, 2) +
|
||||
pow(Y_F1 - Y_c, 2))/sqrt(pow(X_F1 - X_c, 2) + pow(Y_F1 - Y_c, 2)), 2) -
|
||||
pow(Y_2 - Y_c - (Y_F1 - Y_c)*sqrt(pow(b, 2) + pow(X_F1 - X_c, 2) +
|
||||
pow(Y_F1 - Y_c, 2))/sqrt(pow(X_F1 - X_c, 2) + pow(Y_F1 - Y_c, 2)), 2);
|
||||
|
||||
if(closertopositivemajor>0){
|
||||
//p2 is closer to positivemajor. Assign constraints back-to-front.
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p2,EllipsePositiveMajorX,tagId);
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p2,EllipsePositiveMajorY,tagId);
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p1,EllipseNegativeMajorX,tagId);
|
||||
return addConstraintInternalAlignmentPoint2Ellipse(a,p1,EllipseNegativeMajorY,tagId);
|
||||
}
|
||||
else{
|
||||
//p1 is closer to positivemajor
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p1,EllipsePositiveMajorX,tagId);
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p1,EllipsePositiveMajorY,tagId);
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p2,EllipseNegativeMajorX,tagId);
|
||||
return addConstraintInternalAlignmentPoint2Ellipse(a,p2,EllipseNegativeMajorY,tagId);
|
||||
}
|
||||
}
|
||||
|
||||
int System::addConstraintInternalAlignmentEllipseMinorDiameter(ArcOfEllipse &a, Point &p1, Point &p2, int tagId)
|
||||
{
|
||||
double X_1=*p1.x;
|
||||
double Y_1=*p1.y;
|
||||
double X_2=*p2.x;
|
||||
double Y_2=*p2.y;
|
||||
double X_c=*a.center.x;
|
||||
double Y_c=*a.center.y;
|
||||
double X_F1=*a.focus1.x;
|
||||
double Y_F1=*a.focus1.y;
|
||||
double b=*a.radmin;
|
||||
|
||||
// Same idea as for major above, but for minor
|
||||
// DMC=(P1-PA)*(P1-PA)-(P2-PA)*(P2-PA)
|
||||
double closertopositiveminor= pow(X_1 - X_c + b*(Y_F1 - Y_c)/sqrt(pow(X_F1 - X_c, 2) +
|
||||
pow(Y_F1 - Y_c, 2)), 2) - pow(X_2 - X_c + b*(Y_F1 - Y_c)/sqrt(pow(X_F1 -
|
||||
X_c, 2) + pow(Y_F1 - Y_c, 2)), 2) + pow(-Y_1 + Y_c + b*(X_F1 -
|
||||
X_c)/sqrt(pow(X_F1 - X_c, 2) + pow(Y_F1 - Y_c, 2)), 2) - pow(-Y_2 + Y_c
|
||||
+ b*(X_F1 - X_c)/sqrt(pow(X_F1 - X_c, 2) + pow(Y_F1 - Y_c, 2)), 2);
|
||||
|
||||
if(closertopositiveminor>0){
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p2,EllipsePositiveMinorX,tagId);
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p2,EllipsePositiveMinorY,tagId);
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p1,EllipseNegativeMinorX,tagId);
|
||||
return addConstraintInternalAlignmentPoint2Ellipse(a,p1,EllipseNegativeMinorY,tagId);
|
||||
} else {
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p1,EllipsePositiveMinorX,tagId);
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p1,EllipsePositiveMinorY,tagId);
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p2,EllipseNegativeMinorX,tagId);
|
||||
return addConstraintInternalAlignmentPoint2Ellipse(a,p2,EllipseNegativeMinorY,tagId);
|
||||
}
|
||||
}
|
||||
|
||||
int System::addConstraintInternalAlignmentEllipseFocus1(ArcOfEllipse &a, Point &p1, int tagId)
|
||||
{
|
||||
addConstraintEqual(a.focus1.x, p1.x, tagId);
|
||||
return addConstraintEqual(a.focus1.y, p1.y, tagId);
|
||||
}
|
||||
|
||||
int System::addConstraintInternalAlignmentEllipseFocus2(ArcOfEllipse &a, Point &p1, int tagId)
|
||||
{
|
||||
addConstraintInternalAlignmentPoint2Ellipse(a,p1,EllipseFocus2X,tagId);
|
||||
return addConstraintInternalAlignmentPoint2Ellipse(a,p1,EllipseFocus2Y,tagId);
|
||||
}
|
||||
|
||||
//calculates angle between two curves at point of their intersection p. If two
|
||||
//points are supplied, p is used for first curve and p2 for second, yielding a
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace GCS
|
|||
int solve_DL(SubSystem *subsys);
|
||||
public:
|
||||
System();
|
||||
System(std::vector<Constraint *> clist_);
|
||||
/*System(std::vector<Constraint *> clist_);*/
|
||||
~System();
|
||||
|
||||
void clear();
|
||||
|
@ -138,7 +138,6 @@ namespace GCS
|
|||
int addConstraintPointOnEllipse(Point &p, Ellipse &e, int tagId=0);
|
||||
int addConstraintEllipticalArcRangeToEndPoints(Point &p, ArcOfEllipse &a, double *angle, int tagId=0);
|
||||
int addConstraintArcOfEllipseRules(ArcOfEllipse &a, int tagId=0);
|
||||
int addConstraintPointOnArcOfEllipse(Point &p, ArcOfEllipse &a, int tagId=0);
|
||||
int addConstraintPointOnArc(Point &p, Arc &a, int tagId=0);
|
||||
int addConstraintPerpendicularLine2Arc(Point &p1, Point &p2, Arc &a,
|
||||
int tagId=0);
|
||||
|
@ -152,13 +151,10 @@ namespace GCS
|
|||
Arc &a2, bool reverse2, int tagId=0);
|
||||
int addConstraintTangent(Line &l, Circle &c, int tagId=0);
|
||||
int addConstraintTangent(Line &l, Ellipse &e, int tagId=0);
|
||||
int addConstraintTangent(Line &l, ArcOfEllipse &a, int tagId=0);
|
||||
int addConstraintTangent(Ellipse &e, Circle &c, int tagId=0);
|
||||
int addConstraintTangent(Line &l, Arc &a, int tagId=0);
|
||||
int addConstraintTangent(Circle &c1, Circle &c2, int tagId=0);
|
||||
int addConstraintTangent(Arc &a1, Arc &a2, int tagId=0);
|
||||
int addConstraintTangent(Circle &c, Arc &a, int tagId=0);
|
||||
int addConstraintTangent(Ellipse &e, Arc &a, int tagId=0);
|
||||
|
||||
int addConstraintCircleRadius(Circle &c, double *radius, int tagId=0);
|
||||
int addConstraintEllipseAngleXU(Ellipse &e, double *angle, int tagId=0);
|
||||
|
@ -166,8 +162,6 @@ namespace GCS
|
|||
int addConstraintEqualLength(Line &l1, Line &l2, double *length, int tagId=0);
|
||||
int addConstraintEqualRadius(Circle &c1, Circle &c2, int tagId=0);
|
||||
int addConstraintEqualRadii(Ellipse &e1, Ellipse &e2, int tagId=0);
|
||||
int addConstraintEqualRadii(ArcOfEllipse &a1, ArcOfEllipse &a2, int tagId=0);
|
||||
int addConstraintEqualRadii(ArcOfEllipse &a1, Ellipse &e2, int tagId=0);
|
||||
int addConstraintEqualRadius(Circle &c1, Arc &a2, int tagId=0);
|
||||
int addConstraintEqualRadius(Arc &a1, Arc &a2, int tagId=0);
|
||||
int addConstraintP2PSymmetric(Point &p1, Point &p2, Line &l, int tagId=0);
|
||||
|
@ -184,11 +178,6 @@ namespace GCS
|
|||
int addConstraintInternalAlignmentEllipseMinorDiameter(Ellipse &e, Point &p1, Point &p2, int tagId=0);
|
||||
int addConstraintInternalAlignmentEllipseFocus1(Ellipse &e, Point &p1, int tagId=0);
|
||||
int addConstraintInternalAlignmentEllipseFocus2(Ellipse &e, Point &p1, int tagId=0);
|
||||
int addConstraintInternalAlignmentPoint2Ellipse(ArcOfEllipse &a, Point &p1, InternalAlignmentType alignmentType, int tagId=0);
|
||||
int addConstraintInternalAlignmentEllipseMajorDiameter(ArcOfEllipse &a, Point &p1, Point &p2, int tagId=0);
|
||||
int addConstraintInternalAlignmentEllipseMinorDiameter(ArcOfEllipse &a, Point &p1, Point &p2, int tagId=0);
|
||||
int addConstraintInternalAlignmentEllipseFocus1(ArcOfEllipse &a, Point &p1, int tagId=0);
|
||||
int addConstraintInternalAlignmentEllipseFocus2(ArcOfEllipse &a, Point &p1, int tagId=0);
|
||||
|
||||
double calculateAngleViaPoint(Curve &crv1, Curve &crv2, Point &p);
|
||||
double calculateAngleViaPoint(Curve &crv1, Curve &crv2, Point &p1, Point &p2);
|
||||
|
|
|
@ -484,8 +484,6 @@ void DrawSketchHandler::createAutoConstraints(const std::vector<AutoConstraint>
|
|||
geom2->getTypeId() == Part::GeomCircle::getClassTypeId() ||
|
||||
geom2->getTypeId() == Part::GeomArcOfCircle::getClassTypeId() ) {
|
||||
// in all these cases an intermediate element is needed
|
||||
// TODO: INSERT COMMON CODE HERE
|
||||
// in all these cases an intermediate element is needed
|
||||
makeTangentToArcOfEllipseviaNewPoint(Obj,geom1,geom2,geoId1,geoId2);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -3951,7 +3951,6 @@ void ViewProviderSketch::rebuildConstraintsVisual(void)
|
|||
break;
|
||||
case InternalAlignment:
|
||||
{
|
||||
// TODO: Implement visual representation (if any)
|
||||
edit->vConstrType.push_back((*it)->Type);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user