Misc. source comment typos

This commit is contained in:
luz.paz
2019-03-18 07:47:25 -04:00
committed by Yorik van Havre
parent 2e4e9c6d4e
commit ad0ee86589
9 changed files with 75 additions and 79 deletions

View File

@@ -103,7 +103,7 @@ public:
App::PropertyMap Meta;
/// Material descriptions, used and defined in the Material module.
App::PropertyMap Material;
/// read-only name of the temp dir created wen the document is opened
/// read-only name of the temp dir created when the document is opened
PropertyString TransientDir;
/// Tip object of the document (if any)
PropertyLink Tip;

View File

@@ -1264,8 +1264,8 @@ bool NaviCubeImplementation::processSoEvent(const SoEvent* ev) {
// FIXME find out why do we need to hack the cursor position to get
// 2019-02-17
// The above comment is truncated; don't know what it's about
// The two hacked lines changing the cursor positon are responsible for parts of the
// navigational cluster not being active.
// The two hacked lines changing the cursor position are responsible for
// parts of the navigational cluster not being active.
// Commented them out and everything seems to be working
// y += 4;
// x -= 2;

View File

@@ -24,14 +24,14 @@ def translate_points(pointarray,matrix):
tpointarray = translate_points(pointarray,matrix)
Takes array of points and a homogenous (4D) transformation
Takes array of points and a homogeneous (4D) transformation
matrix in exactly the same form in which they appear in the
3DS DOM.
Returns a pointarray with the points transformed by the matrix.
"""
n = len(pointarray)
pt = numpy.ones((n,4),_calc_precision_type)
pt[:,:3] = pointarray
@@ -55,7 +55,7 @@ def calculate_normals_no_smoothing(pointarray,facearray,smarray=None):
returned as a list of consecutive triangles; the first three rows
make up the first triangle, the second three rows make up the
second triangle, and so on.
The normal vectors are determined by calculating the normal to
each face. There is no smoothing.
@@ -73,7 +73,7 @@ def calculate_normals_no_smoothing(pointarray,facearray,smarray=None):
B = numpy.asarray(pointarray[facearray[:,1]],_calc_precision_type)
C = numpy.asarray(pointarray[facearray[:,2]],_calc_precision_type)
b = A - C
c = B - A
c = B - A
fnorms[2::3,0] = c[:,2]*b[:,1]-c[:,1]*b[:,2]
fnorms[2::3,1] = c[:,0]*b[:,2]-c[:,2]*b[:,0]
fnorms[2::3,2] = c[:,1]*b[:,0]-c[:,0]*b[:,1]
@@ -131,7 +131,7 @@ def calculate_normals_by_cross_product(pointarray,facearray,smarray):
C = numpy.asarray(pointarray[facearray[:,2]],_calc_precision_type)
a = C - B
b = A - C
c = B - A
c = B - A
rnorms[0::3,0] = c[:,2]*b[:,1]-c[:,1]*b[:,2]
rnorms[0::3,1] = c[:,0]*b[:,2]-c[:,2]*b[:,0]
rnorms[0::3,2] = c[:,1]*b[:,0]-c[:,0]*b[:,1]
@@ -154,7 +154,7 @@ def calculate_normals_by_cross_product(pointarray,facearray,smarray):
rslice[:-1] = brs
rslice[-1] = 3*m
for i in xrange(len(brs)+1):
rgroup = lex[lslice[i]:rslice[i]]
rgroup = lex[lslice[i]:rslice[i]]
xgroup = exarray[rgroup]
normpat = numpy.logical_or(
numpy.bitwise_and.outer(xgroup,xgroup),
@@ -186,7 +186,7 @@ def calculate_normals_by_angle_subtended(pointarray,facearray,smarray):
consecutive triangles; the first three rows make up the first
triangle, the second three rows make up the second triangle, and
so on.
To calculate the normal of a given vertex on a given face, this
function averages the normal vector for all faces which have share
that vertex, and a smoothing group.
@@ -259,7 +259,7 @@ def calculate_normals_by_angle_subtended(pointarray,facearray,smarray):
rslice[:-1] = brs
rslice[-1] = 3*m
for i in xrange(len(brs)+1):
rgroup = lex[lslice[i]:rslice[i]]
rgroup = lex[lslice[i]:rslice[i]]
xgroup = exarray[rgroup]
normpat = numpy.logical_or(
numpy.bitwise_and.outer(xgroup,xgroup),

View File

@@ -2883,7 +2883,7 @@ def upgrade(objects,delete=False,force=None):
if DraftGeomUtils.isCoplanar(faces):
u = DraftGeomUtils.concatenate(u)
if not DraftGeomUtils.hasCurves(u):
# several coplanar and non-curved faces: they can becoem a Draft wire
# several coplanar and non-curved faces: they can become a Draft wire
newobj = makeWire(u.Wires[0],closed=True,face=True)
else:
# if not possible, we do a non-parametric union
@@ -3001,13 +3001,13 @@ def upgrade(objects,delete=False,force=None):
# if we have a group: turn each closed wire inside into a face
if groups:
result = closeGroupWires(groups)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found groups: closing each open object inside")+"\n")
# if we have meshes, we try to turn them into shapes
elif meshes:
result = turnToParts(meshes)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found mesh(es): turning into Part shapes")+"\n")
# we have only faces here, no lone edges
@@ -3016,31 +3016,31 @@ def upgrade(objects,delete=False,force=None):
# we have one shell: we try to make a solid
if (len(objects) == 1) and (len(faces) > 3):
result = makeSolid(objects[0])
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found 1 solidifiable object: solidifying it")+"\n")
# we have exactly 2 objects: we fuse them
elif (len(objects) == 2) and (not curves):
result = makeFusion(objects[0],objects[1])
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found 2 objects: fusing them")+"\n")
# we have many separate faces: we try to make a shell
elif (len(objects) > 2) and (len(faces) > 1) and (not loneedges):
result = makeShell(objects)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found several objects: creating a shell")+"\n")
# we have faces: we try to join them if they are coplanar
elif len(faces) > 1:
result = joinFaces(objects)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found several coplanar objects or faces: creating one face")+"\n")
# only one object: if not parametric, we "draftify" it
elif len(objects) == 1 and (not objects[0].isDerivedFrom("Part::Part2DObjectPython")):
result = draftify(objects[0])
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found 1 non-parametric objects: draftifying it")+"\n")
# we have only one object that contains one edge
@@ -3048,14 +3048,14 @@ def upgrade(objects,delete=False,force=None):
# we have a closed sketch: Extract a face
if objects[0].isDerivedFrom("Sketcher::SketchObject") and (len(edges[0].Vertexes) == 1):
result = makeSketchFace(objects[0])
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found 1 closed sketch object: creating a face from it")+"\n")
else:
# turn to Draft line
e = objects[0].Shape.Edges[0]
if isinstance(e.Curve,(Part.LineSegment,Part.Line)):
result = turnToLine(objects[0])
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found 1 linear object: converting to line")+"\n")
# we have only closed wires, no faces
@@ -3064,37 +3064,37 @@ def upgrade(objects,delete=False,force=None):
# we have a sketch: Extract a face
if (len(objects) == 1) and objects[0].isDerivedFrom("Sketcher::SketchObject"):
result = makeSketchFace(objects[0])
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found 1 closed sketch object: creating a face from it")+"\n")
# only closed wires
else:
result = makeFaces(objects)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found closed wires: creating faces")+"\n")
# special case, we have only one open wire. We close it, unless it has only 1 edge!"
elif (len(openwires) == 1) and (not faces) and (not loneedges):
result = closeWire(objects[0])
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found 1 open wire: closing it")+"\n")
# only open wires and edges: we try to join their edges
elif openwires and (not wires) and (not faces):
result = makeWires(objects)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found several open wires: joining them")+"\n")
# only loneedges: we try to join them
elif loneedges and (not facewires):
result = makeWires(objects)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found several edges: wiring them")+"\n")
# all other cases, if more than 1 object, make a compound
elif (len(objects) > 1):
result = makeCompound(objects)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found several non-treatable objects: creating compound")+"\n")
# no result has been obtained
@@ -3267,14 +3267,14 @@ def downgrade(objects,delete=False,force=None):
# we have a block, we explode it
if (len(objects) == 1) and (getType(objects[0]) == "Block"):
result = explode(objects[0])
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found 1 block: exploding it")+"\n")
# we have one multi-solids compound object: extract its solids
elif (len(objects) == 1) and (getType(objects[0]) == "Part") and (len(solids) > 1):
result = splitCompounds(objects)
#print(result)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found 1 multi-solids compound: exploding it")+"\n")
# special case, we have one parametric object: we "de-parametrize" it
@@ -3288,7 +3288,7 @@ def downgrade(objects,delete=False,force=None):
# we have only 2 objects: cut 2nd from 1st
elif len(objects) == 2:
result = cut2(objects)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found 2 objects: subtracting them")+"\n")
elif (len(faces) > 1):
@@ -3296,25 +3296,25 @@ def downgrade(objects,delete=False,force=None):
# one object with several faces: split it
if len(objects) == 1:
result = splitFaces(objects)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found several faces: splitting them")+"\n")
# several objects: remove all the faces from the first one
else:
result = subtr(objects)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found several objects: subtracting them from the first one")+"\n")
# only one face: we extract its wires
elif (len(faces) > 0):
result = getWire(objects[0])
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found 1 face: extracting its wires")+"\n")
# no faces: split wire into single edges
elif not onlyedges:
result = splitWires(objects)
if result:
if result:
FreeCAD.Console.PrintMessage(translate("draft", "Found only wires: extracting their edges")+"\n")
# no result has been obtained

View File

@@ -93,7 +93,7 @@ public:
* built out of the axes of the plane.
*/
Base::Matrix4D GetTransformToFitPlane() const;
/** If the points of the polygon set by SetPolygon() doesn't lie in a
/** If the points of the polygon set by SetPolygon() doesn't lie in a
* plane this method can be used to project the points in a common plane.
*/
std::vector<Base::Vector3f> ProjectToFitPlane();
@@ -157,11 +157,11 @@ protected:
private:
/**
* Static class to triangulate any contour/polygon (without holes) efficiently.
* The original code snippet was submitted to FlipCode.com by John W. Ratcliff
* The original code snippet was submitted to FlipCode.com by John W. Ratcliff
* (jratcliff@verant.com) on July 22, 2000.
* The original vector of 2d points is replaced by a vector of 3d points where the
* z-ccordinate is ignored. This is because the algorithm is often used for 3d points
* projected to a common plane. The result vector of 2d points is replaced by an
* z-coordinate is ignored. This is because the algorithm is often used for 3d points
* projected to a common plane. The result vector of 2d points is replaced by an
* array of indices to the points of the polygon.
*/
class Triangulate
@@ -255,4 +255,4 @@ protected:
} // namespace MeshCore
#endif // MESH_TRIANGULATION_H
#endif // MESH_TRIANGULATION_H

View File

@@ -52,7 +52,7 @@ namespace geoff_geometry {
#endif
void Matrix::Unit()
{
// homogenous matrix - set as unit matrix
// homogeneous matrix - set as unit matrix
memset(e, 0, sizeof(e));
e[0] = e[5] = e[10] = e[15] = 1;
m_unit = true;
@@ -109,12 +109,12 @@ namespace geoff_geometry {
void Matrix::Rotate(double angle, int Axis)
{ // Rotation (Axis 1 = x , 2 = y , 3 = z
{ // Rotation (Axis 1 = x , 2 = y , 3 = z
Rotate(sin(angle), cos(angle), Axis);
}
void Matrix::Rotate(double sinang, double cosang, int Axis)
{ // Rotation (Axis 1 = x , 2 = y , 3 = z
{ // Rotation (Axis 1 = x , 2 = y , 3 = z
Matrix rotate;
rotate.Unit();
@@ -174,7 +174,7 @@ namespace geoff_geometry {
l = i - (k = (i % 4));
ret.e[i] = m.e[l] * e[k] + m.e[l+1] * e[k+4] + m.e[l+2] * e[k+8] + m.e[l+3] * e[k+12];
}
*this = ret;
this->IsUnit();
}
@@ -597,19 +597,19 @@ namespace geoff_geometry {
void Plane::Mirrored(Matrix* tmMirrored) {
// calculates a mirror transformation that mirrors 2d about plane
//Point3d p1 = this->Near(Point3d(0.,0.,0.));
if(tmMirrored->m_unit == false) tmMirrored->Unit();
double nx = this->normal.getx();
double ny = this->normal.gety();
double nz = this->normal.getz();
// the translation
tmMirrored->e[ 3] = -2. * nx * this->d;
tmMirrored->e[ 7] = -2. * ny * this->d;
tmMirrored->e[11] = -2. * nz * this->d;
// the rest
tmMirrored->e[ 0] = 1. - 2. * nx * nx;
tmMirrored->e[ 5] = 1. - 2. * ny * ny;
@@ -617,7 +617,7 @@ namespace geoff_geometry {
tmMirrored->e[ 1] = tmMirrored->e[ 4] = -2. * nx * ny;
tmMirrored->e[ 2] = tmMirrored->e[ 8] = -2. * nz * nx;
tmMirrored->e[ 6] = tmMirrored->e[ 9] = -2. * ny * nz;
tmMirrored->m_unit = false;
tmMirrored->m_mirrored = true;
}

View File

@@ -146,7 +146,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
MES_INVALIDPLANE
};
// homogenous 4 x 4 Matrix class
// homogeneous 4 x 4 Matrix class
class Matrix{
protected:
public:
@@ -205,7 +205,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
friend wostream& operator << (wostream& op, Point& p);
public:
bool ok; // true if this point is defined correctly
bool ok; // true if this point is defined correctly
double x; // x value
double y; // y value
@@ -247,7 +247,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
class Point3d {
friend wostream& operator <<(wostream& op, Point3d& p);
public:
// bool ok; // true if this point is defined correctly
// bool ok; // true if this point is defined correctly
double x; // x value
double y; // y value
double z; // z value
@@ -292,7 +292,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
class Vector2d{
friend wostream& operator <<(wostream& op, Vector2d& v);
private:
double dx, dy;
double dx, dy;
public:
// constructors
@@ -346,7 +346,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
double temp = -dy * sina + dx * cosa;
dy = dx * sina + cosa * dy;
dx = temp;
}
}
inline void Rotate(double angle) { if(FEQZ(angle) == true) return; Rotate(cos(angle), sin(angle));}
void Transform( const Matrix& m); // transform vector
@@ -398,7 +398,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
return Vector3d(dy * v.dz - dz * v.dy, dz * v.dx - dx * v.dz, dx * v.dy - dy * v.dx);} // cross product vector
// = the vector perp to the plane of the 2 vectors
// the z component magnitude is m0.m1.sin a
// the z component magnitude is m0.m1.sin a
// methods
inline void get(double xyz[3])const {xyz[0] = dx; xyz[1] = dy; xyz[2] = dz;} // return to array
inline double getx()const{return dx;}
@@ -442,7 +442,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
inline CLine(const Point& p0, const Vector2d& v0, bool normalise = true) {p = p0; v = v0; if(normalise) Normalise();};
inline CLine(const CLine& s) {p = s.p; v = s.v; ok = s.ok;} // copy constructor CLine s1(s2);
inline CLine(const Point& p0, const Point& p1) {p = p0; v = Vector2d(p0, p1); Normalise();};
CLine(const Span& sp);
CLine(const Span& sp);
// operators
const CLine operator~(void);// perp to left
@@ -457,8 +457,8 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
#endif
CLine Transform(Matrix& m); // transform a CLine
Point Intof(const CLine& s); // intersection of 2 clines
Point Intof(int NF, const Circle& c); // intersection of cline & circle
Point Intof(int NF, const Circle& c, Point& otherInters); double Dist(const Point& p1)const; // ditto & other intersection
Point Intof(int NF, const Circle& c); // intersection of cline & circle
Point Intof(int NF, const Circle& c, Point& otherInters); double Dist(const Point& p1)const; // ditto & other intersection
CLine Bisector(const CLine& s); // Bisector of 2 Clines
// destructor
@@ -468,7 +468,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
#define HORIZ_CLINE CLine(geoff_geometry::Point(0,0), 1.0, 0.0, true)
// 2D circle
// 2D circle
class Circle{
friend wostream& operator <<(wostream& op, Circle& c);
public:
@@ -595,7 +595,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
// operators
// bool operator==(const Span &sp)const;
// bool operator!=(const Span &sp)const { return !(*this == sp);}
// bool operator!=(const Span &sp)const { return !(*this == sp);}
};
// general
@@ -697,11 +697,11 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
// methods
double Dist(const Point3d& p)const; // signed distance of point to plane
bool Intof(const Line& l, Point3d& intof, double& t)const; // intersection of plane & line (0 >= t <= 1 if intersect within line)
bool Intof(const Line& l, Point3d& intof, double& t)const; // intersection of plane & line (0 >= t <= 1 if intersect within line)
bool Intof(const Plane& pl, Line& intof)const; // intersection of 2 planes
bool Intof(const Plane& pl0, const Plane& pl1, Point3d& intof)const; // intersection of 3 planes
Point3d Near(const Point3d& p)const; // returns near point to p on the plane
void Mirrored(Matrix* m); // returns a matrix for a mirror about this
void Mirrored(Matrix* m); // returns a matrix for a mirror about this
};
@@ -748,7 +748,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
public:
int type[SPANSTORAGE]; // LINEAR CW or ACW // 0 straight (cw = -1 (T) acw = 1 (A) )
int spanid[SPANSTORAGE]; // identification (eg wire offset span info)
const SpanDataObject* index[SPANSTORAGE]; // other - pointer to
const SpanDataObject* index[SPANSTORAGE]; // other - pointer to
double x[SPANSTORAGE], y[SPANSTORAGE]; // vertex
double xc[SPANSTORAGE], yc[SPANSTORAGE]; // centre of arc
public:
@@ -777,14 +777,14 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
class Kurve : public Matrix{
friend wofstream& operator << (wofstream& op, Kurve& k);
friend wifstream& operator >> (wifstream& op, Kurve& k);
protected:
vector<SpanVertex*> m_spans;
bool m_started;
int m_nVertices; // number of vertices in Kurve
bool m_isReversed; // true if get spans reversed
public:
public:
// for comparing kurves
struct spanCompare {
int dir; // LINEAR, CW or ACW
@@ -821,7 +821,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
bool Add(const Span& sp, bool AddNullSpans = true); // add a span
bool Add(int type, const Point& p0, const Point& pc, bool AddNullSpans = true); // a span
void AddSpanID(int ID);
bool Add(const Point& p0, bool AddNullSpans = true); // linear
bool Add(const Point& p0, bool AddNullSpans = true); // linear
void Add(); // add a null span
void Add(const Kurve* k, bool AddNullSpans = true); // a kurve
void StoreAllSpans(std::vector<Span>& kSpans)const; // store all kurve spans in array, normally when fast access is reqd
@@ -832,7 +832,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) >
int GetSpanID(int spanVertexNumber) const; // for spanID (wire offset)
int Get(int spanVertexNumber, Point& p, Point& pc) const;
void Get(std::vector<Span> *all, bool ignoreNullSpans) const; // get all spans to vector
int Get(int spanVertexNumber, Point3d& p, Point3d& pc) const
int Get(int spanVertexNumber, Point3d& p, Point3d& pc) const
{ Point p2d, pc2d; int d = Get(spanVertexNumber, p2d, pc2d); p = p2d; pc = pc2d; return d;}
int Get(int spannumber, Span& sp, bool returnSpanProperties = false, bool transform = false) const;
// int Get(int spannumber, Span3d& sp, bool returnSpanProperties = false, bool transform = false) const;
@@ -994,7 +994,3 @@ public:
} // End namespace geoff_geometry

View File

@@ -460,7 +460,7 @@ void CmdTechDrawNewViewDetail::activated(int iMsg)
doCommand(Doc,"App.activeDocument().%s.Direction = App.activeDocument().%s.Direction",FeatName.c_str(),dvp->getNameInDocument());
doCommand(Doc,"App.activeDocument().%s.addView(App.activeDocument().%s)",PageName.c_str(),FeatName.c_str());
updateActive(); //ok here, no preceeding recompute
updateActive(); //ok here, no preceding recompute
commitCommand();
}

View File

@@ -48,7 +48,7 @@ QGISectionLine::QGISectionLine()
m_extLen = 1.5 * Rez::guiX(QGIArrow::getPrefArrowSize());
m_arrowSize = QGIArrow::getPrefArrowSize();
m_line = new QGraphicsPathItem();
addToGroup(m_line);
m_arrow1 = new QGIArrow();
@@ -79,7 +79,7 @@ void QGISectionLine::makeLine()
{
QPainterPath pp;
QPointF beginExtLineStart,beginExtLineEnd; //ext line start pts for measure Start side and measure End side
QPointF endExtLineStart, endExtLineEnd;
QPointF endExtLineStart, endExtLineEnd;
QPointF offset(m_arrowDir.x,-m_arrowDir.y);
double arrowLen2 = 2.0 * Rez::guiX(QGIArrow::getPrefArrowSize());
int format = getPrefSectionFormat();
@@ -110,7 +110,7 @@ void QGISectionLine::makeLine()
// pp.moveTo(beginExtLineStart);
// pp.lineTo(m_start); //arrow line
// pp.moveTo(beginExtLineEnd);
// pp.moveTo(beginExtLineEnd);
pp.moveTo(m_end);
pp.lineTo(m_start); //sectionLine
m_line->setPath(pp);
@@ -119,7 +119,7 @@ void QGISectionLine::makeLine()
void QGISectionLine::makeArrows()
{
int format = getPrefSectionFormat();
if (format == 0) {
if (format == 0) {
makeArrowsTrad();
} else {
makeArrowsISO();
@@ -147,7 +147,7 @@ void QGISectionLine::makeArrowsISO()
m_arrow1->setPos(m_start);
m_arrow1->draw();
m_arrow1->setRotation(arrowRotation); //rotation = 0 ==> -> horizontal, pointing right
m_arrow2->setStyle(0);
m_arrow2->setSize(QGIArrow::getPrefArrowSize());
m_arrow2->setPos(m_end);
@@ -177,7 +177,7 @@ void QGISectionLine::makeArrowsTrad()
m_arrow1->setPos(extLineStart);
m_arrow1->draw();
m_arrow1->setRotation(arrowRotation); //rotation = 0 ==> -> horizontal, pointing right
m_arrow2->setStyle(0);
m_arrow2->setSize(QGIArrow::getPrefArrowSize());
m_arrow2->setPos(extLineEnd);
@@ -240,7 +240,7 @@ void QGISectionLine::makeSymbolsISO()
QPointF dist = (m_start - m_end);
double lenDist = sqrt(dist.x()*dist.x() + dist.y()*dist.y());
QPointF distDir = dist / lenDist;
QPointF offset = m_extLen * distDir;
symPosStart = m_start + offset;
symPosEnd = m_end - offset;
@@ -256,7 +256,7 @@ void QGISectionLine::makeSymbolsISO()
m_symbol2->centerAt(symPosEnd);
}
void QGISectionLine::setBounds(double x1,double y1,double x2,double y2)
{
m_start = QPointF(x1,y1);
@@ -336,7 +336,7 @@ void QGISectionLine::setTools()
dashes << dot << space << dash << space;
// TODO for fancyness: calculate the offset so both arrows start with a
// TODO for fanciness: calculate the offset so both arrows start with a
// dash!
m_pen.setDashPattern(dashes);