57 const wxString& aActualConversion )
66 if(
FindNode( aNode, wxT(
"width" ) ) )
72 if( aNode->GetName() == wxT(
"triplePointArc" ) )
75 lNode =
FindNode( aNode, wxT(
"pt" ) );
99 SetPosition( lNode->GetNodeContent(), aDefaultUnits, &end.
x, &end.
y,
119 else if( aNode->GetName() == wxT(
"arc" ) )
121 lNode =
FindNode( aNode, wxT(
"pt" ) );
129 lNode =
FindNode( aNode, wxT(
"radius" ) );
133 SetWidth(
FindNode( aNode, wxT(
"radius" ) )->GetNodeContent(), aDefaultUnits, &r,
138 lNode =
FindNode( aNode, wxT(
"startAngle" ) );
145 lNode =
FindNode( aNode, wxT(
"sweepAngle" ) );
181 aFootprint->
Add( arc );
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Information pertinent to a Pcbnew printed circuit board.
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
void SetCenter(const VECTOR2I &aCenter)
void SetFilled(bool aFlag)
void SetStart(const VECTOR2I &aStart)
void SetArcAngleAndEnd(const EDA_ANGLE &aAngle, bool aCheckNegativeAngle=false)
Set the end point from the angle center and start.
void SetStart0(const VECTOR2I &aPoint)
virtual void SetDrawCoord()
Set draw coordinates (absolute values ) from relative coordinates.
void SetArcAngleAndEnd0(const EDA_ANGLE &aAngle, bool aCheckNegativeAngle=false)
Sets the angle for arcs, and normalizes it within the range 0 - 360 degrees.
void SetCenter0(const VECTOR2I &aPt)
PCB_ARC(PCB_CALLBACKS *aCallbacks, BOARD *aBoard)
void AddToFootprint(FOOTPRINT *aFootprint) override
virtual void Flip() override
virtual void Parse(XNODE *aNode, int aLayer, const wxString &aDefaultUnits, const wxString &aActualConversion)
virtual void SetPosOffset(int aX_offs, int aY_offs) override
void AddToBoard() override
PCB_LAYER_ID m_KiCadLayer
PCB_LAYER_ID GetKiCadLayer() const
virtual void SetPosOffset(int aX_offs, int aY_offs)
void SetStroke(const STROKE_PARAMS &aStroke) override
Simple container to manage line stroke parameters.
Hold an XML or S-expression element.
static constexpr EDA_ANGLE & ANGLE_360
static constexpr EDA_ANGLE & ANGLE_0
bool IsNonCopperLayer(int aLayerId)
Test whether a layer is a non copper layer.
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount)
int StrToInt1Units(const wxString &aStr)
void SetWidth(const wxString &aStr, const wxString &aDefaultMeasurementUnit, int *aWidth, const wxString &aActualConversion)
XNODE * FindNode(XNODE *aChild, const wxString &aTag)
void SetPosition(const wxString &aStr, const wxString &aDefaultMeasurementUnit, int *aX, int *aY, const wxString &aActualConversion)
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".