2021-11-19 02:21:22 +00:00
|
|
|
%ignore EDA_SHAPE::getCenter;
|
2016-09-21 01:07:41 +00:00
|
|
|
|
2021-10-20 05:28:06 +00:00
|
|
|
%{
|
|
|
|
#include <eda_shape.h>
|
|
|
|
#include <pcb_shape.h>
|
|
|
|
%}
|
2021-10-15 20:50:33 +00:00
|
|
|
%include eda_shape.h
|
2020-10-04 23:34:59 +00:00
|
|
|
%include pcb_shape.h
|
2021-11-19 02:21:22 +00:00
|
|
|
|
2020-10-04 23:34:59 +00:00
|
|
|
%extend PCB_SHAPE
|
2016-09-21 01:07:41 +00:00
|
|
|
{
|
2021-10-20 05:28:06 +00:00
|
|
|
double GetArcAngleStart()
|
|
|
|
{
|
2022-01-16 01:06:25 +00:00
|
|
|
EDA_ANGLE startAngle;
|
|
|
|
EDA_ANGLE endAngle;
|
2021-10-20 05:28:06 +00:00
|
|
|
$self->CalcArcAngles( startAngle, endAngle );
|
2022-01-16 01:06:25 +00:00
|
|
|
return startAngle.AsTenthsOfADegree();
|
2021-10-20 05:28:06 +00:00
|
|
|
}
|
|
|
|
|
2016-09-21 01:07:41 +00:00
|
|
|
%pythoncode
|
|
|
|
%{
|
|
|
|
def GetShapeStr(self):
|
|
|
|
return self.ShowShape(self.GetShape())
|
|
|
|
%}
|
|
|
|
}
|
|
|
|
|
2021-10-17 10:21:47 +00:00
|
|
|
/* Only for compatibility with old python scripts: */
|
|
|
|
const int S_SEGMENT = (const int)SHAPE_T::SEGMENT;
|
|
|
|
const int S_RECT = (const int)SHAPE_T::RECT;
|
|
|
|
const int S_ARC = (const int)SHAPE_T::ARC;
|
|
|
|
const int S_CIRCLE = (const int)SHAPE_T::CIRCLE;
|
|
|
|
const int S_POLYGON = (const int)SHAPE_T::POLY;
|
|
|
|
const int S_CURVE = (const int)SHAPE_T::BEZIER;
|
|
|
|
|
|
|
|
%{
|
|
|
|
/* for compatibility with old python scripts: */
|
|
|
|
const int S_SEGMENT = (const int)SHAPE_T::SEGMENT;
|
|
|
|
const int S_RECT = (const int)SHAPE_T::RECT;
|
|
|
|
const int S_ARC = (const int)SHAPE_T::ARC;
|
|
|
|
const int S_CIRCLE = (const int)SHAPE_T::CIRCLE;
|
|
|
|
const int S_POLYGON = (const int)SHAPE_T::POLY;
|
|
|
|
const int S_CURVE = (const int)SHAPE_T::BEZIER;
|
|
|
|
%}
|