+ fix typos, strip trailing spaces, homogenize coding style

+ remove redundant header


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5063 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
logari81 2011-10-25 17:07:23 +00:00
parent bdcb36c0f8
commit 61de5e037e
4 changed files with 118 additions and 128 deletions

View File

@ -175,7 +175,7 @@ protected:
void resetError(void){StatusBits.reset(1);}
void setDocument(App::Document* doc);
/// get called befor the value is changed
/// get called before the value is changed
virtual void onBeforeChange(const Property* prop);
/// get called by the container when a property was changed
virtual void onChanged(const Property* prop);

View File

@ -32,7 +32,6 @@
#include <Base/Exception.h>
#include <Base/Reader.h>
#include <Base/Writer.h>
#include <Base/Console.h>
#include "Geometry.h"
#include "GeometryPy.h"

View File

@ -566,8 +566,8 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
PointPos secondPos1 = Sketcher::none, secondPos2 = Sketcher::none;
ConstraintType constrType1 = Sketcher::PointOnObject, constrType2 = Sketcher::PointOnObject;
for (std::vector<Constraint *>::const_iterator it=constraints.begin(); it != constraints.end(); ++it)
{
for (std::vector<Constraint *>::const_iterator it=constraints.begin();
it != constraints.end(); ++it) {
Constraint *constr = *(it);
if (secondPos1 == Sketcher::none && (constr->First == GeoId1 && constr->Second == GeoId)) {
constrType1= Sketcher::Coincident;
@ -635,8 +635,8 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
ConstraintType constrType = Sketcher::PointOnObject;
PointPos secondPos = Sketcher::none;
for (std::vector<Constraint *>::const_iterator it=constraints.begin(); it != constraints.end(); ++it)
{
for (std::vector<Constraint *>::const_iterator it=constraints.begin();
it != constraints.end(); ++it) {
Constraint *constr = *(it);
if ((constr->First == GeoId1 && constr->Second == GeoId)) {
constrType = Sketcher::Coincident;
@ -658,9 +658,7 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
newConstr->Second = GeoId1;
if (constrType == Sketcher::Coincident)
{
newConstr->SecondPos = secondPos;
}
addConstraint(newConstr);
delete newConstr;
@ -676,9 +674,7 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
newConstr->Second = GeoId1;
if (constrType == Sketcher::Coincident)
{
newConstr->SecondPos = secondPos;
}
addConstraint(newConstr);
delete newConstr;
@ -719,8 +715,8 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
PointPos secondPos1 = Sketcher::none, secondPos2 = Sketcher::none;
ConstraintType constrType1 = Sketcher::PointOnObject, constrType2 = Sketcher::PointOnObject;
for (std::vector<Constraint *>::const_iterator it=constraints.begin(); it != constraints.end(); ++it)
{
for (std::vector<Constraint *>::const_iterator it=constraints.begin();
it != constraints.end(); ++it) {
Constraint *constr = *(it);
if (secondPos1 == Sketcher::none && (constr->First == GeoId1 && constr->Second == GeoId)) {
constrType1= Sketcher::Coincident;
@ -731,7 +727,6 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
}
}
// constrain the trimming points on the corresponding geometries
Sketcher::Constraint *newConstr = new Sketcher::Constraint();
newConstr->Type = constrType1;
@ -806,8 +801,8 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
PointPos secondPos1 = Sketcher::none, secondPos2 = Sketcher::none;
ConstraintType constrType1 = Sketcher::PointOnObject, constrType2 = Sketcher::PointOnObject;
for (std::vector<Constraint *>::const_iterator it=constraints.begin(); it != constraints.end(); ++it)
{
for (std::vector<Constraint *>::const_iterator it=constraints.begin();
it != constraints.end(); ++it) {
Constraint *constr = *(it);
if (secondPos1 == Sketcher::none &&
(constr->First == GeoId1 && constr->Second == GeoId)) {
@ -872,8 +867,8 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
ConstraintType constrType = Sketcher::PointOnObject;
PointPos secondPos = Sketcher::none;
for (std::vector<Constraint *>::const_iterator it=constraints.begin(); it != constraints.end(); ++it)
{
for (std::vector<Constraint *>::const_iterator it=constraints.begin();
it != constraints.end(); ++it) {
Constraint *constr = *(it);
if ((constr->First == GeoId1 && constr->Second == GeoId)) {
constrType = Sketcher::Coincident;
@ -897,9 +892,7 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
newConstr->Second = GeoId1;
if (constrType == Sketcher::Coincident)
{
newConstr->SecondPos = secondPos;
}
addConstraint(newConstr);
delete newConstr;
@ -916,9 +909,7 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
newConstr->Second = GeoId1;
if (constrType == Sketcher::Coincident)
{
newConstr->SecondPos = secondPos;
}
addConstraint(newConstr);
delete newConstr;
@ -1044,7 +1035,7 @@ void SketchObject::appendConflictMsg(const std::vector<int> &conflicting, std::s
ss << msg;
if (conflicting.size() > 0) {
ss << "Please remove at least one of the constraints (" << conflicting[0];
for (int i=1; i < conflicting.size(); i++)
for (unsigned int i=1; i < conflicting.size(); i++)
ss << ", " << conflicting[i];
ss << ")\n";
}