improve whitespaces
This commit is contained in:
parent
7e42975556
commit
67a0bd4750
|
@ -538,8 +538,8 @@ struct Vertex2d_EqualTo : public std::binary_function<const Base::Vector3f&, co
|
|||
{
|
||||
bool operator()(const Base::Vector3f& p, const Base::Vector3f& q) const
|
||||
{
|
||||
if (fabs(p.x - q.x) < MeshDefinitions::_fMinPointDistanceD1
|
||||
&& fabs(p.y - q.y) < MeshDefinitions::_fMinPointDistanceD1)
|
||||
if (fabs(p.x - q.x) < MeshDefinitions::_fMinPointDistanceD1 &&
|
||||
fabs(p.y - q.y) < MeshDefinitions::_fMinPointDistanceD1)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -91,14 +91,14 @@ void VelocityProfile_Trap::SetProfile(double pos1,double pos2) {
|
|||
void VelocityProfile_Trap::SetProfileDuration(
|
||||
double pos1,double pos2,double newduration) {
|
||||
// duration should be longer than originally planned duration
|
||||
// Fastest :
|
||||
// Fastest :
|
||||
SetProfile(pos1,pos2);
|
||||
// Must be Slower :
|
||||
// Must be Slower :
|
||||
double factor = duration/newduration;
|
||||
if (factor > 1)
|
||||
return; // do not exceed max
|
||||
if (factor > 1)
|
||||
return; // do not exceed max
|
||||
|
||||
a2*=factor;
|
||||
a2*=factor;
|
||||
a3*=factor*factor;
|
||||
b2*=factor;
|
||||
b3*=factor*factor;
|
||||
|
@ -111,11 +111,12 @@ void VelocityProfile_Trap::SetProfileDuration(
|
|||
|
||||
void VelocityProfile_Trap::SetProfileVelocity(
|
||||
double pos1,double pos2,double newvelocity) {
|
||||
// Max velocity
|
||||
// Max velocity
|
||||
SetProfile(pos1,pos2);
|
||||
// Must be Slower :
|
||||
// Must be Slower :
|
||||
double factor = newvelocity; // valid = [KDL::epsilon, 1.0]
|
||||
if (1.0 < factor) factor = 1.0;
|
||||
if (1.0 < factor)
|
||||
factor = 1.0;
|
||||
if (KDL::epsilon > factor) factor = KDL::epsilon;
|
||||
a2*=factor;
|
||||
a3*=factor*factor;
|
||||
|
|
|
@ -100,13 +100,13 @@ void VelocityProfile_TrapHalf::SetProfile(double pos1,double pos2) {
|
|||
void VelocityProfile_TrapHalf::SetProfileDuration(
|
||||
double pos1,double pos2,double newduration)
|
||||
{
|
||||
SetProfile(pos1,pos2);
|
||||
double factor = duration/newduration;
|
||||
SetProfile(pos1,pos2);
|
||||
double factor = duration/newduration;
|
||||
|
||||
if ( factor > 1 )
|
||||
return;
|
||||
if ( factor > 1 )
|
||||
return;
|
||||
|
||||
double s = sign(endpos-startpos);
|
||||
double s = sign(endpos-startpos);
|
||||
double tmp = 2.0*s*(endpos-startpos)/maxvel;
|
||||
double v = s*maxvel;
|
||||
duration = newduration;
|
||||
|
|
|
@ -3097,13 +3097,15 @@ int SketchObject::ExposeInternalGeometry(int GeoId)
|
|||
this->addGeometry(igeo,true);
|
||||
this->addConstraints(icon);
|
||||
|
||||
for (std::vector<Part::Geometry *>::iterator it=igeo.begin(); it != igeo.end(); ++it)
|
||||
for (std::vector<Part::Geometry *>::iterator it=igeo.begin(); it != igeo.end(); ++it) {
|
||||
if (*it)
|
||||
delete *it;
|
||||
}
|
||||
|
||||
for (std::vector<Constraint *>::iterator it=icon.begin(); it != icon.end(); ++it)
|
||||
for (std::vector<Constraint *>::iterator it=icon.begin(); it != icon.end(); ++it) {
|
||||
if (*it)
|
||||
delete *it;
|
||||
}
|
||||
|
||||
icon.clear();
|
||||
igeo.clear();
|
||||
|
|
Loading…
Reference in New Issue
Block a user