GCodeAPI.Point Class Reference

This is an additional class which represents a Point. More...

Public Member Functions

 Point (double x, double y)
 Constructs a new Point object with the specified points. More...
 
override string ToString ()
 

Static Public Member Functions

static double Distance (Point p1, Point p2)
 Returns the distance between two points. More...
 
static double Distance (double x1, double y1, double x2, double y2)
 Returns the distance between two points. More...
 
static Point PolarToCartesian (double r, double deg, double xOffset=0, double yOffset=0)
 Converts a point from Polar coordinate system to Cartesian coordinate system More...
 
static double [] CartesianToPolar (double x, double y, double xOffset=0, double yOffset=0)
 Converts a point from Cartesian coordinate system to Polar coordinate system More...
 

Properties

double X [get, set]
 Sets or gets the X position. More...
 
double Y [get, set]
 Sets or gets the Y position. More...
 

Detailed Description

This is an additional class which represents a Point.

Constructor & Destructor Documentation

◆ Point()

GCodeAPI.Point.Point ( double  x,
double  y 
)

Constructs a new Point object with the specified points.

Parameters
xX position
yY position

Member Function Documentation

◆ CartesianToPolar()

static double [] GCodeAPI.Point.CartesianToPolar ( double  x,
double  y,
double  xOffset = 0,
double  yOffset = 0 
)
static

Converts a point from Cartesian coordinate system to Polar coordinate system

Parameters
xCartesian X coordinate
yCartesian Y coordinate
xOffsetx offset
yOffsety offset
Returns
double[2] array where first is radius and second angle in degree

◆ Distance() [1/2]

static double GCodeAPI.Point.Distance ( Point  p1,
Point  p2 
)
static

Returns the distance between two points.

Parameters
p1Point 1
p2Point 2
Returns

◆ Distance() [2/2]

static double GCodeAPI.Point.Distance ( double  x1,
double  y1,
double  x2,
double  y2 
)
static

Returns the distance between two points.

Parameters
x1X position of first point.
y1Y position of first point.
x2X position of second point.
y2Y position of second point.
Returns

◆ PolarToCartesian()

static Point GCodeAPI.Point.PolarToCartesian ( double  r,
double  deg,
double  xOffset = 0,
double  yOffset = 0 
)
static

Converts a point from Polar coordinate system to Cartesian coordinate system

Parameters
rdistance
degangle in degree
xOffsetx offset
yOffsety offest
Returns

Property Documentation

◆ X

double GCodeAPI.Point.X
getset

Sets or gets the X position.

◆ Y

double GCodeAPI.Point.Y
getset

Sets or gets the Y position.


The documentation for this class was generated from the following file: