MaxAngleArcSegmentation: Difference between revisions

From Compost Wiki
Jump to navigation Jump to search
Dannym (talk | contribs)
FabienT (talk | contribs)
No edit summary
 
Line 12: Line 12:
2) Replace EachQuadrant/NextQuadrant with EachArcSegment/NextArcSegment
2) Replace EachQuadrant/NextQuadrant with EachArcSegment/NextArcSegment


3) Add a call to [[SetArcSegmentMaxAngle]]('180') before EachArcSegment command in the new doArc function. Set the paramater to the maximum angle desired. 180 is common.
3) Add a call to [[SetArcSegmentMaxAngle]]('180') before EachArcSegment command in the new doArc function. Set the parameter to the maximum angle desired. 180 is common.


4) If the post supports Rotary Milling Segmentation, move the following code from progStart to the doSegmentArc function with the correct tolerances.
4) If the post supports Rotary Milling Segmentation, move the following code from progStart to the doSegmentArc function with the correct tolerances.

Latest revision as of 18:34, 10 October 2024

Max Angle Arc Segmentaiton

There are a class of customers/machines that need to limit the maximum arc size to a specific angular limit. In the past posts have used the EACHQuadrant/NEXTQuadrant loop to do this. Unfortunately due to how this loop works it has the problem of creating small arc segments that exist just past one of the quadrant boundaries. This arc is often too small to output on a CNC machine and is difficult for the post to suppress.

To replace this, the EACHArcSegment/NEXTArcSegment loop has been give a new mode that is able to segment angles into equal segments based on a maximum tangent angle.

Implementation

Converting a Quad Stopping post to an equal segment post is rather trivial.

1) Rename doQuadrantArc to doSegmentArc

2) Replace EachQuadrant/NextQuadrant with EachArcSegment/NextArcSegment

3) Add a call to SetArcSegmentMaxAngle('180') before EachArcSegment command in the new doArc function. Set the parameter to the maximum angle desired. 180 is common.

4) If the post supports Rotary Milling Segmentation, move the following code from progStart to the doSegmentArc function with the correct tolerances.

 IF MetricOutput?
   SetArcSegmentAccuracy('.0127')
 ELSE
   SetArcSegmentAccuracy('.0005')
 END