Skip to content

Commit

Permalink
+ further optimization in sketcher
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jun 16, 2015
1 parent 788fadf commit 238beca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
9 changes: 5 additions & 4 deletions src/Mod/Sketcher/App/Sketch.h
Expand Up @@ -87,10 +87,11 @@ class SketcherExport Sketch :public Base::Persistence
/// retrieves a point
Base::Vector3d getPoint(int geoId, PointPos pos);

bool hasConflicts(void) const { return (Conflicting.size() > 0); }
const std::vector<int> &getConflicting(void) const { return Conflicting; }
bool hasRedundancies(void) const { return (Redundant.size() > 0); }
const std::vector<int> &getRedundant(void) const { return Redundant; }
// Inline methods
inline bool hasConflicts(void) const { return !Conflicting.empty(); }
inline const std::vector<int> &getConflicting(void) const { return Conflicting; }
inline bool hasRedundancies(void) const { return !Redundant.empty(); }
inline const std::vector<int> &getRedundant(void) const { return Redundant; }

/** set the datum of a distance or angle constraint to a certain value and solve
* This can cause the solving to fail!
Expand Down
18 changes: 9 additions & 9 deletions src/Mod/Sketcher/App/SketchObject.h
Expand Up @@ -209,21 +209,21 @@ class SketcherExport SketchObject : public Part::Part2DObject
void validateConstraints();

/// gets DoF of last solver execution
int getLastDoF() const {return lastDoF;}
inline int getLastDoF() const {return lastDoF;}
/// gets HasConflicts status of last solver execution
bool getLastHasConflicts() const {return lastHasConflict;}
inline bool getLastHasConflicts() const {return lastHasConflict;}
/// gets HasRedundancies status of last solver execution
bool getLastHasRedundancies() const {return lastHasRedundancies;}
inline bool getLastHasRedundancies() const {return lastHasRedundancies;}
/// gets solver status of last solver execution
int getLastSolverStatus() const {return lastSolverStatus;}
inline int getLastSolverStatus() const {return lastSolverStatus;}
/// gets solver SolveTime of last solver execution
float getLastSolveTime() const {return lastSolveTime;}
inline float getLastSolveTime() const {return lastSolveTime;}
/// gets the conflicting constraints of the last solver execution
const std::vector<int> &getLastConflicting(void) const { return lastConflicting; }
inline const std::vector<int> &getLastConflicting(void) const { return lastConflicting; }
/// gets the redundant constraints of last solver execution
const std::vector<int> &getLastRedundant(void) const { return lastRedundant; }

Sketch &getSolvedSketch(void) {return solvedSketch;}
inline const std::vector<int> &getLastRedundant(void) const { return lastRedundant; }
/// gets the solved sketch as a reference
inline Sketch &getSolvedSketch(void) {return solvedSketch;}

protected:
/// get called by the container when a property has changed
Expand Down

0 comments on commit 238beca

Please sign in to comment.