87#define MIN_BULGE 0.0218
89#define SCALE_FACTOR(x) (x)
101 m_maxX =
m_maxY = std::numeric_limits<double>::lowest();
109 m_layers.push_back( std::move( layer0 ) );
126 catch(
const std::bad_alloc& )
134 ReportMsg(
_(
"Memory was exhausted trying to load the DXF, it may be too large." ) );
146 catch(
const std::bad_alloc& )
154 ReportMsg(
_(
"Memory was exhausted trying to load the DXF, it may be too large." ) );
223 FILE* fp = wxFopen( aFile, wxT(
"rt" ) );
230 bool success = dxf_reader.in( fp,
this );
240 std::string str(
reinterpret_cast<char*
>( aMemBuffer.GetData() ), aMemBuffer.GetDataLen() );
244 bool success = dxf_reader.in( str,
this );
300 wxString
name = wxString::FromUTF8( aData.name.c_str() );
302 int lw = attributes.getWidth();
307 std::unique_ptr<DXF_IMPORT_LAYER> layer = std::make_unique<DXF_IMPORT_LAYER>(
name, lw );
309 m_layers.push_back( std::move( layer ) );
317 wxString description =
From_UTF8( data.description.c_str() );
340 wxString layerName = wxString::FromUTF8( aLayerName.c_str() );
342 if( !layerName.IsEmpty() )
345 [layerName](
const auto& it )
347 return it->m_layerName == layerName;
351 layer = resultIt->get();
361 wxString blockName = wxString::FromUTF8( aBlockName.c_str() );
363 if( !blockName.IsEmpty() )
366 [blockName](
const auto& it )
368 return it->m_name == blockName;
372 block = resultIt->get();
382 wxString styleName = wxString::FromUTF8( aStyleName.c_str() );
384 if( !styleName.IsEmpty() )
387 [styleName](
const auto& it )
389 return it->m_name == styleName;
393 style = resultIt->get();
410 bufferToUse->
AddLine( start, end, lineWidth );
442 if( aData.startWidth > 0.0 )
443 lineWidth = aData.startWidth / 100.0;
444 else if ( aData.endWidth > 0.0 )
445 lineWidth = aData.endWidth / 100.0;
447 const DL_VertexData* vertex = &aData;
507 wxString
name = wxString::FromUTF8( aData.name.c_str() );
509 std::unique_ptr<DXF_IMPORT_BLOCK> block = std::make_unique<DXF_IMPORT_BLOCK>(
name, aData.bpx,
512 m_blocks.push_back( std::move( block ) );
527 if( block ==
nullptr )
544 for(
const std::unique_ptr<IMPORTED_SHAPE>& shape : block->
m_buffer.
GetShapes() )
546 std::unique_ptr<IMPORTED_SHAPE> newShape = shape->clone();
548 newShape->Transform( trans, translation );
566 bufferToUse->
AddCircle( center,
mapDim( aData.radius ), lineWidth,
false );
591 std::swap( startangle, endangle );
595 VECTOR2D startPoint( aData.radius, 0.0 );
598 mapY( startPoint.
y + centerCoords.
y ) );
601 EDA_ANGLE angle = -( endangle - startangle );
611 bufferToUse->
AddArc( center, arcStart, angle, lineWidth );
642 if( startAngle > endAngle )
645 if( aData.ratio == 1.0 )
649 if( startAngle == endAngle )
651 DL_CircleData circle( aData.cx, aData.cy, aData.cz, radius );
661 DL_ArcData arc( aData.cx, aData.cy, aData.cz, radius, startAngle.
AsDegrees(),
670 std::vector<BEZIER<double>> splines;
671 ELLIPSE<double> ellipse( center, major, aData.ratio, startAngle, endAngle );
682 bufferToUse->
AddSpline( b.Start, b.C1, b.C2, b.End, lineWidth );
695 std::isnan( aData.apy ) ? 0 : aData.apy,
696 std::isnan( aData.apz ) ? 0 : aData.apz ) );
701 if( aData.vJustification != 0 || aData.hJustification != 0 || aData.hJustification == 4 )
703 if( aData.hJustification != 3 && aData.hJustification != 5 )
715 double textHeight =
mapDim( aData.height );
717 double charWidth = textHeight * 0.9;
719 if( style !=
nullptr )
722 double textWidth = charWidth *
text.length();
723 double textThickness = textHeight/8.0;
733 switch( aData.vJustification )
739 topLeft.
y = textHeight;
740 topRight.
y = textHeight;
746 bottomRight.
y = -textHeight / 2.0;
747 bottomLeft.
y = -textHeight / 2.0;
748 topLeft.
y = textHeight / 2.0;
749 topRight.
y = textHeight / 2.0;
755 bottomLeft.
y = -textHeight;
756 bottomRight.
y = -textHeight;
760 switch( aData.hJustification )
767 bottomRight.
x = textWidth;
768 topRight.
x = textWidth;
775 bottomLeft.
x = -textWidth / 2.0;
776 topLeft.
x = -textWidth / 2.0;
777 bottomRight.
x = textWidth / 2.0;
778 topRight.
x = textWidth / 2.0;
784 bottomLeft.
x = -textWidth;
785 topLeft.
x = -textWidth;
790 wxString sty = wxString::FromUTF8( aData.style.c_str() );
793 if( aData.textgen == 2 )
796 }
else if( aData.textgen == 4 )
806 double angle_degree = aData.angle * 180 / M_PI;
809 double angleInRads = angle_degree * M_PI / 180.0;
810 double cosine = cos(angleInRads);
811 double sine = sin(angleInRads);
815 bufferToUse->
AddText( refPoint,
text, textHeight, charWidth, textThickness, angle_degree,
816 hJustify, vJustify );
819 bottomLeft.
x = bottomLeft.
x * cosine - bottomLeft.
y * sine;
820 bottomLeft.
y = bottomLeft.
x * sine + bottomLeft.
y * cosine;
822 bottomRight.
x = bottomRight.
x * cosine - bottomRight.
y * sine;
823 bottomRight.
y = bottomRight.
x * sine + bottomRight.
y * cosine;
825 topLeft.
x = topLeft.
x * cosine - topLeft.
y * sine;
826 topLeft.
y = topLeft.
x * sine + topLeft.
y * cosine;
828 topRight.
x = topRight.
x * cosine - topRight.
y * sine;
829 topRight.
y = topRight.
x * sine + topRight.
y * cosine;
831 bottomLeft += refPoint;
832 bottomRight += refPoint;
834 topRight += refPoint;
861 double textHeight =
mapDim( aData.height );
864 double charWidth = textHeight * 0.9;
866 if( style !=
nullptr )
869 double textWidth = charWidth *
text.length();
870 double textThickness = textHeight/8.0;
885 if( aData.attachmentPoint <= 3 )
889 bottomLeft.
y = -textHeight;
890 bottomRight.
y = -textHeight;
892 else if( aData.attachmentPoint <= 6 )
896 bottomRight.
y = -textHeight / 2.0;
897 bottomLeft.
y = -textHeight / 2.0;
898 topLeft.
y = textHeight / 2.0;
899 topRight.
y = textHeight / 2.0;
905 topLeft.
y = textHeight;
906 topRight.
y = textHeight;
909 if( aData.attachmentPoint % 3 == 1 )
913 bottomRight.
x = textWidth;
914 topRight.
x = textWidth;
916 else if( aData.attachmentPoint % 3 == 2 )
920 bottomLeft.
x = -textWidth / 2.0;
921 topLeft.
x = -textWidth / 2.0;
922 bottomRight.
x = textWidth / 2.0;
923 topRight.
x = textWidth / 2.0;
929 bottomLeft.
x = -textWidth;
930 topLeft.
x = -textWidth;
934 if( data.alignH == 1 )
938 else if( data.alignH == 3 )
947 if( aData.alignV == 1 )
959 double angle_degree = aData.angle * 180/M_PI;
962 double angleInRads = angle_degree * M_PI / 180.0;
963 double cosine = cos(angleInRads);
964 double sine = sin(angleInRads);
969 bufferToUse->
AddText( textpos,
text, textHeight, charWidth, textThickness, angle_degree,
970 hJustify, vJustify );
972 bottomLeft.
x = bottomLeft.
x * cosine - bottomLeft.
y * sine;
973 bottomLeft.
y = bottomLeft.
x * sine + bottomLeft.
y * cosine;
975 bottomRight.
x = bottomRight.
x * cosine - bottomRight.
y * sine;
976 bottomRight.
y = bottomRight.
x * sine + bottomRight.
y * cosine;
978 topLeft.
x = topLeft.
x * cosine - topLeft.
y * sine;
979 topLeft.
y = topLeft.
x * sine + topLeft.
y * cosine;
981 topRight.
x = topRight.
x * cosine - topRight.
y * sine;
982 topRight.
y = topRight.
x * sine + topRight.
y * cosine;
984 bottomLeft += textpos;
985 bottomRight += textpos;
1004 case DXF_IMPORT_UNITS::INCHES:
scale = 25.4;
break;
1005 case DXF_IMPORT_UNITS::FEET:
scale = 304.8;
break;
1006 case DXF_IMPORT_UNITS::MILLIMETERS:
scale = 1.0;
break;
1007 case DXF_IMPORT_UNITS::CENTIMETERS:
scale = 10.0;
break;
1008 case DXF_IMPORT_UNITS::METERS:
scale = 1000.0;
break;
1009 case DXF_IMPORT_UNITS::MICROINCHES:
scale = 2.54e-5;
break;
1010 case DXF_IMPORT_UNITS::MILS:
scale = 0.0254;
break;
1011 case DXF_IMPORT_UNITS::YARDS:
scale = 914.4;
break;
1012 case DXF_IMPORT_UNITS::ANGSTROMS:
scale = 1.0e-7;
break;
1013 case DXF_IMPORT_UNITS::NANOMETERS:
scale = 1.0e-6;
break;
1014 case DXF_IMPORT_UNITS::MICRONS:
scale = 1.0e-3;
break;
1015 case DXF_IMPORT_UNITS::DECIMETERS:
scale = 100.0;
break;
1040 if( key ==
"$DWGCODEPAGE" )
1046 if( key ==
"$AUPREC" )
1052 if( key ==
"$LUPREC" )
1058 if( key ==
"$INSUNITS" )
1066 case 4:
m_currentUnit = DXF_IMPORT_UNITS::MILLIMETERS;
break;
1067 case 5:
m_currentUnit = DXF_IMPORT_UNITS::CENTIMETERS;
break;
1069 case 8:
m_currentUnit = DXF_IMPORT_UNITS::MICROINCHES;
break;
1072 case 11:
m_currentUnit = DXF_IMPORT_UNITS::ANGSTROMS;
break;
1073 case 12:
m_currentUnit = DXF_IMPORT_UNITS::NANOMETERS;
break;
1075 case 14:
m_currentUnit = DXF_IMPORT_UNITS::DECIMETERS;
break;
1108 for(
unsigned i = 0; i<aStr.length(); ++i )
1112 if( c > 175 || c < 11 )
1114 res.append( aStr.Mid( j, i - j ) );
1120 res += wxT(
"\\P" );
1130 res += wxT(
"%%C" );
1135 res += wxT(
"%%D" );
1140 res += wxT(
"%%P" );
1152 res.append( aStr.Mid( j ) );
1162 int overbarLevel = -1;
1168 for( i = 0; i < aData.length(); i++ )
1170 switch( (
wchar_t) aData[i] )
1177 if( overbarLevel == braces )
1186 if( ++i >= aData.length() )
1189 switch( (
wchar_t) aData[i] )
1191 case 'I':
res <<
'\t';
break;
1192 case 'J':
res <<
'\b';
break;
1193 case ' ':
res <<
'^';
break;
1200 if( ++i >= aData.length() )
1203 switch( (
wchar_t) aData[i] )
1219 for( ; codeHex.length() < 4 && i < aData.length(); i++ )
1220 codeHex << aData[i];
1222 unsigned long codeVal = 0;
1224 if( codeHex.ToCULong( &codeVal, 16 ) && codeVal != 0 )
1225 res << wxUniChar( codeVal );
1236 for( ; i < aData.length(); i++ )
1238 if( aData[i] ==
';' )
1241 stacked << aData[i];
1244 if( stacked.Contains( wxS(
"#" ) ) )
1247 res << stacked.BeforeFirst(
'#' );
1248 res <<
'}' <<
'/' <<
'_' <<
'{';
1249 res << stacked.AfterFirst(
'#' );
1254 stacked.Replace( wxS(
"^ " ), wxS(
"/" ) );
1261 if( overbarLevel == -1 )
1264 overbarLevel = braces;
1268 if( overbarLevel == braces )
1294 for( ; i < aData.length(); i++ )
1296 if( aData[i] ==
';' )
1302 if( ++i >= aData.length() )
1311 default:
res << aData[i];
1315 if( overbarLevel != -1 )
1325 regexp.Compile( wxT(
"%%[cC]" ) );
1328 regexp.Replace( &
res, wxChar( 0xD8 ) );
1331 regexp.Replace( &
res, wxChar( 0x2205 ) );
1335 regexp.Compile( wxT(
"%%[dD]" ) );
1336 regexp.Replace( &
res, wxChar( 0x00B0 ) );
1338 regexp.Compile( wxT(
"%%[pP]" ) );
1339 regexp.Replace( &
res, wxChar( 0x00B1 ) );
1348 wxString
name = wxString::FromUTF8( aData.name.c_str() );
1350 auto style = std::make_unique<DXF_IMPORT_STYLE>(
name, aData.fixedTextHeight, aData.widthFactor,
1351 aData.bold, aData.italic );
1353 m_styles.push_back( std::move( style ) );
1367 double lineWidth = 0.0001;
1368 double thickness =
mapDim( std::max( aData.thickness, 0.01 ) );
1372 bufferToUse->
AddCircle( center, thickness, lineWidth,
true );
1382 const VECTOR2D& aSegEnd,
double aWidth )
1389 bufferToUse->
AddLine( origin, end, aWidth );
1397 double aBulge,
double aWidth )
1403 if( aBulge < -2000.0 )
1405 else if( aBulge > 2000.0 )
1408 double ang = 4.0 * atan( aBulge );
1414 double offAng = atan2( ep.
y - sp.
y, ep.
x - sp.
x );
1416 double d = 0.5 * sqrt( (sp.
x - ep.
x) * (sp.
x - ep.
x) + (sp.
y - ep.
y) * (sp.
y - ep.
y) );
1418 double xm = ( sp.
x + ep.
x ) * 0.5;
1419 double ym = ( sp.
y + ep.
y ) * 0.5;
1420 double radius = d / sin( ang * 0.5 );
1426 double dh2 = radius * radius - d * d;
1432 double h = sqrt( dh2 );
1444 else if( ang > M_PI )
1448 double cx = h * cos( offAng ) + xm;
1449 double cy = h * sin( offAng ) + ym;
1466 bufferToUse->
AddArc( center, arc_start, angle, aWidth );
1475#include "tinysplinecxx.h"
1480 wxLogMessage(
"spl deg %d kn %d ctr %d fit %d",
1496 for(
unsigned int ii = 1; ii < imax; ++ii )
1501 if( startpoint != endpoint )
1508 startpoint = endpoint;
1512 std::vector<double> ctrlp;
1514 for(
unsigned ii = 0; ii < imax; ++ii )
1520 tinyspline::BSpline beziers;
1521 std::vector<double> coords;
1528 dxfspline.setControlPoints( ctrlp );
1531 if( dxfspline.degree() < 3 )
1532 dxfspline = dxfspline.elevateDegree( 3 - dxfspline.degree() );
1534 beziers = dxfspline.toBeziers();
1535 coords = beziers.controlPoints();
1537 catch(
const std::runtime_error& )
1541 ReportMsg(
_(
"Invalid spline definition encountered" ) );
1545 size_t order = beziers.order();
1546 size_t dim = beziers.dimension();
1547 size_t numBeziers = ( coords.size() / dim ) / order;
1549 for(
size_t i = 0; i < numBeziers; i++ )
1551 size_t ii = i * dim * order;
1558 if( ii + 5 >= coords.size() )
1559 bezierControl2 = bezierControl1;
1561 bezierControl2 =
VECTOR2D(
mapX( coords[ii + 4] ),
mapY( coords[ii + 5] ) );
1565 if( ii + 7 >= coords.size() )
1566 end = bezierControl2;
1572 bufferToUse->
AddSpline( start, bezierControl1, bezierControl2, end, aWidth );
1592 double direction[3];
1593 aData->getDirection( direction );
1597 if( ( abs( arbZ.
x ) < ( 1.0 / 64.0 ) ) && ( abs( arbZ.
y ) < ( 1.0 / 64.0 ) ) )
1610 return arbitraryAxis * point;
1620 MATRIX3x3 world( worldX, worldY, worldZ );
1622 return world * point;
void TransformEllipseToBeziers(const ELLIPSE< T > &aEllipse, std::vector< BEZIER< T > > &aBeziers)
Transforms an ellipse or elliptical arc into a set of quadratic Bezier curves that approximate it.
Generic cubic Bezier representation.
constexpr void SetOrigin(const Vec &pos)
constexpr void SetEnd(coord_type x, coord_type y)
double m_SplineTangentEndY
unsigned int m_SplineDegree
std::vector< VECTOR2D > m_SplineFitPointList
unsigned int m_SplineFitCount
double m_SplineTangentEndX
std::vector< SPLINE_CTRL_POINT > m_SplineControlPointList
double m_SplineTangentStartY
unsigned int m_SplineKnotsCount
VECTOR2D m_LastCoordinate
unsigned int m_SplineControlCount
double m_SplineTangentStartX
std::vector< double > m_SplineKnotsList
A helper class to hold layer settings temporarily during import.
GRAPHICS_IMPORTER_BUFFER m_buffer
A helper class to hold layer settings temporarily during import.
DXF_IMPORT_UNITS m_currentUnit
virtual void addPolyline(const DL_PolylineData &aData) override
double mapY(double aDxfCoordY)
std::vector< std::unique_ptr< DXF_IMPORT_LAYER > > m_layers
void addEllipse(const DL_EllipseData &aData) override
static wxString toNativeString(const wxString &aData)
Convert a DXF encoded string into a native Unicode string.
virtual void setVariableInt(const std::string &key, int value, int code) override
Called for every int variable in the DXF file (e.g.
bool LoadFromMemory(const wxMemoryBuffer &aMemBuffer) override
Set memory buffer with content for import.
void insertSpline(double aWidth)
virtual void addLine(const DL_LineData &aData) override
VECTOR3D ocsToWcs(const MATRIX3x3D &arbitraryAxis, VECTOR3D point)
Converts a given object coordinate point to world coordinate using the given arbitrary axis vectors.
void insertLine(const VECTOR2D &aSegStart, const VECTOR2D &aSegEnd, double aWidth)
DXF_IMPORT_BLOCK * getImportBlock(const std::string &aBlockName)
Return the import layer block.
double getCurrentUnitScale()
virtual void addBlock(const DL_BlockData &) override
Called for each BLOCK in the DXF file.
virtual void addLayer(const DL_LayerData &aData) override
virtual void addCircle(const DL_CircleData &aData) override
virtual void addMText(const DL_MTextData &aData) override
DXF_IMPORT_LAYER * getImportLayer(const std::string &aLayerName)
Return the import layer data.
static wxString toDxfString(const wxString &aStr)
Convert a native Unicode string into a DXF encoded string.
DXF_IMPORT_STYLE * getImportStyle(const std::string &aStyleName)
Return the import style.
virtual void addInsert(const DL_InsertData &aData) override
std::string m_mtextContent
BOX2D GetImageBBox() const override
Return image bounding box from original imported file.
MATRIX3x3D getArbitraryAxis(DL_Extrusion *aData)
double GetImageWidth() const override
Return image width from original imported file.
double GetImageHeight() const override
Return image height from original imported file.
void updateImageLimits(const VECTOR2D &aPoint)
virtual void addTextStyle(const DL_StyleData &aData) override
virtual void addVertex(const DL_VertexData &aData) override
Called for every polyline vertex.
VECTOR3D wcsToOcs(const MATRIX3x3D &arbitraryAxis, VECTOR3D point)
Converts a given world coordinate point to object coordinate using the given arbitrary axis vectors.
virtual void addSpline(const DL_SplineData &aData) override
Called for every spline.
virtual void addText(const DL_TextData &aData) override
virtual void endBlock() override
virtual void setVariableString(const std::string &key, const std::string &value, int code) override
Called for every string variable in the DXF file (e.g.
virtual void addKnot(const DL_KnotData &aData) override
Called for every spline knot value.
bool ImportDxfFile(const wxString &aFile)
Implementation of the method used for communicate with this filter.
virtual void addArc(const DL_ArcData &aData) override
void SetDefaultLineWidthMM(double aWidth)
Set the default line width when importing dxf items like lines to Pcbnew.
virtual void addFitPoint(const DL_FitPointData &aData) override
Called for every spline fit point.
virtual void addPoint(const DL_PointData &aData) override
double mapDim(double aDxfValue)
void ReportMsg(const wxString &aMessage) override
int m_importCoordinatePrecision
double mapX(double aDxfCoordX)
double lineWeightToWidth(int lw, DXF_IMPORT_LAYER *aLayer)
void insertArc(const VECTOR2D &aSegStart, const VECTOR2D &aSegEnd, double aBulge, double aWidth)
std::vector< std::unique_ptr< DXF_IMPORT_BLOCK > > m_blocks
bool Import() override
Actually imports the file.
virtual void addMTextChunk(const std::string &text) override
int m_importAnglePrecision
virtual void endEntity() override
virtual void addControlPoint(const DL_ControlPointData &aData) override
Called for every spline control point.
double m_defaultThickness
GRAPHICS_IMPORTER_BUFFER m_internalImporter
std::vector< std::unique_ptr< DXF_IMPORT_STYLE > > m_styles
bool Load(const wxString &aFileName) override
Load file for import.
DXF_IMPORT_BLOCK * m_currentBlock
DXF2BRD_ENTITY_DATA m_curr_entity
virtual void SetImporter(GRAPHICS_IMPORTER *aImporter) override
Set the receiver of the imported shapes.
virtual void addLinetype(const DL_LinetypeData &data) override
A helper class to hold style settings temporarily during import.
This class was created to handle importing ellipses from other file formats that support them nativel...
std::list< std::unique_ptr< IMPORTED_SHAPE > > & GetShapes()
void AddCircle(const VECTOR2D &aCenter, double aRadius, const IMPORTED_STROKE &aStroke, bool aFilled, const COLOR4D &aFillColor=COLOR4D::UNSPECIFIED) override
Create an object representing a circle.
void AddSpline(const VECTOR2D &aStart, const VECTOR2D &aBezierControl1, const VECTOR2D &aBezierControl2, const VECTOR2D &aEnd, const IMPORTED_STROKE &aStroke) override
Create an object representing an arc.
void AddLine(const VECTOR2D &aStart, const VECTOR2D &aEnd, const IMPORTED_STROKE &aStroke) override
Create an object representing a line segment.
void ImportTo(GRAPHICS_IMPORTER &aImporter)
void AddArc(const VECTOR2D &aCenter, const VECTOR2D &aStart, const EDA_ANGLE &aAngle, const IMPORTED_STROKE &aStroke) override
Create an object representing an arc.
void AddText(const VECTOR2D &aOrigin, const wxString &aText, double aHeight, double aWidth, double aThickness, double aOrientation, GR_TEXT_H_ALIGN_T aHJustify, GR_TEXT_V_ALIGN_T aVJustify, const COLOR4D &aColor=COLOR4D::UNSPECIFIED) override
Create an object representing a text.
void AddShape(std::unique_ptr< IMPORTED_SHAPE > &aShape)
Interface that creates objects representing shapes for a given data model.
double GetLineWidthMM() const
Return the line width used for importing the outlines (in mm).
GRAPHICS_IMPORTER * m_importer
< Importer used to create objects representing the imported shapes.
virtual void SetImporter(GRAPHICS_IMPORTER *aImporter)
Set the receiver of the imported shapes.
void SetRotation(T aAngle)
Set the rotation components of the matrix.
VECTOR2< T > GetScale() const
Get the scale components of the matrix.
T EuclideanNorm() const
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
VECTOR3< T > Normalize()
Compute the normalized vector.
VECTOR3< T > Cross(const VECTOR3< T > &aVector) const
Compute cross product of self with aVector.
#define DXF_IMPORT_LINEWEIGHT_BY_LW_DEFAULT
#define DXF_IMPORT_LINEWEIGHT_BY_LAYER
static constexpr EDA_ANGLE ANGLE_0
static constexpr EDA_ANGLE ANGLE_360
static constexpr EDA_ANGLE ANGLE_180
This file contains miscellaneous commonly used macros and functions.
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
wxString From_UTF8(const char *cstring)
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
double DEG2RAD(double deg)
VECTOR2< double > VECTOR2D
VECTOR3< double > VECTOR3D