Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FormerLurker/ArcWelderLib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFormerLurker <hochgebe@gmail.com>2020-11-06 19:43:13 +0300
committerFormerLurker <hochgebe@gmail.com>2020-11-06 19:43:13 +0300
commit91633ba765214d1c6eece514e2dd2d0e898be8b4 (patch)
tree21ed3e43d72bc89efb0f363464ec26ee5e3ce536 /ArcWelder/segmented_arc.h
parent395c472dfc6080b0b0b2fca9f1dba6eeb46c21cf (diff)
Implementations for #8, #9, #10, #11.
Diffstat (limited to 'ArcWelder/segmented_arc.h')
-rw-r--r--ArcWelder/segmented_arc.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/ArcWelder/segmented_arc.h b/ArcWelder/segmented_arc.h
index 352deab..179d7af 100644
--- a/ArcWelder/segmented_arc.h
+++ b/ArcWelder/segmented_arc.h
@@ -30,12 +30,19 @@
#define GCODE_CHAR_BUFFER_SIZE 100
#define DEFAULT_MAX_RADIUS_MM 1000000.0 // 1km
+//#define DEFAULT_MAX_RADIUS_MM 10000.0 // 10M
class segmented_arc :
public segmented_shape
{
public:
segmented_arc();
- segmented_arc(int min_segments = DEFAULT_MIN_SEGMENTS, int max_segments = DEFAULT_MAX_SEGMENTS, double resolution_mm = DEFAULT_RESOLUTION_MM, double max_radius_mm = DEFAULT_MAX_RADIUS_MM);
+ segmented_arc(
+ int min_segments = DEFAULT_MIN_SEGMENTS,
+ int max_segments = DEFAULT_MAX_SEGMENTS,
+ double resolution_mm = DEFAULT_RESOLUTION_MM,
+ double path_tolerance_percnet = ARC_LENGTH_PERCENT_TOLERANCE_DEFAULT,
+ double max_radius_mm = DEFAULT_MAX_RADIUS_MM
+ );
virtual ~segmented_arc();
virtual bool try_add_point(point p, double e_relative);
std::string get_shape_gcode_absolute(double e, double f);
@@ -51,9 +58,11 @@ public:
private:
bool try_add_point_internal_(point p, double pd);
bool does_circle_fit_points_(circle& c) const;
+ bool does_arc_fit_points(circle& c) const;
bool try_get_arc_(const circle& c, arc& target_arc);
+ bool is_point_on_arc(const arc& a, const point & p) const;
std::string get_shape_gcode_(bool has_e, double e, double f) const;
circle arc_circle_;
double max_radius_mm_;
-};
+};