Werner Almesberger's patches
This commit is contained in:
parent
5977accf6e
commit
30932a4607
|
@ -890,10 +890,8 @@ bool TRACK::HitTest( const wxPoint& ref_pos )
|
|||
|
||||
if( Type() == TYPEVIA ) /* VIA rencontree */
|
||||
{
|
||||
if( (abs( spot_cX ) <= l_piste ) && (abs( spot_cY ) <=l_piste) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return (int64_t) spot_cX*spot_cX + (int64_t) spot_cY*spot_cY <=
|
||||
(int64_t) l_piste*l_piste;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -219,6 +219,152 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay( int aHotKeyCode )
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* "Join" finds the point where b0+x*(b1-b0) intersects with a0+y*(a1-a0).
|
||||
* If that point would be outside of a0-a1, the respective endpoint is used.
|
||||
* Join returns the point in "res" and "true" if a suitable point was found,
|
||||
* "false" if both lines are parallel.
|
||||
*/
|
||||
static bool Join( wxPoint& res, wxPoint a0, wxPoint a1, wxPoint b0, wxPoint b1 )
|
||||
{
|
||||
int64_t denom;
|
||||
double t;
|
||||
|
||||
a1 -= a0;
|
||||
b1 -= b0;
|
||||
b0 -= a0;
|
||||
|
||||
denom = (int64_t) b1.y*a1.x - (int64_t) b1.x*a1.y;
|
||||
if (!denom)
|
||||
return false; // parallel
|
||||
|
||||
t = ((int64_t) b1.y*b0.x - (int64_t) b1.x*b0.y)/(double) denom;
|
||||
|
||||
t = min( max( t, 0.0 ), 1.0 );
|
||||
|
||||
res.x = (int) round(a0.x+t*a1.x);
|
||||
res.y = (int) round(a0.y+t*a1.y);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* "Project" finds the projection of a grid point on a track. This is the point
|
||||
* from where we want to draw new orthogonal tracks when starting on a track.
|
||||
*/
|
||||
bool Project( wxPoint& res, wxPoint on_grid, const TRACK* track )
|
||||
{
|
||||
wxPoint vec;
|
||||
double t;
|
||||
|
||||
if( track->m_Start == track->m_End )
|
||||
return false;
|
||||
|
||||
vec = track->m_End-track->m_Start;
|
||||
|
||||
t = (int64_t) (on_grid.x-track->m_Start.x)*vec.x +
|
||||
(int64_t) (on_grid.y-track->m_Start.y)*vec.y;
|
||||
|
||||
t /= (int64_t) vec.x*vec.x + (int64_t) vec.y*vec.y;
|
||||
t = min( max( t, 0.0 ), 1.0 );
|
||||
|
||||
res.x = (int) round( track->m_Start.x + t*vec.x );
|
||||
res.y = (int) round( track->m_Start.y + t*vec.y );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static bool Magnetize( BOARD* m_Pcb, WinEDA_PcbFrame* frame,
|
||||
int m_ID_current_state, wxSize grid, wxPoint on_grid, wxPoint& curpos )
|
||||
{
|
||||
const D_PAD* pad;
|
||||
const TRACK* curr = NULL;
|
||||
const TRACK* via, * track;
|
||||
int layer, layer_mask;
|
||||
|
||||
bool sometimes = g_MagneticPadOption != capture_always && Drc_On;
|
||||
|
||||
curr = g_CurrentTrackSegment;
|
||||
if( frame->GetCurItem() != curr )
|
||||
curr = NULL;
|
||||
|
||||
switch( g_MagneticPadOption )
|
||||
{
|
||||
case capture_cursor_in_track_tool:
|
||||
if( m_ID_current_state != ID_TRACK_BUTT )
|
||||
return false;
|
||||
break;
|
||||
|
||||
case capture_always:
|
||||
break;
|
||||
|
||||
case no_effect:
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
pad = Locate_Any_Pad( m_Pcb, CURSEUR_OFF_GRILLE, TRUE );
|
||||
if( pad )
|
||||
{
|
||||
if( curr && curr->GetNet() != pad->GetNet() && sometimes )
|
||||
return false;
|
||||
curpos = pad->m_Pos;
|
||||
return true;
|
||||
}
|
||||
|
||||
layer = ( (PCB_SCREEN*) ActiveScreen )->m_Active_Layer;
|
||||
|
||||
via = Locate_Via_Area( m_Pcb, curpos, layer );
|
||||
if( via )
|
||||
{
|
||||
if( curr && curr->GetNet() != via->GetNet() && sometimes )
|
||||
return false;
|
||||
curpos = via->m_Start;
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_mask = g_TabOneLayerMask[layer];
|
||||
|
||||
if( !curr )
|
||||
{
|
||||
track = Locate_Pistes( m_Pcb->m_Track, layer_mask, CURSEUR_OFF_GRILLE );
|
||||
if( !track || track->Type() != TYPETRACK )
|
||||
return false;
|
||||
|
||||
return Project( curpos, on_grid, track );
|
||||
}
|
||||
|
||||
/*
|
||||
* In two segment mode, ignore the final segment if it's inside a grid
|
||||
* square.
|
||||
*/
|
||||
if( g_TwoSegmentTrackBuild && curr->Pback
|
||||
&& curr->m_Start.x - grid.x < curr->m_End.x
|
||||
&& curr->m_Start.x + grid.x > curr->m_End.x
|
||||
&& curr->m_Start.y - grid.y < curr->m_End.y
|
||||
&& curr->m_Start.y + grid.y > curr->m_End.y )
|
||||
curr = curr->Back();
|
||||
|
||||
track = Locate_Pistes( m_Pcb->m_Track, layer_mask, CURSEUR_OFF_GRILLE );
|
||||
for( ; track; track = track->Next() )
|
||||
{
|
||||
if( track->Type() != TYPETRACK )
|
||||
continue;
|
||||
|
||||
if( curr->GetNet() != track->GetNet() && sometimes )
|
||||
continue;
|
||||
|
||||
if( Join( curpos, track->m_Start, track->m_End,
|
||||
curr->m_Start, curr->m_End ) )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
||||
/*****************************************************************/
|
||||
|
@ -232,7 +378,7 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
|||
|
||||
// Save the board after the time out :
|
||||
int CurrentTime = time( NULL );
|
||||
|
||||
|
||||
if( !GetScreen()->IsModify() || GetScreen()->IsSave() )
|
||||
{
|
||||
/* If no change, reset the time out */
|
||||
|
@ -262,7 +408,7 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
|||
|
||||
delta.x = (int) round( (double) GetScreen()->GetGrid().x / zoom );
|
||||
delta.y = (int) round( (double) GetScreen()->GetGrid().y / zoom );
|
||||
|
||||
|
||||
if( delta.x <= 0 )
|
||||
delta.x = 1;
|
||||
if( delta.y <= 0 )
|
||||
|
@ -341,7 +487,6 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
|||
* But if the tool DELETE is active the cursor is left off grid
|
||||
* this is better to reach items to delete off grid
|
||||
*/
|
||||
D_PAD* pad;
|
||||
bool keep_on_grid = TRUE;
|
||||
if( m_ID_current_state == ID_PCB_DELETE_ITEM_BUTT )
|
||||
keep_on_grid = FALSE;
|
||||
|
@ -354,34 +499,27 @@ void WinEDA_BasePcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
|
|||
if( DrawStruct && DrawStruct->m_Flags )
|
||||
keep_on_grid = TRUE;
|
||||
|
||||
switch( g_MagneticPadOption )
|
||||
{
|
||||
case capture_cursor_in_track_tool:
|
||||
case capture_always:
|
||||
pad = Locate_Any_Pad( m_Pcb, CURSEUR_OFF_GRILLE, TRUE );
|
||||
if( (m_ID_current_state != ID_TRACK_BUTT )
|
||||
&& (g_MagneticPadOption == capture_cursor_in_track_tool) )
|
||||
pad = NULL;
|
||||
|
||||
if( keep_on_grid )
|
||||
{
|
||||
if( pad ) // Put cursor on the pad
|
||||
GetScreen()->m_Curseur = curpos = pad->m_Pos;
|
||||
else
|
||||
// Put cursor on grid
|
||||
PutOnGrid( &GetScreen()->m_Curseur );
|
||||
}
|
||||
break;
|
||||
if (keep_on_grid) {
|
||||
wxPoint on_grid = curpos;
|
||||
|
||||
case no_effect:
|
||||
default:
|
||||
PutOnGrid(&on_grid);
|
||||
if (Magnetize(m_Pcb, (WinEDA_PcbFrame *) this, m_ID_current_state,
|
||||
GetScreen()->GetGrid(), on_grid, curpos))
|
||||
GetScreen()->m_Curseur = curpos;
|
||||
else {
|
||||
extern TRACK *LocateIntrusion(TRACK *start, int net, int width);
|
||||
|
||||
// If we are not in delete function, put cursor on grid
|
||||
if( keep_on_grid )
|
||||
{
|
||||
PutOnGrid( &GetScreen()->m_Curseur );
|
||||
}
|
||||
break;
|
||||
/*
|
||||
* If there's an intrusion and DRC is active, we pass the cursor
|
||||
* "as is", and let ShowNewTrackWhenMovingCursor figure our what to
|
||||
* do.
|
||||
*/
|
||||
if (!Drc_On || !g_CurrentTrackSegment ||
|
||||
g_CurrentTrackSegment != this->GetCurItem() ||
|
||||
!LocateIntrusion(m_Pcb->m_Track, g_CurrentTrackSegment->GetNet(),
|
||||
g_CurrentTrackSegment->m_Width))
|
||||
GetScreen()->m_Curseur = on_grid;
|
||||
}
|
||||
}
|
||||
|
||||
if( oldpos != GetScreen()->m_Curseur )
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
static void Exit_Editrack( WinEDA_DrawPanel* panel, wxDC* DC );
|
||||
void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel,
|
||||
wxDC* DC, bool erase );
|
||||
static void ComputeBreakPoint( TRACK* track, int n );
|
||||
static void ComputeBreakPoint( TRACK* track, int n, wxPoint end );
|
||||
static TRACK* DeleteNullTrackSegments( BOARD* pcb, TRACK* track, int* segmcount );
|
||||
static void EnsureEndTrackOnPad( D_PAD* Pad );
|
||||
|
||||
|
@ -493,6 +493,120 @@ void WinEDA_PcbFrame::End_Route( TRACK* track, wxDC* DC )
|
|||
SetCurItem( NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
* PushTrack detecs if the mouse is pointing into a conflicting track.
|
||||
* In this case, it tries to push the new track out of the conflicting track's
|
||||
* clearance zone. This gives us a cheap mechanism for drawing tracks that
|
||||
* tightly follow others, independent of grid settings.
|
||||
*
|
||||
* KNOWN BUGS:
|
||||
* - we do the same sort of search and calculation up to three times:
|
||||
* 1) we search for magnetic hits (in controle.cpp)
|
||||
* 2) we check if there's a DRC violation in the making (also controle.cpp)
|
||||
* 3) we try to fix the DRC violation (here)
|
||||
* - if we have a magnetic hit and a DRC violation at the same time, we choose
|
||||
* the magnetic hit instead of solving the violation
|
||||
* - should locate conflicting tracks also when we're crossing over them
|
||||
* - we obviously shouldn't access functions through "extern" or have #includes
|
||||
* in the middle of the file
|
||||
*/
|
||||
|
||||
#include "trigo.h"
|
||||
|
||||
extern bool Project(wxPoint &res, wxPoint on_grid, const TRACK *track);
|
||||
|
||||
|
||||
TRACK *LocateIntrusion(TRACK *start, int net, int width)
|
||||
{
|
||||
int layer = ((PCB_SCREEN *) ActiveScreen)->m_Active_Layer;
|
||||
int layer_mask = g_TabOneLayerMask[layer];
|
||||
wxPoint ref = ActiveScreen->RefPos(1);
|
||||
TRACK *track, *found = NULL;
|
||||
|
||||
for (track = start; track; track = track->Next()) {
|
||||
int dist;
|
||||
wxPoint pos, vec;
|
||||
int64_t tmp;
|
||||
|
||||
/* Locate_Pistes */
|
||||
if (track->GetState(BUSY | DELETED))
|
||||
continue;
|
||||
if (!(g_TabOneLayerMask[track->GetLayer()] & layer_mask))
|
||||
continue;
|
||||
if (track->GetNet() == net)
|
||||
continue;
|
||||
if (track->Type() == TYPEVIA)
|
||||
continue;
|
||||
|
||||
/* TRACK::HitTest */
|
||||
dist = width/2 + track->m_Width/2 + g_DesignSettings.m_TrackClearence;
|
||||
pos = ref-track->m_Start;
|
||||
vec = track->m_End-track->m_Start;
|
||||
if (!DistanceTest(dist, vec.x, vec.y, pos.x, pos.y))
|
||||
continue;
|
||||
found = track;
|
||||
|
||||
/* prefer intrusions from the side, not the end */
|
||||
tmp = (int64_t) pos.x*vec.x + (int64_t) pos.y*vec.y;
|
||||
if (tmp >= 0 && tmp <= (int64_t) vec.x*vec.x + (int64_t) vec.y*vec.y)
|
||||
break;
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void PushTrack(WinEDA_DrawPanel *panel)
|
||||
{
|
||||
BOARD *pcb = ((WinEDA_BasePcbFrame *) (panel->m_Parent))->m_Pcb;
|
||||
wxPoint cursor = ActiveScreen->m_Curseur;
|
||||
wxPoint cv, vec, n;
|
||||
TRACK *track = g_CurrentTrackSegment;
|
||||
TRACK *other;
|
||||
int64_t det;
|
||||
int dist;
|
||||
double f;
|
||||
|
||||
other = LocateIntrusion(pcb->m_Track, track->GetNet(), track->m_Width);
|
||||
|
||||
/* are we currently pointing into a conflicting trace ? */
|
||||
if (!other)
|
||||
return;
|
||||
if (other->GetNet() == track->GetNet())
|
||||
return;
|
||||
|
||||
cv = cursor-other->m_Start;
|
||||
vec = other->m_End-other->m_Start;
|
||||
|
||||
det = (int64_t) cv.x*vec.y - (int64_t) cv.y*vec.x;
|
||||
|
||||
/* cursor is right at the center of the old track */
|
||||
if (!det)
|
||||
return;
|
||||
|
||||
dist = (track->m_Width+1)/2 + (other->m_Width+1)/2 +
|
||||
g_DesignSettings.m_TrackClearence+2;
|
||||
/*
|
||||
* DRC wants >, so +1.
|
||||
* We may have a quantization error of 1/sqrt(2), so +1 again.
|
||||
*/
|
||||
|
||||
/* Vector "n" is perpendicular to "other", pointing towards the cursor. */
|
||||
if (det > 0) {
|
||||
n.x = vec.y;
|
||||
n.y = -vec.x;
|
||||
}
|
||||
else {
|
||||
n.x = -vec.y;
|
||||
n.y = vec.x;
|
||||
}
|
||||
f = dist/hypot(n.x, n.y);
|
||||
n.x = (int) round(f*n.x);
|
||||
n.y = (int) round(f*n.y);
|
||||
|
||||
Project(track->m_End, cursor, other);
|
||||
track->m_End += n;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
|
||||
|
@ -538,8 +652,13 @@ void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase
|
|||
|
||||
if( Track_45_Only )
|
||||
{
|
||||
if( g_TwoSegmentTrackBuild )
|
||||
ComputeBreakPoint( g_CurrentTrackSegment, g_TrackSegmentCount );
|
||||
if( g_TwoSegmentTrackBuild ) {
|
||||
g_CurrentTrackSegment->m_End = ActiveScreen->m_Curseur;
|
||||
if (Drc_On)
|
||||
PushTrack(panel);
|
||||
ComputeBreakPoint( g_CurrentTrackSegment, g_TrackSegmentCount,
|
||||
g_CurrentTrackSegment->m_End);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Calcul de l'extremite de la piste pour orientations permises:
|
||||
|
@ -625,7 +744,7 @@ void Calcule_Coord_Extremite_45( int ox, int oy, int* fx, int* fy )
|
|||
|
||||
|
||||
/********************************************************/
|
||||
void ComputeBreakPoint( TRACK* track, int SegmentCount )
|
||||
void ComputeBreakPoint( TRACK* track, int SegmentCount, wxPoint end )
|
||||
/********************************************************/
|
||||
|
||||
/**
|
||||
|
@ -646,8 +765,8 @@ void ComputeBreakPoint( TRACK* track, int SegmentCount )
|
|||
SegmentCount--;
|
||||
if( track )
|
||||
{
|
||||
iDx = ActiveScreen->m_Curseur.x - track->m_Start.x;
|
||||
iDy = ActiveScreen->m_Curseur.y - track->m_Start.y;
|
||||
iDx = end.x - track->m_Start.x;
|
||||
iDy = end.y - track->m_Start.y;
|
||||
|
||||
iDx = abs( iDx );
|
||||
iDy = abs( iDy );
|
||||
|
@ -680,10 +799,10 @@ void ComputeBreakPoint( TRACK* track, int SegmentCount )
|
|||
break;
|
||||
|
||||
case 0:
|
||||
if( (ActiveScreen->m_Curseur.x - track->m_Start.x) < 0 )
|
||||
track->m_End.x = ActiveScreen->m_Curseur.x + iDy;
|
||||
if( (end.x - track->m_Start.x) < 0 )
|
||||
track->m_End.x = end.x + iDy;
|
||||
else
|
||||
track->m_End.x = ActiveScreen->m_Curseur.x - iDy;
|
||||
track->m_End.x = end.x - iDy;
|
||||
track->m_End.y = track->m_Start.y;
|
||||
break;
|
||||
|
||||
|
@ -691,19 +810,19 @@ void ComputeBreakPoint( TRACK* track, int SegmentCount )
|
|||
iDx = MIN( iDx, iDy );
|
||||
iDy = iDx;
|
||||
/* recalcul des signes de deltax et deltay */
|
||||
if( (ActiveScreen->m_Curseur.x - track->m_Start.x) < 0 )
|
||||
if( (end.x - track->m_Start.x) < 0 )
|
||||
iDx = -iDx;
|
||||
if( (ActiveScreen->m_Curseur.y - track->m_Start.y) < 0 )
|
||||
if( (end.y - track->m_Start.y) < 0 )
|
||||
iDy = -iDy;
|
||||
track->m_End.x = track->m_Start.x + iDx;
|
||||
track->m_End.y = track->m_Start.y + iDy;
|
||||
break;
|
||||
|
||||
case 90:
|
||||
if( (ActiveScreen->m_Curseur.y - track->m_Start.y) < 0 )
|
||||
track->m_End.y = ActiveScreen->m_Curseur.y + iDx;
|
||||
if( (end.y - track->m_Start.y) < 0 )
|
||||
track->m_End.y = end.y + iDx;
|
||||
else
|
||||
track->m_End.y = ActiveScreen->m_Curseur.y - iDx;
|
||||
track->m_End.y = end.y - iDx;
|
||||
track->m_End.x = track->m_Start.x;
|
||||
break;
|
||||
}
|
||||
|
@ -711,10 +830,10 @@ void ComputeBreakPoint( TRACK* track, int SegmentCount )
|
|||
if( track )
|
||||
{
|
||||
if( track->IsNull() )
|
||||
track->m_End = ActiveScreen->m_Curseur;
|
||||
track->m_End = end;
|
||||
NewTrack->m_Start = track->m_End;
|
||||
}
|
||||
NewTrack->m_End = ActiveScreen->m_Curseur;
|
||||
NewTrack->m_End = end;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -111,6 +111,34 @@ TRACK* Locate_Via( BOARD* Pcb, const wxPoint& pos, int layer )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************/
|
||||
TRACK* Locate_Via_Area( BOARD* Pcb, const wxPoint& pos, int layer )
|
||||
/*******************************************************************/
|
||||
|
||||
/*
|
||||
* Like Locate_Via, but finds any via covering the cursor position
|
||||
*/
|
||||
{
|
||||
TRACK* Track;
|
||||
|
||||
for( Track = Pcb->m_Track; Track != NULL; Track = Track->Next() )
|
||||
{
|
||||
if( Track->Type() != TYPEVIA )
|
||||
continue;
|
||||
if(!Track->HitTest(pos))
|
||||
continue;
|
||||
if( Track->GetState( BUSY | DELETED ) )
|
||||
continue;
|
||||
if( layer < 0 )
|
||||
return Track;
|
||||
if( Track->IsOnLayer( layer ) )
|
||||
return Track;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
D_PAD* Locate_Pad_Connecte( BOARD* Pcb, TRACK* ptr_piste, int extr )
|
||||
/********************************************************************/
|
||||
|
|
516
pcbnew/protos.h
516
pcbnew/protos.h
|
@ -8,336 +8,378 @@
|
|||
/***************/
|
||||
/* PAD_CONNECT.CPP */
|
||||
/***************/
|
||||
LISTE_PAD* CreateSortedPadListByXCoord(BOARD * pcb);
|
||||
LISTE_PAD* CreateSortedPadListByXCoord( BOARD* pcb );
|
||||
|
||||
/* Create a sorted list of pointers to pads.
|
||||
This list is sorted by X ccordinate value.
|
||||
The list must be freed bu user */
|
||||
* This list is sorted by X ccordinate value.
|
||||
* The list must be freed bu user
|
||||
*/
|
||||
|
||||
/**************/
|
||||
/* PCBCFG.CPP */
|
||||
/**************/
|
||||
bool Read_Config(const wxString & project_name);
|
||||
bool Read_Hotkey_Config( WinEDA_DrawFrame * frame, bool verbose );
|
||||
bool Read_Config( const wxString& project_name );
|
||||
bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose );
|
||||
|
||||
/***************/
|
||||
/* TRACEPCB.CPP */
|
||||
/***************/
|
||||
void Trace_MirePcb(WinEDA_DrawPanel * panel, wxDC * DC, MIREPCB * MirePcb, int mode_color);
|
||||
void Trace_MirePcb( WinEDA_DrawPanel* panel, wxDC* DC, MIREPCB* MirePcb, int mode_color );
|
||||
|
||||
/***************/
|
||||
/* TRPISTE.CPP */
|
||||
/***************/
|
||||
|
||||
void Trace_Pistes(WinEDA_DrawPanel * panel, BOARD * Pcb, wxDC * DC, int drawmode);
|
||||
void Trace_Une_Piste(WinEDA_DrawPanel * panel, wxDC * DC, TRACK * pt_start_piste,int nbsegment, int mode_color);
|
||||
/* routine de trace de n segments consecutifs en memoire.
|
||||
Utile pour monter une piste en cours de trace car les segments de cette
|
||||
piste sont alors contigus en memoire
|
||||
Parametres :
|
||||
pt_start_piste = adresse de depart de la liste des segments
|
||||
nbsegment = nombre de segments a tracer
|
||||
mode_color = mode ( GrXOR, GrOR..)
|
||||
ATTENTION:
|
||||
le point de depart d'une piste suivante DOIT exister: peut etre
|
||||
donc mis a 0 avant appel a la routine si la piste a tracer est la derniere
|
||||
*/
|
||||
void Trace_Pistes( WinEDA_DrawPanel* panel, BOARD* Pcb, wxDC* DC, int drawmode );
|
||||
void Trace_Une_Piste( WinEDA_DrawPanel* panel,
|
||||
wxDC* DC,
|
||||
TRACK* pt_start_piste,
|
||||
int nbsegment,
|
||||
int mode_color );
|
||||
|
||||
void Trace_DrawSegmentPcb(WinEDA_DrawPanel * panel, wxDC * DC, DRAWSEGMENT * PtDrawSegment,int mode_color);
|
||||
/* routine de trace de n segments consecutifs en memoire.
|
||||
* Utile pour monter une piste en cours de trace car les segments de cette
|
||||
* piste sont alors contigus en memoire
|
||||
* Parametres :
|
||||
* pt_start_piste = adresse de depart de la liste des segments
|
||||
* nbsegment = nombre de segments a tracer
|
||||
* mode_color = mode ( GrXOR, GrOR..)
|
||||
* ATTENTION:
|
||||
* le point de depart d'une piste suivante DOIT exister: peut etre
|
||||
* donc mis a 0 avant appel a la routine si la piste a tracer est la derniere
|
||||
*/
|
||||
|
||||
void Trace_DrawSegmentPcb( WinEDA_DrawPanel* panel,
|
||||
wxDC* DC,
|
||||
DRAWSEGMENT* PtDrawSegment,
|
||||
int mode_color );
|
||||
|
||||
|
||||
/****************/
|
||||
/* TRACEMOD.C : */
|
||||
/****************/
|
||||
void Trace_Pads_Only(WinEDA_DrawPanel * panel, wxDC * DC, MODULE * Module, int ox, int oy,
|
||||
int MasqueLayer,int mode_color);
|
||||
/* Trace les pads d'un module en mode SKETCH.
|
||||
Utilisee pour afficher les pastilles d'un module lorsque celui ci n'est
|
||||
pas affiche par les options d'affichage des Modules
|
||||
Les pads affiches doivent apparaitre sur les couches donnees par
|
||||
MasqueLayer */
|
||||
void Trace_Pads_Only( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module, int ox, int oy,
|
||||
int MasqueLayer, int mode_color );
|
||||
|
||||
/* Trace les pads d'un module en mode SKETCH.
|
||||
* Utilisee pour afficher les pastilles d'un module lorsque celui ci n'est
|
||||
* pas affiche par les options d'affichage des Modules
|
||||
* Les pads affiches doivent apparaitre sur les couches donnees par
|
||||
* MasqueLayer */
|
||||
|
||||
/****************/
|
||||
/* LOCATE.CPP : */
|
||||
/****************/
|
||||
|
||||
MODULE * ReturnModule(BOARD * Pcb, const wxString & name);
|
||||
/* Recherche d'une empreinte par son nom */
|
||||
MODULE* ReturnModule( BOARD* Pcb, const wxString& name );
|
||||
|
||||
D_PAD * ReturnPad(MODULE * Module, const wxString & name);
|
||||
/* Recherche d'un pad par son nom, pour le module Module */
|
||||
/* Recherche d'une empreinte par son nom */
|
||||
|
||||
TRACK * Locate_Via(BOARD * Pcb, const wxPoint & pos, int layer = -1);
|
||||
D_PAD* ReturnPad( MODULE* Module, const wxString& name );
|
||||
|
||||
TRACK * Fast_Locate_Via(TRACK *start_adr, TRACK* end_adr,
|
||||
const wxPoint & pos, int masquelayer);
|
||||
/* Localise la via de centre le point x,y , sur les couches donnees
|
||||
par masquelayer.
|
||||
la recherche se fait de l'adresse start_adr a end_adr(non comprise)
|
||||
*/
|
||||
/* Recherche d'un pad par son nom, pour le module Module */
|
||||
|
||||
TRACK* Fast_Locate_Piste(TRACK *start_adr, TRACK* end_adr,
|
||||
const wxPoint & ref_pos, int masquelayer);
|
||||
/* Localiste le segment dont une extremite coincide avec le point x,y
|
||||
sur les couches donnees par masquelayer
|
||||
la recherche se fait de l'adresse start_adr a end_adr(non comprise)
|
||||
*/
|
||||
TRACK* Locate_Via( BOARD* Pcb, const wxPoint& pos, int layer = -1 );
|
||||
|
||||
TRACK * Locate_Piste_Connectee( TRACK*ptr_piste, TRACK* pt_base,
|
||||
TRACK* pt_lim,int extr);
|
||||
/* recherche le segment connecte au segment pointe par
|
||||
ptr_piste:
|
||||
si int = START, le point de debut du segment est utilise
|
||||
si int = END, le point de fin du segment est utilise
|
||||
La recherche ne se fait que sur les EXTREMITES des segments
|
||||
La recherche est limitee a la zone [pt_base...]pt_lim.
|
||||
*/
|
||||
TRACK* Locate_Via_Area( BOARD* Pcb, const wxPoint& pos, int layer = -1 );
|
||||
|
||||
TRACK * Locate_Pistes(TRACK * start_adresse,int layer, int typeloc);
|
||||
TRACK * Locate_Pistes(TRACK * start_adresse,
|
||||
const wxPoint & ref_pos,int layer);
|
||||
/*
|
||||
1 - routine de localisation du segment de piste pointe par la souris.
|
||||
2 - routine de localisation du segment de piste pointe par le point
|
||||
ref_pX , ref_pY.
|
||||
TRACK* Fast_Locate_Via( TRACK* start_adr, TRACK* end_adr,
|
||||
const wxPoint& pos, int masquelayer );
|
||||
|
||||
Si layer < 0 la couche n'est pas testee.
|
||||
/* Localise la via de centre le point x,y , sur les couches donnees
|
||||
* par masquelayer.
|
||||
* la recherche se fait de l'adresse start_adr a end_adr(non comprise)
|
||||
*/
|
||||
|
||||
La recherche commence a l'adresse start_adresse
|
||||
*/
|
||||
TRACK* Fast_Locate_Piste( TRACK* start_adr, TRACK* end_adr,
|
||||
const wxPoint& ref_pos, int masquelayer );
|
||||
|
||||
D_PAD * Locate_Pad_Connecte(BOARD * Pcb, TRACK * ptr_segment, int extr);
|
||||
/* localisation de la pastille connectee au debut ou fin du segment
|
||||
entree : pointeur sur le segment, et flag = START ou END
|
||||
retourne:
|
||||
un pointeur sur la description de la pastille si localisation
|
||||
pointeur NULL si pastille non trouvee */
|
||||
/* Localiste le segment dont une extremite coincide avec le point x,y
|
||||
* sur les couches donnees par masquelayer
|
||||
* la recherche se fait de l'adresse start_adr a end_adr(non comprise)
|
||||
*/
|
||||
|
||||
D_PAD * Locate_Any_Pad(BOARD * Pcb, int typeloc, bool OnlyCurrentLayer = FALSE);
|
||||
D_PAD * Locate_Any_Pad(BOARD * Pcb, const wxPoint & ref_pos, bool OnlyCurrentLayer = FALSE);
|
||||
/*
|
||||
localisation de la pastille pointee par la coordonnee ref_pX,,ref_pY, ou
|
||||
par la souris, recherche faite sur toutes les empreintes.
|
||||
entree : (OVERHAEAD)
|
||||
- coord souris (Curseur_X et Curseur_Y)
|
||||
ou ref_pX, ref_pY
|
||||
retourne:
|
||||
pointeur sur la description de la pastille si localisation
|
||||
pointeur NULL si pastille non trouvee
|
||||
*/
|
||||
TRACK* Locate_Piste_Connectee( TRACK* ptr_piste, TRACK* pt_base,
|
||||
TRACK* pt_lim, int extr );
|
||||
|
||||
D_PAD * Locate_Pads(MODULE * Module, int layer, int typeloc) ;
|
||||
D_PAD * Locate_Pads(MODULE * Module, const wxPoint & ref_pos,int layer) ;
|
||||
/* localisation de la pastille pointee par la coordonnee ref_pX,,ref_pY, ou
|
||||
par la souris, concernant l'empreinte en cours.
|
||||
entree :
|
||||
- parametres generaux de l'empreinte mise a jous par caract()
|
||||
- layer = couche ou doit se trouver la pastille
|
||||
(si layer < 0 ) la couche est ignoree)
|
||||
retourne:
|
||||
un pointeur sur la description de la pastille si localisation
|
||||
pointeur NULL si pastille non trouvee
|
||||
*/
|
||||
/* recherche le segment connecte au segment pointe par
|
||||
* ptr_piste:
|
||||
* si int = START, le point de debut du segment est utilise
|
||||
* si int = END, le point de fin du segment est utilise
|
||||
* La recherche ne se fait que sur les EXTREMITES des segments
|
||||
* La recherche est limitee a la zone [pt_base...]pt_lim.
|
||||
*/
|
||||
|
||||
MODULE * Locate_Prefered_Module(BOARD * Pcb, int typeloc);
|
||||
/* localisation d'une empreinte par son rectangle d'encadrement */
|
||||
TRACK* Locate_Pistes( TRACK* start_adresse, int layer, int typeloc );
|
||||
TRACK* Locate_Pistes( TRACK* start_adresse,
|
||||
const wxPoint& ref_pos, int layer );
|
||||
|
||||
D_PAD * Locate_Pads(MODULE * Module, int typeloc);
|
||||
/* localisation de la pastille pointee par la souris, concernant l'empreinte
|
||||
Module.
|
||||
entree :
|
||||
- parametres generaux de l'empreinte mise a jous par caract()
|
||||
retourne:
|
||||
un pointeur sur la description de la pastille si localisation
|
||||
pointeur NULL si pastille non trouvee
|
||||
*/
|
||||
/*
|
||||
* 1 - routine de localisation du segment de piste pointe par la souris.
|
||||
* 2 - routine de localisation du segment de piste pointe par le point
|
||||
* ref_pX , ref_pY.
|
||||
*
|
||||
* Si layer < 0 la couche n'est pas testee.
|
||||
*
|
||||
* La recherche commence a l'adresse start_adresse
|
||||
*/
|
||||
|
||||
TRACK * Locate_Pistes(TRACK * start_adresse, int typeloc);
|
||||
/* routine de localisation du segment de piste pointe par la souris
|
||||
La recherche commence a l'adresse start_adresse */
|
||||
D_PAD* Locate_Pad_Connecte( BOARD* Pcb, TRACK* ptr_segment, int extr );
|
||||
|
||||
DRAWSEGMENT * Locate_Segment_Pcb(BOARD * Pcb, int LayerSearch , int typeloc) ;
|
||||
/* localisation de la pastille connectee au debut ou fin du segment
|
||||
* entree : pointeur sur le segment, et flag = START ou END
|
||||
* retourne:
|
||||
* un pointeur sur la description de la pastille si localisation
|
||||
* pointeur NULL si pastille non trouvee */
|
||||
|
||||
D_PAD* Locate_Any_Pad( BOARD* Pcb, int typeloc, bool OnlyCurrentLayer = FALSE );
|
||||
D_PAD* Locate_Any_Pad( BOARD* Pcb, const wxPoint& ref_pos, bool OnlyCurrentLayer = FALSE );
|
||||
|
||||
/*
|
||||
* localisation de la pastille pointee par la coordonnee ref_pX,,ref_pY, ou
|
||||
* par la souris, recherche faite sur toutes les empreintes.
|
||||
* entree : (OVERHAEAD)
|
||||
* - coord souris (Curseur_X et Curseur_Y)
|
||||
* ou ref_pX, ref_pY
|
||||
* retourne:
|
||||
* pointeur sur la description de la pastille si localisation
|
||||
* pointeur NULL si pastille non trouvee
|
||||
*/
|
||||
|
||||
D_PAD* Locate_Pads( MODULE* Module, int layer, int typeloc );
|
||||
D_PAD* Locate_Pads( MODULE* Module, const wxPoint& ref_pos, int layer );
|
||||
|
||||
/* localisation de la pastille pointee par la coordonnee ref_pX,,ref_pY, ou
|
||||
* par la souris, concernant l'empreinte en cours.
|
||||
* entree :
|
||||
* - parametres generaux de l'empreinte mise a jous par caract()
|
||||
* - layer = couche ou doit se trouver la pastille
|
||||
* (si layer < 0 ) la couche est ignoree)
|
||||
* retourne:
|
||||
* un pointeur sur la description de la pastille si localisation
|
||||
* pointeur NULL si pastille non trouvee
|
||||
*/
|
||||
|
||||
MODULE* Locate_Prefered_Module( BOARD* Pcb, int typeloc );
|
||||
|
||||
/* localisation d'une empreinte par son rectangle d'encadrement */
|
||||
|
||||
D_PAD* Locate_Pads( MODULE* Module, int typeloc );
|
||||
|
||||
/* localisation de la pastille pointee par la souris, concernant l'empreinte
|
||||
* Module.
|
||||
* entree :
|
||||
* - parametres generaux de l'empreinte mise a jous par caract()
|
||||
* retourne:
|
||||
* un pointeur sur la description de la pastille si localisation
|
||||
* pointeur NULL si pastille non trouvee
|
||||
*/
|
||||
|
||||
TRACK* Locate_Pistes( TRACK* start_adresse, int typeloc );
|
||||
|
||||
/* routine de localisation du segment de piste pointe par la souris
|
||||
* La recherche commence a l'adresse start_adresse */
|
||||
|
||||
DRAWSEGMENT* Locate_Segment_Pcb( BOARD* Pcb, int LayerSearch, int typeloc );
|
||||
|
||||
|
||||
D_PAD * Fast_Locate_Pad_Connecte(BOARD * Pcb, const wxPoint & ref_pos, int layer);
|
||||
/* Routine cherchant le pad contenant le point px,py, sur la couche layer
|
||||
( extremite de piste )
|
||||
La liste des pads doit deja exister.
|
||||
D_PAD* Fast_Locate_Pad_Connecte( BOARD* Pcb, const wxPoint& ref_pos, int layer );
|
||||
|
||||
retourne :
|
||||
NULL si pas de pad localise.
|
||||
pointeur sur le pad correspondante si pad trouve
|
||||
(bonne position ET bonne couche). */
|
||||
/* Routine cherchant le pad contenant le point px,py, sur la couche layer
|
||||
* ( extremite de piste )
|
||||
* La liste des pads doit deja exister.
|
||||
*
|
||||
* retourne :
|
||||
* NULL si pas de pad localise.
|
||||
* pointeur sur le pad correspondante si pad trouve
|
||||
* (bonne position ET bonne couche). */
|
||||
|
||||
|
||||
TRACK * Locate_Zone(TRACK * start_adresse,int layer, int typeloc);
|
||||
TRACK * Locate_Zone(TRACK * start_adresse, const wxPoint & ref_pos,int layer);
|
||||
/*
|
||||
1 - routine de localisation du segment de zone pointe par la souris.
|
||||
2 - routine de localisation du segment de zone pointe par le point
|
||||
ref_pX , ref_pY.r
|
||||
TRACK* Locate_Zone( TRACK* start_adresse, int layer, int typeloc );
|
||||
TRACK* Locate_Zone( TRACK* start_adresse, const wxPoint& ref_pos, int layer );
|
||||
|
||||
Si layer == -1 , le tst de la couche n'est pas fait
|
||||
|
||||
La recherche commence a l'adresse start_adresse
|
||||
*/
|
||||
/*
|
||||
* 1 - routine de localisation du segment de zone pointe par la souris.
|
||||
* 2 - routine de localisation du segment de zone pointe par le point
|
||||
* ref_pX , ref_pY.r
|
||||
*
|
||||
* Si layer == -1 , le tst de la couche n'est pas fait
|
||||
*
|
||||
* La recherche commence a l'adresse start_adresse
|
||||
*/
|
||||
|
||||
|
||||
/*************/
|
||||
/* MODULES.C */
|
||||
/*************/
|
||||
int ChangeSideNumLayer(int oldlayer);
|
||||
void DrawModuleOutlines(WinEDA_DrawPanel * panel, wxDC * DC, MODULE * module);
|
||||
void Montre_Position_Empreinte(WinEDA_DrawPanel * panel, wxDC * DC, bool erase) ;
|
||||
/*************/
|
||||
/* MODULES.C */
|
||||
/*************/
|
||||
int ChangeSideNumLayer( int oldlayer );
|
||||
void DrawModuleOutlines( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* module );
|
||||
void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
|
||||
|
||||
|
||||
/* LOADCMP.C : */
|
||||
MODULE * Load_Module_From_Library(WinEDA_DrawFrame * frame, wxDC * DC);
|
||||
MODULE* Load_Module_From_Library( WinEDA_DrawFrame* frame, wxDC* DC );
|
||||
|
||||
/****************/
|
||||
/* EDITRACK.C : */
|
||||
/****************/
|
||||
|
||||
void ShowNewTrackWhenMovingCursor(WinEDA_DrawPanel * panel,
|
||||
wxDC * DC, bool erase);
|
||||
void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel,
|
||||
wxDC* DC, bool erase );
|
||||
|
||||
void Calcule_Coord_Extremite_45(int ox, int oy, int *fx, int * fy);
|
||||
/* determine les coord fx et fy d'un segment
|
||||
pour avoir un segment oriente a 0, 90 ou 45 degres, selon position
|
||||
du point d'origine (ox,oy) et de la souris */
|
||||
void Calcule_Coord_Extremite_45( int ox, int oy, int* fx, int* fy );
|
||||
|
||||
/* determine les coord fx et fy d'un segment
|
||||
* pour avoir un segment oriente a 0, 90 ou 45 degres, selon position
|
||||
* du point d'origine (ox,oy) et de la souris */
|
||||
|
||||
/*****************/
|
||||
/* TRACK.CPP : */
|
||||
/*****************/
|
||||
TRACK * Marque_Une_Piste(WinEDA_BasePcbFrame * frame, wxDC * DC,
|
||||
TRACK* pt_segm, int * nb_segm, int flagcolor);
|
||||
/* Routine de Marquage de 1 piste, a partir du segment pointe par pt_segm.
|
||||
le segment pointe est marque puis les segments adjacents
|
||||
jusqu'a un pad ou un point de jonction de plus de 2 segments
|
||||
le marquage est la mise a 1 du bit BUSY du parametre .status
|
||||
Les segments sont ensuite reclasses pour etre contigus en memoire
|
||||
Retourne:
|
||||
adresse du 1er segment de la chaine creee
|
||||
nombre de segments */
|
||||
TRACK* Marque_Une_Piste( WinEDA_BasePcbFrame* frame, wxDC* DC,
|
||||
TRACK* pt_segm, int* nb_segm, int flagcolor );
|
||||
|
||||
int ReturnEndsTrack(TRACK* RefTrack, int NbSegm,
|
||||
TRACK ** StartTrack, TRACK ** EndTrack);
|
||||
/* Calcule les coordonnes des extremites d'une piste
|
||||
retourne 1 si OK, 0 si piste bouclee
|
||||
Les coord sont retournees en StartTrack->ox, oy
|
||||
et EndTrack->fx, fy si OK
|
||||
Les segments sont supposes chaines de facon consecutive */
|
||||
/* Routine de Marquage de 1 piste, a partir du segment pointe par pt_segm.
|
||||
* le segment pointe est marque puis les segments adjacents
|
||||
* jusqu'a un pad ou un point de jonction de plus de 2 segments
|
||||
* le marquage est la mise a 1 du bit BUSY du parametre .status
|
||||
* Les segments sont ensuite reclasses pour etre contigus en memoire
|
||||
* Retourne:
|
||||
* adresse du 1er segment de la chaine creee
|
||||
* nombre de segments */
|
||||
|
||||
void ListSetState(EDA_BaseStruct * Start, int Nbitem,int State, int onoff);
|
||||
/* Met a jour le membre .state d'une chaine de structures */
|
||||
int ReturnEndsTrack( TRACK* RefTrack, int NbSegm,
|
||||
TRACK** StartTrack, TRACK** EndTrack );
|
||||
|
||||
/* Calcule les coordonnes des extremites d'une piste
|
||||
* retourne 1 si OK, 0 si piste bouclee
|
||||
* Les coord sont retournees en StartTrack->ox, oy
|
||||
* et EndTrack->fx, fy si OK
|
||||
* Les segments sont supposes chaines de facon consecutive */
|
||||
|
||||
void ListSetState( EDA_BaseStruct* Start, int Nbitem, int State, int onoff );
|
||||
|
||||
/* Met a jour le membre .state d'une chaine de structures */
|
||||
|
||||
/*****************/
|
||||
/* EDITEDGE.CPP : */
|
||||
/*****************/
|
||||
void Trace_1_Edge(WinEDA_DrawPanel * panel, wxDC * DC, TRACK * start_edge, int nbpoint, int mode_color);
|
||||
void Trace_1_Edge( WinEDA_DrawPanel* panel,
|
||||
wxDC* DC,
|
||||
TRACK* start_edge,
|
||||
int nbpoint,
|
||||
int mode_color );
|
||||
|
||||
/************/
|
||||
/* DRC.CPP : */
|
||||
/************/
|
||||
int Drc(WinEDA_BasePcbFrame * frame, wxDC * DC,
|
||||
TRACK * pt_segment, TRACK * pt_start_buffer, int show_err);
|
||||
/* Teste le segment pointe par pt_segment:
|
||||
debsegment = adresse du segment a tester
|
||||
pt_start_buffer = adresse de la zone piste
|
||||
show_err (flag) si 0 pas d'affichage d'erreur sur ecran
|
||||
retourne :
|
||||
BAD_DRC (1) si Violation DRC
|
||||
OK_DRC (0) si OK */
|
||||
int Drc( WinEDA_BasePcbFrame* frame, wxDC* DC,
|
||||
TRACK* pt_segment, TRACK* pt_start_buffer, int show_err );
|
||||
|
||||
/* Teste le segment pointe par pt_segment:
|
||||
* debsegment = adresse du segment a tester
|
||||
* pt_start_buffer = adresse de la zone piste
|
||||
* show_err (flag) si 0 pas d'affichage d'erreur sur ecran
|
||||
* retourne :
|
||||
* BAD_DRC (1) si Violation DRC
|
||||
* OK_DRC (0) si OK */
|
||||
|
||||
|
||||
/*****************/
|
||||
/* TR_MODIF.CPP : */
|
||||
/*****************/
|
||||
|
||||
int EraseOldTrack(WinEDA_BasePcbFrame * frame, BOARD * Pcb, wxDC * DC,
|
||||
TRACK * pt_new_track, int nbptnewpiste);
|
||||
void Modif_Auto_Route(TRACK * pt_debut_new_piste) ;
|
||||
int EraseOldTrack( WinEDA_BasePcbFrame* frame, BOARD* Pcb, wxDC* DC,
|
||||
TRACK* pt_new_track, int nbptnewpiste );
|
||||
void Modif_Auto_Route( TRACK* pt_debut_new_piste );
|
||||
|
||||
|
||||
/**************/
|
||||
/* CLEAN.CPP : */
|
||||
/**************/
|
||||
/**************/
|
||||
/* CLEAN.CPP : */
|
||||
/**************/
|
||||
|
||||
int Netliste_Controle_piste(WinEDA_PcbFrame * frame, wxDC * DC, int affiche);
|
||||
/* Supprime les segments mal connectes, cad interconnectant des segments
|
||||
de net_code differents */
|
||||
int Netliste_Controle_piste( WinEDA_PcbFrame* frame, wxDC* DC, int affiche );
|
||||
|
||||
/* Supprime les segments mal connectes, cad interconnectant des segments
|
||||
* de net_code differents */
|
||||
|
||||
|
||||
/************/
|
||||
/* BLOCK.CPP */
|
||||
/************/
|
||||
/************/
|
||||
/* BLOCK.CPP */
|
||||
/************/
|
||||
|
||||
void Block_Affiche(int on_off); /*
|
||||
routine de trace du cadre d'un Block en cours de delimitation
|
||||
Si on_off = 0 : effacement du cadre
|
||||
Si on_off = 1 : affichage du cadre */
|
||||
void Block_Affiche( int on_off ); /*
|
||||
* routine de trace du cadre d'un Block en cours de delimitation
|
||||
* Si on_off = 0 : effacement du cadre
|
||||
* Si on_off = 1 : affichage du cadre */
|
||||
|
||||
void Trace_Block(WinEDA_DrawPanel * panel, wxDC * DC, int ox, int oy, int fx, int fy , int color );
|
||||
/* Routine de trace d'un rectangle symbolisant un block
|
||||
(toujours en mode XOR) */
|
||||
void Trace_Block( WinEDA_DrawPanel* panel, wxDC* DC, int ox, int oy, int fx, int fy, int color );
|
||||
|
||||
/***************/
|
||||
/* PLOT_RTN.CPP */
|
||||
/***************/
|
||||
/* Routine de trace d'un rectangle symbolisant un block
|
||||
* (toujours en mode XOR) */
|
||||
|
||||
void Affiche_erreur(int nb_err) ;
|
||||
/***************/
|
||||
/* PLOT_RTN.CPP */
|
||||
/***************/
|
||||
|
||||
void Affiche_erreur( int nb_err );
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/* AFFICHE.CPP: (Fonctions d'affichage de messages, parametres... */
|
||||
/*****************************************************************/
|
||||
void Affiche_Infos_Equipot(int netcode, WinEDA_BasePcbFrame * frame);
|
||||
void Affiche_Infos_Equipot( int netcode, WinEDA_BasePcbFrame* frame );
|
||||
|
||||
/************/
|
||||
/* ZONES.CPP */
|
||||
/************/
|
||||
int Propagation(WinEDA_PcbFrame * frame);
|
||||
/************/
|
||||
/* ZONES.CPP */
|
||||
/************/
|
||||
int Propagation( WinEDA_PcbFrame* frame );
|
||||
|
||||
/***************/
|
||||
/* ATTRIBUT.CPP */
|
||||
/***************/
|
||||
/***************/
|
||||
/* ATTRIBUT.CPP */
|
||||
/***************/
|
||||
|
||||
void MasqueAttributs( int * masque_set, int * masque_clr);
|
||||
/* Calcule les attributs a remettre a 0 (masque_clr) et a mettre a 1
|
||||
(masque_set), en fonction des options d'attributs
|
||||
void MasqueAttributs( int* masque_set, int* masque_clr );
|
||||
|
||||
ces attributs sont normalement le membre .flags de la structure TRACK
|
||||
les pointeurs NULLs sont acceptes
|
||||
*/
|
||||
/* Calcule les attributs a remettre a 0 (masque_clr) et a mettre a 1
|
||||
* (masque_set), en fonction des options d'attributs
|
||||
*
|
||||
* ces attributs sont normalement le membre .flags de la structure TRACK
|
||||
* les pointeurs NULLs sont acceptes
|
||||
*/
|
||||
|
||||
|
||||
/***************/
|
||||
/* DUPLTRAC.CPP */
|
||||
/***************/
|
||||
|
||||
EDA_BaseStruct * LocateLockPoint(BOARD * Pcb, wxPoint pos, int LayerMask);
|
||||
/* Routine trouvant le point " d'accrochage " d'une extremite de piste.
|
||||
Ce point peut etre un PAD ou un autre segment de piste
|
||||
Retourne:
|
||||
- pointeur sur ce PAD ou:
|
||||
- pointeur sur le segment ou:
|
||||
- NULL
|
||||
Parametres d'appel:
|
||||
coord pX, pY du point tst
|
||||
masque des couches a tester */
|
||||
EDA_BaseStruct* LocateLockPoint( BOARD* Pcb, wxPoint pos, int LayerMask );
|
||||
|
||||
/* Routine trouvant le point " d'accrochage " d'une extremite de piste.
|
||||
* Ce point peut etre un PAD ou un autre segment de piste
|
||||
* Retourne:
|
||||
* - pointeur sur ce PAD ou:
|
||||
* - pointeur sur le segment ou:
|
||||
* - NULL
|
||||
* Parametres d'appel:
|
||||
* coord pX, pY du point tst
|
||||
* masque des couches a tester
|
||||
*/
|
||||
|
||||
|
||||
TRACK * CreateLockPoint(int *pX, int *pY, TRACK * ptsegm, TRACK * refsegm);
|
||||
/* Routine de creation d'un point intermediaire sur un segment
|
||||
le segment ptsegm est casse en 2 segments se raccordant au point pX, pY
|
||||
retourne:
|
||||
NULL si pas de nouveau point ( c.a.d si pX, pY correspondait deja
|
||||
a une extremite ou:
|
||||
pointeur sur le segment cree
|
||||
si refsegm != NULL refsegm est pointeur sur le segment incident,
|
||||
et le point cree est l'ntersection des 2 axes des segments ptsegm et
|
||||
refsegm
|
||||
retourne la valeur exacte de pX et pY
|
||||
*/
|
||||
TRACK* CreateLockPoint( int* pX, int* pY, TRACK* ptsegm, TRACK* refsegm );
|
||||
|
||||
/* Routine de creation d'un point intermediaire sur un segment
|
||||
* le segment ptsegm est casse en 2 segments se raccordant au point pX, pY
|
||||
* retourne:
|
||||
* NULL si pas de nouveau point ( c.a.d si pX, pY correspondait deja
|
||||
* a une extremite ou:
|
||||
* pointeur sur le segment cree
|
||||
* si refsegm != NULL refsegm est pointeur sur le segment incident,
|
||||
* et le point cree est l'ntersection des 2 axes des segments ptsegm et
|
||||
* refsegm
|
||||
* retourne la valeur exacte de pX et pY
|
||||
*/
|
||||
|
||||
/****************/
|
||||
/* CONTROLE.CPP */
|
||||
|
@ -348,21 +390,22 @@ void RemoteCommand( const char* cmdline );
|
|||
/***************/
|
||||
/* AUTOPLACE.CPP */
|
||||
/***************/
|
||||
int Calcule_Encadrement_EdgeBoard();
|
||||
int Calcule_Encadrement_EdgeBoard();
|
||||
|
||||
/***************/
|
||||
/* AUTOROUT.CPP */
|
||||
/***************/
|
||||
void DisplayBoard(WinEDA_DrawPanel * panel, wxDC * DC); /* routine de Debug */
|
||||
void DisplayBoard( WinEDA_DrawPanel* panel, wxDC* DC ); /* routine de Debug */
|
||||
|
||||
|
||||
/**************/
|
||||
/* NETLIST.CPP */
|
||||
/**************/
|
||||
MODULE * ListAndSelectModuleName(COMMAND * Cmd);
|
||||
/* liste les noms des modules du PCB
|
||||
Retourne un pointeur sur le module selectionne
|
||||
( ou NULL si pas de selection ) */
|
||||
MODULE* ListAndSelectModuleName( COMMAND* Cmd );
|
||||
|
||||
/* liste les noms des modules du PCB
|
||||
* Retourne un pointeur sur le module selectionne
|
||||
* ( ou NULL si pas de selection ) */
|
||||
|
||||
/***************/
|
||||
/* LAY2PLOT.CPP */
|
||||
|
@ -371,9 +414,8 @@ MODULE * ListAndSelectModuleName(COMMAND * Cmd);
|
|||
/*****************/
|
||||
/* SET_COLOR.CPP */
|
||||
/*****************/
|
||||
void DisplayColorSetupFrame(WinEDA_DrawFrame * parent,
|
||||
const wxPoint & framepos);
|
||||
void DisplayColorSetupFrame( WinEDA_DrawFrame* parent,
|
||||
const wxPoint& framepos );
|
||||
|
||||
|
||||
#endif /* #define PROTO_H */
|
||||
|
||||
#endif /* #define PROTO_H */
|
||||
|
|
Loading…
Reference in New Issue