KiCad PCB EDA Suite
board_items_to_polygon_shape_transform.cpp File Reference
#include <vector>
#include <fctsys.h>
#include <bezier_curves.h>
#include <base_units.h>
#include <draw_graphic_text.h>
#include <pcbnew.h>
#include <pcb_edit_frame.h>
#include <trigo.h>
#include <class_board.h>
#include <class_pad.h>
#include <class_track.h>
#include <class_drawsegment.h>
#include <class_pcb_text.h>
#include <class_zone.h>
#include <class_module.h>
#include <class_edge_mod.h>
#include <convert_basic_shapes_to_polygon.h>
#include <geometry/geometry_utils.h>

Go to the source code of this file.

Classes

struct  TSEGM_2_POLY_PRMS
 

Functions

static void addTextSegmToPoly (int x0, int y0, int xf, int yf, void *aData)
 
void CreateThermalReliefPadPolygon (SHAPE_POLY_SET &aCornerBuffer, const D_PAD &aPad, int aThermalGap, int aCopperThickness, int aMinThicknessValue, int aCircleToSegmentsCount, double aCorrectionFactor, double aThermalRot)
 Function CreateThermalReliefPadPolygon Add holes around a pad to create a thermal relief copper thickness is min (dx/2, aCopperWitdh) or min (dy/2, aCopperWitdh) More...
 

Variables

TSEGM_2_POLY_PRMS prms
 
double s_error_max = Millimeter2iu( 0.02 )
 

Function Documentation

static void addTextSegmToPoly ( int  x0,
int  y0,
int  xf,
int  yf,
void *  aData 
)
static

Definition at line 71 of file board_items_to_polygon_shape_transform.cpp.

References TSEGM_2_POLY_PRMS::m_cornerBuffer, TSEGM_2_POLY_PRMS::m_textCircle2SegmentCount, TSEGM_2_POLY_PRMS::m_textWidth, and TransformRoundedEndsSegmentToPolygon().

Referenced by MODULE::TransformGraphicShapesWithClearanceToPolygonSet(), MODULE::TransformGraphicTextWithClearanceToPolygonSet(), and TEXTE_PCB::TransformShapeWithClearanceToPolygonSet().

72 {
73  TSEGM_2_POLY_PRMS* prm = static_cast<TSEGM_2_POLY_PRMS*>( aData );
75  wxPoint( x0, y0), wxPoint( xf, yf ),
77 }
void TransformRoundedEndsSegmentToPolygon(SHAPE_POLY_SET &aCornerBuffer, wxPoint aStart, wxPoint aEnd, int aCircleToSegmentsCount, int aWidth)
Function TransformRoundedEndsSegmentToPolygon convert a segment with rounded ends to a polygon Conver...
void CreateThermalReliefPadPolygon ( SHAPE_POLY_SET aCornerBuffer,
const D_PAD aPad,
int  aThermalGap,
int  aCopperThickness,
int  aMinThicknessValue,
int  aCircleToSegmentsCount,
double  aCorrectionFactor,
double  aThermalRot 
)

Function CreateThermalReliefPadPolygon Add holes around a pad to create a thermal relief copper thickness is min (dx/2, aCopperWitdh) or min (dy/2, aCopperWitdh)

Parameters
aCornerBuffer= a buffer to store the polygon
aPad= the current pad used to create the thermal shape
aThermalGap= gap in thermal shape
aCopperThickness= stubs thickness in thermal shape
aMinThicknessValue= min copper thickness allowed
aCircleToSegmentsCount= the number of segments to approximate a circle
aCorrectionFactor= the correction to apply to circles radius to keep
aThermalRot= for rond pads the rotation of thermal stubs (450 usually for 45 deg.)

Definition at line 923 of file board_items_to_polygon_shape_transform.cpp.

References AddAngles(), PNS::angle(), SHAPE_POLY_SET::Append(), SHAPE_POLY_SET::BooleanSubtract(), delta, DIM, D_PAD::GetBoundingBox(), EDA_RECT::GetHeight(), D_PAD::GetOrientation(), D_PAD::GetShape(), D_PAD::GetSize(), EDA_RECT::GetWidth(), i, KiROUND(), max, min, SHAPE_POLY_SET::NewOutline(), PAD_SHAPE_CIRCLE, PAD_SHAPE_OVAL, PAD_SHAPE_RECT, PAD_SHAPE_ROUNDRECT, PAD_SHAPE_TRAPEZOID, SHAPE_POLY_SET::PM_FAST, SHAPE_POLY_SET::RemoveAllContours(), RotatePoint(), D_PAD::ShapePos(), SHAPE_POLY_SET::Simplify(), and D_PAD::TransformShapeWithClearanceToPolygon().

Referenced by ZONE_FILLER::buildZoneFeatureHoleList().

931 {
932  wxPoint corner, corner_end;
933  wxPoint padShapePos = aPad.ShapePos(); // Note: for pad having a shape offset,
934  // the pad position is NOT the shape position
935  wxSize copper_thickness;
936 
937  double delta = 3600.0 / aCircleToSegmentsCount; // rot angle in 0.1 degree
938 
939  /* Keep in account the polygon outline thickness
940  * aThermalGap must be increased by aMinThicknessValue/2 because drawing external outline
941  * with a thickness of aMinThicknessValue will reduce gap by aMinThicknessValue/2
942  */
943  aThermalGap += aMinThicknessValue / 2;
944 
945  /* Keep in account the polygon outline thickness
946  * copper_thickness must be decreased by aMinThicknessValue because drawing outlines
947  * with a thickness of aMinThicknessValue will increase real thickness by aMinThicknessValue
948  */
949  aCopperThickness -= aMinThicknessValue;
950 
951  if( aCopperThickness < 0 )
952  aCopperThickness = 0;
953 
954  int dx = aPad.GetSize().x / 2;
955  int dy = aPad.GetSize().y / 2;
956 
957  copper_thickness.x = std::min( dx, aCopperThickness );
958  copper_thickness.y = std::min( dy, aCopperThickness );
959 
960  switch( aPad.GetShape() )
961  {
962  case PAD_SHAPE_CIRCLE: // Add 4 similar holes
963  {
964  /* we create 4 copper holes and put them in position 1, 2, 3 and 4
965  * here is the area of the rectangular pad + its thermal gap
966  * the 4 copper holes remove the copper in order to create the thermal gap
967  * 4 ------ 1
968  * | |
969  * | |
970  * | |
971  * | |
972  * 3 ------ 2
973  * holes 2, 3, 4 are the same as hole 1, rotated 90, 180, 270 deg
974  */
975 
976  // Build the hole pattern, for the hole in the X >0, Y > 0 plane:
977  // The pattern roughtly is a 90 deg arc pie
978  std::vector <wxPoint> corners_buffer;
979 
980  // Radius of outer arcs of the shape corrected for arc approximation by lines
981  int outer_radius = KiROUND( (dx + aThermalGap) * aCorrectionFactor );
982 
983  // Crosspoint of thermal spoke sides, the first point of polygon buffer
984  corners_buffer.push_back( wxPoint( copper_thickness.x / 2, copper_thickness.y / 2 ) );
985 
986  // Add an intermediate point on spoke sides, to allow a > 90 deg angle between side
987  // and first seg of arc approx
988  corner.x = copper_thickness.x / 2;
989  int y = outer_radius - (aThermalGap / 4);
990  corner.y = KiROUND( sqrt( ( (double) y * y - (double) corner.x * corner.x ) ) );
991 
992  if( aThermalRot != 0 )
993  corners_buffer.push_back( corner );
994 
995  // calculate the starting point of the outter arc
996  corner.x = copper_thickness.x / 2;
997 
998  corner.y = KiROUND( sqrt( ( (double) outer_radius * outer_radius ) -
999  ( (double) corner.x * corner.x ) ) );
1000  RotatePoint( &corner, 90 ); // 9 degrees is the spoke fillet size
1001 
1002  // calculate the ending point of the outter arc
1003  corner_end.x = corner.y;
1004  corner_end.y = corner.x;
1005 
1006  // calculate intermediate points (y coordinate from corner.y to corner_end.y
1007  while( (corner.y > corner_end.y) && (corner.x < corner_end.x) )
1008  {
1009  corners_buffer.push_back( corner );
1010  RotatePoint( &corner, delta );
1011  }
1012 
1013  corners_buffer.push_back( corner_end );
1014 
1015  /* add an intermediate point, to avoid angles < 90 deg between last arc approx line
1016  * and radius line
1017  */
1018  corner.x = corners_buffer[1].y;
1019  corner.y = corners_buffer[1].x;
1020  corners_buffer.push_back( corner );
1021 
1022  // Now, add the 4 holes ( each is the pattern, rotated by 0, 90, 180 and 270 deg
1023  // aThermalRot = 450 (45.0 degrees orientation) work fine.
1024  double angle_pad = aPad.GetOrientation(); // Pad orientation
1025  double th_angle = aThermalRot;
1026 
1027  for( unsigned ihole = 0; ihole < 4; ihole++ )
1028  {
1029  aCornerBuffer.NewOutline();
1030 
1031  for( unsigned ii = 0; ii < corners_buffer.size(); ii++ )
1032  {
1033  corner = corners_buffer[ii];
1034  RotatePoint( &corner, th_angle + angle_pad ); // Rotate by segment angle and pad orientation
1035  corner += padShapePos;
1036  aCornerBuffer.Append( corner.x, corner.y );
1037  }
1038 
1039  th_angle += 900; // Note: th_angle in in 0.1 deg.
1040  }
1041  }
1042  break;
1043 
1044  case PAD_SHAPE_OVAL:
1045  {
1046  // Oval pad support along the lines of round and rectangular pads
1047  std::vector <wxPoint> corners_buffer; // Polygon buffer as vector
1048 
1049  dx = (aPad.GetSize().x / 2) + aThermalGap; // Cutout radius x
1050  dy = (aPad.GetSize().y / 2) + aThermalGap; // Cutout radius y
1051 
1052  wxPoint shape_offset;
1053 
1054  // We want to calculate an oval shape with dx > dy.
1055  // if this is not the case, exchange dx and dy, and rotate the shape 90 deg.
1056  int supp_angle = 0;
1057 
1058  if( dx < dy )
1059  {
1060  std::swap( dx, dy );
1061  supp_angle = 900;
1062  std::swap( copper_thickness.x, copper_thickness.y );
1063  }
1064 
1065  int deltasize = dx - dy; // = distance between shape position and the 2 demi-circle ends centre
1066  // here we have dx > dy
1067  // Radius of outer arcs of the shape:
1068  int outer_radius = dy; // The radius of the outer arc is radius end + aThermalGap
1069 
1070  // Some coordinate fiddling, depending on the shape offset direction
1071  shape_offset = wxPoint( deltasize, 0 );
1072 
1073  // Crosspoint of thermal spoke sides, the first point of polygon buffer
1074  corner.x = copper_thickness.x / 2;
1075  corner.y = copper_thickness.y / 2;
1076  corners_buffer.push_back( corner );
1077 
1078  // Arc start point calculation, the intersecting point of cutout arc and thermal spoke edge
1079  // If copper thickness is more than shape offset, we need to calculate arc intercept point.
1080  if( copper_thickness.x > deltasize )
1081  {
1082  corner.x = copper_thickness.x / 2;
1083  corner.y = KiROUND( sqrt( ( (double) outer_radius * outer_radius ) -
1084  ( (double) ( corner.x - delta ) * ( corner.x - deltasize ) ) ) );
1085  corner.x -= deltasize;
1086 
1087  /* creates an intermediate point, to have a > 90 deg angle
1088  * between the side and the first segment of arc approximation
1089  */
1090  wxPoint intpoint = corner;
1091  intpoint.y -= aThermalGap / 4;
1092  corners_buffer.push_back( intpoint + shape_offset );
1093  RotatePoint( &corner, 90 ); // 9 degrees of thermal fillet
1094  }
1095  else
1096  {
1097  corner.x = copper_thickness.x / 2;
1098  corner.y = outer_radius;
1099  corners_buffer.push_back( corner );
1100  }
1101 
1102  // Add an intermediate point on spoke sides, to allow a > 90 deg angle between side
1103  // and first seg of arc approx
1104  wxPoint last_corner;
1105  last_corner.y = copper_thickness.y / 2;
1106  int px = outer_radius - (aThermalGap / 4);
1107  last_corner.x =
1108  KiROUND( sqrt( ( ( (double) px * px ) - (double) last_corner.y * last_corner.y ) ) );
1109 
1110  // Arc stop point calculation, the intersecting point of cutout arc and thermal spoke edge
1111  corner_end.y = copper_thickness.y / 2;
1112  corner_end.x =
1113  KiROUND( sqrt( ( (double) outer_radius *
1114  outer_radius ) - ( (double) corner_end.y * corner_end.y ) ) );
1115  RotatePoint( &corner_end, -90 ); // 9 degrees of thermal fillet
1116 
1117  // calculate intermediate arc points till limit is reached
1118  while( (corner.y > corner_end.y) && (corner.x < corner_end.x) )
1119  {
1120  corners_buffer.push_back( corner + shape_offset );
1121  RotatePoint( &corner, delta );
1122  }
1123 
1124  //corners_buffer.push_back(corner + shape_offset); // TODO: about one mil geometry error forms somewhere.
1125  corners_buffer.push_back( corner_end + shape_offset );
1126  corners_buffer.push_back( last_corner + shape_offset ); // Enabling the line above shows intersection point.
1127 
1128  /* Create 2 holes, rotated by pad rotation.
1129  */
1130  double angle = aPad.GetOrientation() + supp_angle;
1131 
1132  for( int irect = 0; irect < 2; irect++ )
1133  {
1134  aCornerBuffer.NewOutline();
1135  for( unsigned ic = 0; ic < corners_buffer.size(); ic++ )
1136  {
1137  wxPoint cpos = corners_buffer[ic];
1138  RotatePoint( &cpos, angle );
1139  cpos += padShapePos;
1140  aCornerBuffer.Append( cpos.x, cpos.y );
1141  }
1142 
1143  angle = AddAngles( angle, 1800 ); // this is calculate hole 3
1144  }
1145 
1146  // Create holes, that are the mirrored from the previous holes
1147  for( unsigned ic = 0; ic < corners_buffer.size(); ic++ )
1148  {
1149  wxPoint swap = corners_buffer[ic];
1150  swap.x = -swap.x;
1151  corners_buffer[ic] = swap;
1152  }
1153 
1154  // Now add corner 4 and 2 (2 is the corner 4 rotated by 180 deg
1155  angle = aPad.GetOrientation() + supp_angle;
1156 
1157  for( int irect = 0; irect < 2; irect++ )
1158  {
1159  aCornerBuffer.NewOutline();
1160 
1161  for( unsigned ic = 0; ic < corners_buffer.size(); ic++ )
1162  {
1163  wxPoint cpos = corners_buffer[ic];
1164  RotatePoint( &cpos, angle );
1165  cpos += padShapePos;
1166  aCornerBuffer.Append( cpos.x, cpos.y );
1167  }
1168 
1169  angle = AddAngles( angle, 1800 );
1170  }
1171  }
1172  break;
1173 
1174  case PAD_SHAPE_ROUNDRECT: // thermal shape is the same for round rect and rect.
1175  case PAD_SHAPE_RECT:
1176  {
1177  /* we create 4 copper holes and put them in position 1, 2, 3 and 4
1178  * here is the area of the rectangular pad + its thermal gap
1179  * the 4 copper holes remove the copper in order to create the thermal gap
1180  * 4 ------ 1
1181  * | |
1182  * | |
1183  * | |
1184  * | |
1185  * 3 ------ 2
1186  * hole 3 is the same as hole 1, rotated 180 deg
1187  * hole 4 is the same as hole 2, rotated 180 deg and is the same as hole 1, mirrored
1188  */
1189 
1190  // First, create a rectangular hole for position 1 :
1191  // 2 ------- 3
1192  // | |
1193  // | |
1194  // | |
1195  // 1 -------4
1196 
1197  // Modified rectangles with one corner rounded. TODO: merging with oval thermals
1198  // and possibly round too.
1199 
1200  std::vector <wxPoint> corners_buffer; // Polygon buffer as vector
1201 
1202  dx = (aPad.GetSize().x / 2) + aThermalGap; // Cutout radius x
1203  dy = (aPad.GetSize().y / 2) + aThermalGap; // Cutout radius y
1204 
1205  // The first point of polygon buffer is left lower corner, second the crosspoint of
1206  // thermal spoke sides, the third is upper right corner and the rest are rounding
1207  // vertices going anticlockwise. Note the inveted Y-axis in CG.
1208  corners_buffer.push_back( wxPoint( -dx, -(aThermalGap / 4 + copper_thickness.y / 2) ) ); // Adds small miters to zone
1209  corners_buffer.push_back( wxPoint( -(dx - aThermalGap / 4), -copper_thickness.y / 2 ) ); // fill and spoke corner
1210  corners_buffer.push_back( wxPoint( -copper_thickness.x / 2, -copper_thickness.y / 2 ) );
1211  corners_buffer.push_back( wxPoint( -copper_thickness.x / 2, -(dy - aThermalGap / 4) ) );
1212  corners_buffer.push_back( wxPoint( -(aThermalGap / 4 + copper_thickness.x / 2), -dy ) );
1213 
1214  double angle = aPad.GetOrientation();
1215  int rounding_radius = KiROUND( aThermalGap * aCorrectionFactor ); // Corner rounding radius
1216 
1217  for( int i = 0; i < aCircleToSegmentsCount / 4 + 1; i++ )
1218  {
1219  wxPoint corner_position = wxPoint( 0, -rounding_radius );
1220 
1221  // Start at half increment offset
1222  RotatePoint( &corner_position, 1800.0 / aCircleToSegmentsCount );
1223  double angle_pg = i * delta;
1224 
1225  RotatePoint( &corner_position, angle_pg ); // Rounding vector rotation
1226  corner_position -= aPad.GetSize() / 2; // Rounding vector + Pad corner offset
1227 
1228  corners_buffer.push_back( wxPoint( corner_position.x, corner_position.y ) );
1229  }
1230 
1231  for( int irect = 0; irect < 2; irect++ )
1232  {
1233  aCornerBuffer.NewOutline();
1234 
1235  for( unsigned ic = 0; ic < corners_buffer.size(); ic++ )
1236  {
1237  wxPoint cpos = corners_buffer[ic];
1238  RotatePoint( &cpos, angle ); // Rotate according to module orientation
1239  cpos += padShapePos; // Shift origin to position
1240  aCornerBuffer.Append( cpos.x, cpos.y );
1241  }
1242 
1243  angle = AddAngles( angle, 1800 ); // this is calculate hole 3
1244  }
1245 
1246  // Create holes, that are the mirrored from the previous holes
1247  for( unsigned ic = 0; ic < corners_buffer.size(); ic++ )
1248  {
1249  wxPoint swap = corners_buffer[ic];
1250  swap.x = -swap.x;
1251  corners_buffer[ic] = swap;
1252  }
1253 
1254  // Now add corner 4 and 2 (2 is the corner 4 rotated by 180 deg
1255  for( int irect = 0; irect < 2; irect++ )
1256  {
1257  aCornerBuffer.NewOutline();
1258 
1259  for( unsigned ic = 0; ic < corners_buffer.size(); ic++ )
1260  {
1261  wxPoint cpos = corners_buffer[ic];
1262  RotatePoint( &cpos, angle );
1263  cpos += padShapePos;
1264  aCornerBuffer.Append( cpos.x, cpos.y );
1265  }
1266 
1267  angle = AddAngles( angle, 1800 );
1268  }
1269  }
1270  break;
1271 
1272  case PAD_SHAPE_TRAPEZOID:
1273  {
1274  SHAPE_POLY_SET antipad; // The full antipad area
1275 
1276  // We need a length to build the stubs of the thermal reliefs
1277  // the value is not very important. The pad bounding box gives a reasonable value
1278  EDA_RECT bbox = aPad.GetBoundingBox();
1279  int stub_len = std::max( bbox.GetWidth(), bbox.GetHeight() );
1280 
1281  aPad.TransformShapeWithClearanceToPolygon( antipad, aThermalGap,
1282  aCircleToSegmentsCount, aCorrectionFactor );
1283 
1284  SHAPE_POLY_SET stub; // A basic stub ( a rectangle)
1285  SHAPE_POLY_SET stubs; // the full stubs shape
1286 
1287 
1288  // We now substract the stubs (connections to the copper zone)
1289  //ClipperLib::Clipper clip_engine;
1290  // Prepare a clipping transform
1291  //clip_engine.AddPath( antipad, ClipperLib::ptSubject, true );
1292 
1293  // Create stubs and add them to clipper engine
1294  wxPoint stubBuffer[4];
1295  stubBuffer[0].x = stub_len;
1296  stubBuffer[0].y = copper_thickness.y/2;
1297  stubBuffer[1] = stubBuffer[0];
1298  stubBuffer[1].y = -copper_thickness.y/2;
1299  stubBuffer[2] = stubBuffer[1];
1300  stubBuffer[2].x = -stub_len;
1301  stubBuffer[3] = stubBuffer[2];
1302  stubBuffer[3].y = copper_thickness.y/2;
1303 
1304  stub.NewOutline();
1305 
1306  for( unsigned ii = 0; ii < DIM( stubBuffer ); ii++ )
1307  {
1308  wxPoint cpos = stubBuffer[ii];
1309  RotatePoint( &cpos, aPad.GetOrientation() );
1310  cpos += padShapePos;
1311  stub.Append( cpos.x, cpos.y );
1312  }
1313 
1314  stubs.Append( stub );
1315 
1316  stubBuffer[0].y = stub_len;
1317  stubBuffer[0].x = copper_thickness.x/2;
1318  stubBuffer[1] = stubBuffer[0];
1319  stubBuffer[1].x = -copper_thickness.x/2;
1320  stubBuffer[2] = stubBuffer[1];
1321  stubBuffer[2].y = -stub_len;
1322  stubBuffer[3] = stubBuffer[2];
1323  stubBuffer[3].x = copper_thickness.x/2;
1324 
1325  stub.RemoveAllContours();
1326  stub.NewOutline();
1327 
1328  for( unsigned ii = 0; ii < DIM( stubBuffer ); ii++ )
1329  {
1330  wxPoint cpos = stubBuffer[ii];
1331  RotatePoint( &cpos, aPad.GetOrientation() );
1332  cpos += padShapePos;
1333  stub.Append( cpos.x, cpos.y );
1334  }
1335 
1336  stubs.Append( stub );
1338 
1339  antipad.BooleanSubtract( stubs, SHAPE_POLY_SET::PM_FAST );
1340  aCornerBuffer.Append( antipad );
1341 
1342  break;
1343  }
1344 
1345  default:
1346  ;
1347  }
1348 }
#define DIM(x)
of elements in an array
Definition: macros.h:98
static int KiROUND(double v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: common.h:120
int GetHeight() const
Definition: eda_rect.h:118
void RotatePoint(int *pX, int *pY, double angle)
Definition: trigo.cpp:216
PAD_SHAPE_T GetShape() const
Function GetShape.
Definition: class_pad.h:216
static const int delta[8][2]
Definition: solve.cpp:112
void TransformShapeWithClearanceToPolygon(SHAPE_POLY_SET &aCornerBuffer, int aClearanceValue, int aCircleToSegmentsCount, double aCorrectionFactor, bool ignoreLineWidth=false) const override
Function TransformShapeWithClearanceToPolygon Convert the pad shape to a closed polygon Used in filli...
T AddAngles(T a1, T2 a2)
Add two angles (keeping the result normalized). T2 is here.
Definition: trigo.h:288
Class SHAPE_POLY_SET.
const wxSize & GetSize() const
Definition: class_pad.h:269
void Simplify(POLYGON_MODE aFastMode)
Simplifies the polyset (merges overlapping polys, eliminates degeneracy/self-intersections) For aFast...
int NewOutline()
Creates a new empty polygon in the set and returns its index
#define max(a, b)
Definition: auxiliary.h:86
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
size_t i
Definition: json11.cpp:597
void RemoveAllContours()
Removes all outlines & holes (clears) the polygon set.
double GetOrientation() const
Function GetOrientation returns the rotation angle of the pad in tenths of degrees, but soon degrees.
Definition: class_pad.h:382
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
int GetWidth() const
Definition: eda_rect.h:117
wxPoint ShapePos() const
Definition: class_pad.cpp:516
void BooleanSubtract(const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode)
Performs boolean polyset difference For aFastMode meaning, see function booleanOp ...
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
Definition: class_pad.cpp:215
#define min(a, b)
Definition: auxiliary.h:85
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Appends a vertex at the end of the given outline/hole (default: the last outline) ...

Variable Documentation

double s_error_max = Millimeter2iu( 0.02 )