Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
6c2fcf7e
Commit
6c2fcf7e
authored
Dec 01, 2011
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Plain Diff
KICAD_PLUGIN alternate nanometer board loader work
parents
1ab12c2b
3bb91baf
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
493 additions
and
91 deletions
+493
-91
class_board.cpp
pcbnew/class_board.cpp
+1
-1
class_mire.cpp
pcbnew/class_mire.cpp
+11
-0
class_mire.h
pcbnew/class_mire.h
+3
-0
class_module.h
pcbnew/class_module.h
+11
-2
class_pad.h
pcbnew/class_pad.h
+20
-2
kicad_plugin.cpp
pcbnew/kicad_plugin.cpp
+429
-78
kicad_plugin.h
pcbnew/kicad_plugin.h
+18
-8
No files found.
pcbnew/class_board.cpp
View file @
6c2fcf7e
...
...
@@ -69,7 +69,7 @@ BOARD::BOARD( PCB_BASE_FRAME* frame ) :
BOARD
::~
BOARD
()
{
if
(
m_PcbFrame
->
GetScreen
()
)
if
(
m_PcbFrame
&&
m_PcbFrame
->
GetScreen
()
)
m_PcbFrame
->
GetScreen
()
->
ClearUndoRedoList
();
while
(
m_ZoneDescriptorList
.
size
()
)
...
...
pcbnew/class_mire.cpp
View file @
6c2fcf7e
...
...
@@ -26,6 +26,17 @@ PCB_TARGET::PCB_TARGET( BOARD_ITEM* aParent ) :
m_Size
=
5000
;
}
PCB_TARGET
::
PCB_TARGET
(
BOARD_ITEM
*
aParent
,
int
aShape
,
int
aLayer
,
const
wxPoint
&
aPos
,
int
aSize
,
int
aWidth
)
:
BOARD_ITEM
(
aParent
,
PCB_TARGET_T
)
{
m_Shape
=
aShape
;
m_Layer
=
aLayer
;
m_Pos
=
aPos
;
m_Size
=
aSize
;
m_Width
=
aWidth
;
}
PCB_TARGET
::~
PCB_TARGET
()
{
...
...
pcbnew/class_mire.h
View file @
6c2fcf7e
...
...
@@ -25,6 +25,9 @@ public:
public
:
PCB_TARGET
(
BOARD_ITEM
*
aParent
);
PCB_TARGET
(
BOARD_ITEM
*
aParent
,
int
aShape
,
int
aLayer
,
const
wxPoint
&
aPos
,
int
aSize
,
int
aWidth
);
~
PCB_TARGET
();
PCB_TARGET
*
Next
()
const
{
return
(
PCB_TARGET
*
)
Pnext
;
}
...
...
pcbnew/class_module.h
View file @
6c2fcf7e
...
...
@@ -174,7 +174,6 @@ public:
return
(
m_ModuleStatus
&
MODULE_is_LOCKED
)
!=
0
;
}
/**
* Function SetLocked
* sets the MODULE_is_LOCKED bit in the m_ModuleStatus
...
...
@@ -188,6 +187,16 @@ public:
m_ModuleStatus
&=
~
MODULE_is_LOCKED
;
}
bool
IsPlaced
()
const
{
return
(
m_ModuleStatus
&
MODULE_is_PLACED
);
}
void
SetIsPlaced
(
bool
isPlaced
)
{
if
(
isPlaced
)
m_ModuleStatus
|=
MODULE_is_PLACED
;
else
m_ModuleStatus
&=
~
MODULE_is_PLACED
;
}
void
SetLastEditTime
(
long
aTime
)
{
m_LastEdit_Time
=
aTime
;
}
/* Reading and writing data on files */
...
...
pcbnew/class_pad.h
View file @
6c2fcf7e
...
...
@@ -110,7 +110,7 @@ public:
wxSize
m_DeltaSize
;
// delta on rectangular shapes
wxPoint
m_Pos0
;
// Initial Pad position (i.e. pa
s
position relative to the
wxPoint
m_Pos0
;
// Initial Pad position (i.e. pa
d
position relative to the
// module anchor, orientation 0
int
m_ShapeMaxRadius
;
// radius of the circle containing the pad shape
...
...
@@ -169,6 +169,7 @@ public:
* @return the shape of this pad.
*/
int
GetShape
()
const
{
return
m_PadShape
&
0xFF
;
}
void
SetShape
(
int
aShape
)
{
m_PadShape
=
aShape
;
}
const
wxPoint
GetPosition
()
const
// overload
{
...
...
@@ -177,6 +178,23 @@ public:
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Pos
=
aPos
;
}
// overload
void
SetPos0
(
const
wxPoint
&
aPos
)
{
m_Pos0
=
aPos
;
}
void
SetSize
(
const
wxSize
&
aSize
)
{
m_Size
=
aSize
;
}
void
SetDelta
(
const
wxSize
&
aSize
)
{
m_DeltaSize
=
aSize
;
}
void
SetDrillSize
(
const
wxSize
&
aSize
)
{
m_Drill
=
aSize
;
}
void
SetOffset
(
const
wxSize
&
aOffset
)
{
m_Offset
=
aOffset
;
}
void
SetOrientation
(
int
aAngle
)
{
m_Orient
=
aAngle
;
}
void
SetDrillShape
(
int
aDrillShape
)
{
m_DrillShape
=
aDrillShape
;
}
void
SetLayerMask
(
int
aLayerMask
)
{
m_layerMask
=
aLayerMask
;
}
void
SetAttribute
(
int
aAttribute
)
{
m_Attribut
=
aAttribute
;
}
void
SetDieLength
(
int
aLength
)
{
m_LengthDie
=
aLength
;
}
void
SetSolderMaskMargin
(
int
aLength
)
{
m_LocalSolderMaskMargin
=
aLength
;
}
void
SetSolderPasteMargin
(
int
aLength
)
{
m_LocalSolderPasteMargin
=
aLength
;
}
void
SetSolderPasteRatio
(
double
aRatio
)
{
m_LocalSolderPasteMarginRatio
=
aRatio
;
}
/// A local override of the Module's clearance
void
SetPadClearance
(
int
aLength
)
{
m_LocalClearance
=
aLength
;
}
/**
* Function TransformShapeWithClearanceToPolygon
* Convert the pad shape to a closed polygon
...
...
pcbnew/kicad_plugin.cpp
View file @
6c2fcf7e
This diff is collapsed.
Click to expand it.
pcbnew/kicad_plugin.h
View file @
6c2fcf7e
...
...
@@ -39,18 +39,24 @@ class NETCLASS;
class
ZONE_CONTAINER
;
class
DIMENSION
;
class
NETINFO_ITEM
;
class
TEXTE_MODULE
;
/**
* Class KICAD_PLUGIN
* is a PLUGIN derivation which could possibly be put into a DLL/DSO.
* It is not thread safe, but it is re-entrant multiple times in sequence.
*/
class
KICAD_PLUGIN
:
public
PLUGIN
{
public
:
//-----<PLUGIN>-------------------------------------------------------------
--------
//-----<PLUGIN>-------------------------------------------------------------
BOARD
*
Load
(
const
wxString
&
aFileName
,
BOARD
*
aAppendToMe
,
PROPERTIES
*
aProperties
=
NULL
);
BOARD
*
Load
(
const
wxString
&
aFileName
,
BOARD
*
aAppendToMe
,
PROPERTIES
*
aProperties
=
NULL
);
// overload
void
Save
(
const
wxString
*
aFileName
,
BOARD
*
aBoard
,
PROPERTIES
*
aProperties
=
NULL
);
void
Save
(
const
wxString
*
aFileName
,
BOARD
*
aBoard
,
PROPERTIES
*
aProperties
=
NULL
);
// overload
const
wxString
&
PluginName
()
{
...
...
@@ -58,7 +64,7 @@ public:
return
name
;
}
//-----</PLUGIN>------------------------------------------------------------
--------
//-----</PLUGIN>------------------------------------------------------------
protected
:
...
...
@@ -87,10 +93,10 @@ protected:
* parses an ASCII decimal floating point value and scales it into a BIU
* according to the current value of diskToBui.
*
* @param aValue is the ASCII value in C locale form
.
* @param aValue is the ASCII value in C locale form
with possible leading whitespace
*
* @param nptrptr may be NULL, but if not, then it tells where to put a
* pointer to the next unconsumed input text. See
man strtod()
for more information.
* pointer to the next unconsumed input text. See
"man strtod"
for more information.
*
* @return BIU - the converted Board Internal Unit.
*/
...
...
@@ -105,6 +111,11 @@ protected:
void
loadSHEET
();
void
loadMODULE
();
void
load3D
(
MODULE
*
aModule
);
void
loadPAD
(
MODULE
*
aModule
);
void
loadTEXTE_MODULE
(
TEXTE_MODULE
*
aText
);
void
loadEDGE_MODULE
(
MODULE
*
aModule
);
void
loadDRAWSEGMENT
();
void
loadNETINFO_ITEM
();
void
loadPCB_TEXTE
();
...
...
@@ -123,12 +134,11 @@ protected:
void
loadTrackList
(
TRACK
*
aInsertBeforeMe
,
int
aStructType
);
void
loadZONE_CONTAINER
();
// "$CZONE_OUTLINE"
void
loadDIMENSION
();
// "$COTATION"
void
loadPCB_TARGET
();
// "$PCB_TARGET"
/* @todo
void load( PCB_TARGET* me );
void load( NETINFO* me );
void load( TRACK* me );
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment