GCS::System Class Reference

#include <GCS.h>

List of all members.

Public Member Functions

int addConstraint (Constraint *constr)
int addConstraintArcRadius (Arc &a, double *radius, int tagId=0)
int addConstraintArcRules (Arc &a, int tagId=0)
int addConstraintCircleRadius (Circle &c, double *radius, int tagId=0)
int addConstraintCoordinateX (Point &p, double *x, int tagId=0)
int addConstraintCoordinateY (Point &p, double *y, int tagId=0)
int addConstraintDifference (double *param1, double *param2, double *difference, int tagId=0)
int addConstraintEqual (double *param1, double *param2, int tagId=0)
int addConstraintEqualLength (Line &l1, Line &l2, double *length, int tagId=0)
int addConstraintEqualRadius (Arc &a1, Arc &a2, int tagId=0)
int addConstraintEqualRadius (Circle &c1, Arc &a2, int tagId=0)
int addConstraintEqualRadius (Circle &c1, Circle &c2, int tagId=0)
int addConstraintHorizontal (Point &p1, Point &p2, int tagId=0)
int addConstraintHorizontal (Line &l, int tagId=0)
int addConstraintL2LAngle (Point &l1p1, Point &l1p2, Point &l2p1, Point &l2p2, double *angle, int tagId=0)
int addConstraintL2LAngle (Line &l1, Line &l2, double *angle, int tagId=0)
int addConstraintMidpointOnLine (Point &l1p1, Point &l1p2, Point &l2p1, Point &l2p2, int tagId=0)
int addConstraintMidpointOnLine (Line &l1, Line &l2, int tagId=0)
int addConstraintP2LDistance (Point &p, Line &l, double *distance, int tagId=0)
int addConstraintP2PAngle (Point &p1, Point &p2, double *angle, int tagId=0)
int addConstraintP2PAngle (Point &p1, Point &p2, double *angle, double incr_angle, int tagId=0)
int addConstraintP2PCoincident (Point &p1, Point &p2, int tagId=0)
int addConstraintP2PDistance (Point &p1, Point &p2, double *distance, int tagId=0)
int addConstraintP2PSymmetric (Point &p1, Point &p2, Line &l, int tagId=0)
int addConstraintParallel (Line &l1, Line &l2, int tagId=0)
int addConstraintPerpendicular (Point &l1p1, Point &l1p2, Point &l2p1, Point &l2p2, int tagId=0)
int addConstraintPerpendicular (Line &l1, Line &l2, int tagId=0)
int addConstraintPointOnArc (Point &p, Arc &a, int tagId=0)
int addConstraintPointOnCircle (Point &p, Circle &c, int tagId=0)
int addConstraintPointOnLine (Point &p, Line &l, int tagId=0)
int addConstraintTangent (Line &l, Arc &a, int tagId=0)
int addConstraintTangent (Line &l, Circle &c, int tagId=0)
int addConstraintTangentArc2Line (Arc &a, Point &p1, Point &p2, int tagId=0)
int addConstraintTangentLine2Arc (Point &p1, Point &p2, Arc &a, int tagId=0)
int addConstraintVertical (Point &p1, Point &p2, int tagId=0)
int addConstraintVertical (Line &l, int tagId=0)
void applySolution ()
void clear ()
void clearByTag (int tagId)
int diagnose (VEC_pD &params, VEC_I &conflicting)
void getSubSystems (std::vector< SubSystem * > &subsysvec)
void initSolution (VEC_pD &params)
bool isInit () const
void removeConstraint (Constraint *constr)
void rescaleConstraint (int id, double coeff)
int solve (SubSystem *subsysA, SubSystem *subsysB, bool isFine=true)
int solve (SubSystem *subsys, bool isFine=true, Algorithm alg=DogLeg)
int solve (VEC_pD &params, bool isFine=true, Algorithm alg=DogLeg)
int solve (bool isFine=true, Algorithm alg=DogLeg)
 System (std::vector< Constraint * > clist_)
 System ()
void undoSolution ()
 ~System ()

Detailed Description

Definition at line 47 of file GCS.h.


Constructor & Destructor Documentation

GCS::System::System (  ) 

Definition at line 38 of file GCS.cpp.

GCS::System::System ( std::vector< Constraint * >  clist_  ) 
GCS::System::~System (  ) 

Definition at line 120 of file GCS.cpp.

References clear().


Member Function Documentation

int GCS::System::addConstraint ( Constraint constr  ) 
int GCS::System::addConstraintArcRadius ( Arc a,
double *  radius,
int  tagId = 0 
)

Definition at line 374 of file GCS.cpp.

References addConstraintEqual(), and GCS::Arc::rad.

Referenced by Sketcher::Sketch::addRadiusConstraint().

int GCS::System::addConstraintArcRules ( Arc a,
int  tagId = 0 
)
int GCS::System::addConstraintCircleRadius ( Circle c,
double *  radius,
int  tagId = 0 
)

Definition at line 369 of file GCS.cpp.

References addConstraintEqual(), and GCS::Circle::rad.

Referenced by Sketcher::Sketch::addRadiusConstraint().

int GCS::System::addConstraintCoordinateX ( Point p,
double *  x,
int  tagId = 0 
)

Definition at line 317 of file GCS.cpp.

References addConstraintEqual(), and GCS::Point::x.

Referenced by Sketcher::Sketch::addCoordinateXConstraint().

int GCS::System::addConstraintCoordinateY ( Point p,
double *  y,
int  tagId = 0 
)

Definition at line 322 of file GCS.cpp.

References addConstraintEqual(), and GCS::Point::y.

Referenced by Sketcher::Sketch::addCoordinateYConstraint().

int GCS::System::addConstraintDifference ( double *  param1,
double *  param2,
double *  difference,
int  tagId = 0 
)
int GCS::System::addConstraintEqual ( double *  param1,
double *  param2,
int  tagId = 0 
)
int GCS::System::addConstraintEqualLength ( Line l1,
Line l2,
double *  length,
int  tagId = 0 
)

Definition at line 379 of file GCS.cpp.

References addConstraintP2PDistance(), GCS::Line::p1, and GCS::Line::p2.

Referenced by Sketcher::Sketch::addEqualConstraint().

int GCS::System::addConstraintEqualRadius ( Arc a1,
Arc a2,
int  tagId = 0 
)

Definition at line 395 of file GCS.cpp.

References addConstraintEqual(), and GCS::Arc::rad.

int GCS::System::addConstraintEqualRadius ( Circle c1,
Arc a2,
int  tagId = 0 
)

Definition at line 390 of file GCS.cpp.

References addConstraintEqual(), GCS::Arc::rad, and GCS::Circle::rad.

int GCS::System::addConstraintEqualRadius ( Circle c1,
Circle c2,
int  tagId = 0 
)

Definition at line 385 of file GCS.cpp.

References addConstraintEqual(), and GCS::Circle::rad.

Referenced by Sketcher::Sketch::addEqualConstraint().

int GCS::System::addConstraintHorizontal ( Point p1,
Point p2,
int  tagId = 0 
)

Definition at line 302 of file GCS.cpp.

References addConstraintEqual(), and GCS::Point::y.

int GCS::System::addConstraintHorizontal ( Line l,
int  tagId = 0 
)
int GCS::System::addConstraintL2LAngle ( Point l1p1,
Point l1p2,
Point l2p1,
Point l2p2,
double *  angle,
int  tagId = 0 
)

Definition at line 266 of file GCS.cpp.

References addConstraint(), and GCS::Constraint::setTag().

int GCS::System::addConstraintL2LAngle ( Line l1,
Line l2,
double *  angle,
int  tagId = 0 
)

Definition at line 259 of file GCS.cpp.

References addConstraint(), and GCS::Constraint::setTag().

Referenced by Sketcher::Sketch::addAngleConstraint().

int GCS::System::addConstraintMidpointOnLine ( Point l1p1,
Point l1p2,
Point l2p1,
Point l2p2,
int  tagId = 0 
)

Definition at line 281 of file GCS.cpp.

References addConstraint(), and GCS::Constraint::setTag().

int GCS::System::addConstraintMidpointOnLine ( Line l1,
Line l2,
int  tagId = 0 
)

Definition at line 274 of file GCS.cpp.

References addConstraint(), and GCS::Constraint::setTag().

Referenced by addConstraintP2PSymmetric().

int GCS::System::addConstraintP2LDistance ( Point p,
Line l,
double *  distance,
int  tagId = 0 
)
int GCS::System::addConstraintP2PAngle ( Point p1,
Point p2,
double *  angle,
int  tagId = 0 
)

Definition at line 218 of file GCS.cpp.

References addConstraintP2PAngle().

int GCS::System::addConstraintP2PAngle ( Point p1,
Point p2,
double *  angle,
double  incr_angle,
int  tagId = 0 
)
int GCS::System::addConstraintP2PCoincident ( Point p1,
Point p2,
int  tagId = 0 
)
int GCS::System::addConstraintP2PDistance ( Point p1,
Point p2,
double *  distance,
int  tagId = 0 
)
int GCS::System::addConstraintP2PSymmetric ( Point p1,
Point p2,
Line l,
int  tagId = 0 
)
int GCS::System::addConstraintParallel ( Line l1,
Line l2,
int  tagId = 0 
)
int GCS::System::addConstraintPerpendicular ( Point l1p1,
Point l1p2,
Point l2p1,
Point l2p2,
int  tagId = 0 
)

Definition at line 251 of file GCS.cpp.

References addConstraint(), and GCS::Constraint::setTag().

int GCS::System::addConstraintPerpendicular ( Line l1,
Line l2,
int  tagId = 0 
)
int GCS::System::addConstraintPointOnArc ( Point p,
Arc a,
int  tagId = 0 
)
int GCS::System::addConstraintPointOnCircle ( Point p,
Circle c,
int  tagId = 0 
)
int GCS::System::addConstraintPointOnLine ( Point p,
Line l,
int  tagId = 0 
)
int GCS::System::addConstraintTangent ( Line l,
Arc a,
int  tagId = 0 
)

Definition at line 350 of file GCS.cpp.

References addConstraintP2LDistance(), GCS::Arc::center, and GCS::Arc::rad.

int GCS::System::addConstraintTangent ( Line l,
Circle c,
int  tagId = 0 
)
int GCS::System::addConstraintTangentArc2Line ( Arc a,
Point p1,
Point p2,
int  tagId = 0 
)
int GCS::System::addConstraintTangentLine2Arc ( Point p1,
Point p2,
Arc a,
int  tagId = 0 
)
int GCS::System::addConstraintVertical ( Point p1,
Point p2,
int  tagId = 0 
)

Definition at line 312 of file GCS.cpp.

References addConstraintEqual(), and GCS::Point::x.

int GCS::System::addConstraintVertical ( Line l,
int  tagId = 0 
)
void GCS::System::applySolution (  ) 

Definition at line 1060 of file GCS.cpp.

References GCS::SubSystem::applySolution().

Referenced by Sketcher::Sketch::solve().

void GCS::System::clear ( void   ) 

Definition at line 125 of file GCS.cpp.

References GCS::free().

Referenced by Sketcher::Sketch::clear(), and ~System().

void GCS::System::clearByTag ( int  tagId  ) 
int GCS::System::diagnose ( VEC_pD params,
VEC_I conflicting 
)
void GCS::System::getSubSystems ( std::vector< SubSystem * > &  subsysvec  ) 

Definition at line 1049 of file GCS.cpp.

void GCS::System::initSolution ( VEC_pD params  ) 
bool GCS::System::isInit (  )  const [inline]

Definition at line 140 of file GCS.h.

Referenced by Sketcher::Sketch::diagnose().

void GCS::System::removeConstraint ( Constraint constr  ) 

Definition at line 163 of file GCS.cpp.

References draftlibs::fcvec::find(), and GCS::free().

Referenced by clearByTag().

void GCS::System::rescaleConstraint ( int  id,
double  coeff 
)

Definition at line 406 of file GCS.cpp.

Referenced by Sketcher::Sketch::initMove().

int GCS::System::solve ( SubSystem subsysA,
SubSystem subsysB,
bool  isFine = true 
)
int GCS::System::solve ( SubSystem subsys,
bool  isFine = true,
Algorithm  alg = DogLeg 
)

Definition at line 531 of file GCS.cpp.

References GCS::BFGS, GCS::DogLeg, and GCS::LevenbergMarquardt.

int GCS::System::solve ( VEC_pD params,
bool  isFine = true,
Algorithm  alg = DogLeg 
)

Definition at line 496 of file GCS.cpp.

References initSolution(), and solve().

int GCS::System::solve ( bool  isFine = true,
Algorithm  alg = DogLeg 
)

Definition at line 502 of file GCS.cpp.

References GCS::Success.

Referenced by Sketcher::Sketch::solve(), and solve().

void GCS::System::undoSolution (  ) 

Definition at line 1074 of file GCS.cpp.

Referenced by Sketcher::Sketch::solve().


The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:01:58 2011 for FreeCAD by  doxygen 1.6.1