25 #ifndef CONVERT_BASIC_SHAPES_TO_POLYGON_H
26 #define CONVERT_BASIC_SHAPES_TO_POLYGON_H
28 #include <geometry/shape_poly_set.h>
30 #include <wx/gdicmn.h>
37 enum RECT_CHAMFER_POSITIONS :
int
40 RECT_CHAMFER_TOP_LEFT = 1,
41 RECT_CHAMFER_TOP_RIGHT = 2,
42 RECT_CHAMFER_BOTTOM_LEFT = 4,
43 RECT_CHAMFER_BOTTOM_RIGHT = 8,
44 RECT_CHAMFER_ALL = RECT_CHAMFER_BOTTOM_RIGHT
45 | RECT_CHAMFER_BOTTOM_LEFT
46 | RECT_CHAMFER_TOP_RIGHT
47 | RECT_CHAMFER_TOP_LEFT
63 double aStartAngleDeg,
double aArcAngleDeg,
double aAccuracy,
79 int aError,
ERROR_LOC aErrorLoc,
int aMinSegCount = 0 );
93 int aError,
ERROR_LOC aErrorLoc,
int aMinSegCount = 0 );
115 int aMinSegCount = 0 );
133 double aRotation,
int aDeltaX,
int aDeltaY,
int aInflate,
161 double aRotation,
int aCornerRadius,
162 double aChamferRatio,
int aChamferCorners,
int aInflate,
191 int aWidth,
int aError,
ERROR_LOC aErrorLoc );
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Definition: shape_line_chain.h:81
Represent a set of closed polygons.
Definition: shape_poly_set.h:65
Definition: wx_compat.h:40
Definition: wx_compat.h:64
void TransformRoundChamferedRectToPolygon(SHAPE_POLY_SET &aCornerBuffer, const wxPoint &aPosition, const wxSize &aSize, double aRotation, int aCornerRadius, double aChamferRatio, int aChamferCorners, int aInflate, int aError, ERROR_LOC aErrorLoc)
Convert a rectangle with rounded corners and/or chamfered corners to a polygon.
Definition: convert_basic_shapes_to_polygon.cpp:437
void TransformOvalToPolygon(SHAPE_POLY_SET &aCornerBuffer, const wxPoint &aStart, const wxPoint &aEnd, int aWidth, int aError, ERROR_LOC aErrorLoc, int aMinSegCount)
Convert a oblong shape to a polygon, using multiple segments.
Definition: convert_basic_shapes_to_polygon.cpp:126
void TransformCircleToPolygon(SHAPE_LINE_CHAIN &aCornerBuffer, const wxPoint &aCenter, int aRadius, int aError, ERROR_LOC aErrorLoc, int aMinSegCount)
Convert a circle to a polygon, using multiple straight lines.
Definition: convert_basic_shapes_to_polygon.cpp:42
void TransformArcToPolygon(SHAPE_POLY_SET &aCornerBuffer, const wxPoint &aStart, const wxPoint &aMid, const wxPoint &aEnd, int aWidth, int aError, ERROR_LOC aErrorLoc)
Convert arc to multiple straight segments.
Definition: convert_basic_shapes_to_polygon.cpp:535
int ConvertArcToPolyline(SHAPE_LINE_CHAIN &aPolyline, VECTOR2I aCenter, int aRadius, double aStartAngleDeg, double aArcAngleDeg, double aAccuracy, ERROR_LOC aErrorLoc)
Generate a polyline to approximate a arc.
Definition: convert_basic_shapes_to_polygon.cpp:503
void TransformTrapezoidToPolygon(SHAPE_POLY_SET &aCornerBuffer, const wxPoint &aPosition, const wxSize &aSize, double aRotation, int aDeltaX, int aDeltaY, int aInflate, int aError, ERROR_LOC aErrorLoc)
Convert a rectangle or trapezoid to a polygon.
Definition: convert_basic_shapes_to_polygon.cpp:364
void TransformRingToPolygon(SHAPE_POLY_SET &aCornerBuffer, const wxPoint &aCentre, int aRadius, int aWidth, int aError, ERROR_LOC aErrorLoc)
Convert arcs to multiple straight segments.
Definition: convert_basic_shapes_to_polygon.cpp:679
a few functions useful in geometry calculations.
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
Definition: geometry_utils.h:45