### Simplify Poly

Posted:

**Tue Jun 23, 2020 8:08 pm**Andrew,

I make use of poly.simplify(Tolerance)

If I swap in units I have to keep track of it.

(0,001 in Inch is not the same as 0,001 in mm)

If it is an angle tolerance, are that degrees or radians

I failed in the quest for the answer.

In the GUI the Tolerance is the 'Maximum Deviation from original polyline'

AKA a distance from any node to the line segment bypassing that node.

Checked it, and it is a distance.

In RPolyline.h: ... Also a distance value RS::PointTolerance but default rather small.

bool simplify(double tolerance = RS::PointTolerance);

poly.simplify(); will be of little to no use in a real world situation.

eg. isSplineEntity section of Explode.explodeEntity of Explode.js.

There has to be a default of course and while its an absolute the minimum is the safest choise ever.

https://qcad.org/rsforum/viewtopic.php? ... ify#p16745

https://qcad.org/doc/qcad/latest/refere ... neSimplify

Speek of maximum angle deviation.

https://qcad.org/doc/qcad/3.0/developer ... 25c6837d3f

https://qcad.org/doc/qcad/3.0/developer ... 11b5405c1f

Speek of angle tolerance what is about the same in the correct context.

Simplify has two entries in QCAD ini, an angle and the last succesfully

used distance tolerance in my native format:

PolylineSimplify (PRO) has an angle entry in QCAD ini:
What looks like the entries of an init section.

As Pro user, lets say I am a bit confused.

Regards,

CVH

I make use of poly.simplify(Tolerance)

If I swap in units I have to keep track of it.

(0,001 in Inch is not the same as 0,001 in mm)

If it is an angle tolerance, are that degrees or radians

I failed in the quest for the answer.

In the GUI the Tolerance is the 'Maximum Deviation from original polyline'

AKA a distance from any node to the line segment bypassing that node.

Checked it, and it is a distance.

In RPolyline.h: ... Also a distance value RS::PointTolerance but default rather small.

bool simplify(double tolerance = RS::PointTolerance);

poly.simplify(); will be of little to no use in a real world situation.

eg. isSplineEntity section of Explode.explodeEntity of Explode.js.

There has to be a default of course and while its an absolute the minimum is the safest choise ever.

https://qcad.org/rsforum/viewtopic.php? ... ify#p16745

https://qcad.org/doc/qcad/latest/refere ... neSimplify

Speek of maximum angle deviation.

https://qcad.org/doc/qcad/3.0/developer ... 25c6837d3f

https://qcad.org/doc/qcad/3.0/developer ... 11b5405c1f

Speek of angle tolerance what is about the same in the correct context.

Simplify has two entries in QCAD ini, an angle and the last succesfully

used distance tolerance in my native format:

Code: Select all

```
[Simplify]
AngleTolerance=100
Tolerance="0,19"
```

PolylineSimplify (PRO) has an angle entry in QCAD ini:

Code: Select all

```
[PolylineSimplify]
AngleTolerance=10
VisibleInMenu=true
VisibleInToolBar=true
VisibleInCadToolBar=true
VisibleInMatrixPanel=true
```

As Pro user, lets say I am a bit confused.

Regards,

CVH