Commit a674dd65 authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: class DIMENSION: code cleaning

parent ea603c4d
This diff is collapsed.
......@@ -43,21 +43,21 @@ class TEXTE_PCB;
class DIMENSION : public BOARD_ITEM
{
public:
int m_Width;
wxPoint m_Pos;
int m_Shape; /// Current always 0.
int m_Unit; /// 0 = inches, 1 = mm
int m_Value; /// value of PCB dimensions.
TEXTE_PCB m_Text;
int m_crossBarOx, m_crossBarOy, m_crossBarFx, m_crossBarFy;
int m_featureLineGOx, m_featureLineGOy, m_featureLineGFx, m_featureLineGFy;
int m_featureLineDOx, m_featureLineDOy, m_featureLineDFx, m_featureLineDFy;
int m_arrowD1Ox, m_arrowD1Oy, m_arrowD1Fx, m_arrowD1Fy;
int m_arrowD2Ox, m_arrowD2Oy, m_arrowD2Fx, m_arrowD2Fy;
int m_arrowG1Ox, m_arrowG1Oy, m_arrowG1Fx, m_arrowG1Fy;
int m_arrowG2Ox, m_arrowG2Oy, m_arrowG2Fx, m_arrowG2Fy;
int m_Width;
int m_Shape; // / Currently always 0.
int m_Unit; // / 0 = inches, 1 = mm
int m_Value; // / value of PCB dimensions.
TEXTE_PCB m_Text;
// private: These member should be private. they are public only due to legacy code
wxPoint m_crossBarO, m_crossBarF;
wxPoint m_featureLineGO, m_featureLineGF;
wxPoint m_featureLineDO, m_featureLineDF;
wxPoint m_arrowD1O, m_arrowD1F;
wxPoint m_arrowD2O, m_arrowD2F;
wxPoint m_arrowG1O, m_arrowG1F;
wxPoint m_arrowG2O, m_arrowG2F;
public:
DIMENSION( BOARD_ITEM* aParent );
......@@ -65,9 +65,9 @@ public:
~DIMENSION();
const wxPoint& GetPosition() const { return m_Pos; }
const wxPoint& GetPosition() const;
void SetPosition( const wxPoint& aPos ); // override, sets m_Text's position too
void SetPosition( const wxPoint& aPos ); // override, sets m_Text's position too
void SetTextSize( const wxSize& aTextSize )
{
......@@ -77,9 +77,9 @@ public:
void SetLayer( int aLayer );
void SetShape( int aShape ) { m_Shape = aShape; }
int GetShape() const { return m_Shape; }
int GetShape() const { return m_Shape; }
int GetWidth() const { return m_Width; }
int GetWidth() const { return m_Width; }
void SetWidth( int aWidth ) { m_Width = aWidth; }
/**
......@@ -87,25 +87,25 @@ public:
* Calculate coordinates of segments used to draw the dimension.
* @param aDoNotChangeText (bool) if false, the dimension text is initialized
*/
void AdjustDimensionDetails( bool aDoNotChangeText = false );
void AdjustDimensionDetails( bool aDoNotChangeText = false );
void SetText( const wxString& NewText );
const wxString GetText() const;
void SetText( const wxString& NewText );
const wxString GetText() const;
void Copy( DIMENSION* source );
void Copy( DIMENSION* source );
void Draw( EDA_DRAW_PANEL* panel, wxDC* DC,
GR_DRAWMODE aColorMode, const wxPoint& offset = ZeroOffset );
void Draw( EDA_DRAW_PANEL* panel, wxDC* DC,
GR_DRAWMODE aColorMode, const wxPoint& offset = ZeroOffset );
/**
* Function Move
* @param offset : moving vector
*/
void Move( const wxPoint& offset );
void Move( const wxPoint& offset );
void Rotate( const wxPoint& aRotCentre, double aAngle );
void Rotate( const wxPoint& aRotCentre, double aAngle );
void Flip( const wxPoint& aCentre );
void Flip( const wxPoint& aCentre );
/**
* Function Mirror
......@@ -114,30 +114,30 @@ public:
* the layer is not changed
* @param axis_pos : vertical axis position
*/
void Mirror( const wxPoint& axis_pos );
void Mirror( const wxPoint& axis_pos );
void DisplayInfo( EDA_DRAW_FRAME* frame );
void DisplayInfo( EDA_DRAW_FRAME* frame );
bool HitTest( const wxPoint& aPosition );
bool HitTest( const wxPoint& aPosition );
bool HitTest( const EDA_RECT& aRect ) const;
bool HitTest( const EDA_RECT& aRect ) const;
wxString GetClass() const
{
return wxT( "DIMENSION" );
}
EDA_RECT GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
wxString GetSelectMenuText() const;
wxString GetSelectMenuText() const;
BITMAP_DEF GetMenuImage() const { return add_dimension_xpm; }
BITMAP_DEF GetMenuImage() const { return add_dimension_xpm; }
EDA_ITEM* Clone() const;
EDA_ITEM* Clone() const;
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
};
#endif // DIMENSION_H_
#endif // DIMENSION_H_
......@@ -244,26 +244,13 @@ DIMENSION* PCB_EDIT_FRAME::EditDimension( DIMENSION* aDimension, wxDC* aDC )
aDimension->SetLayer( getActiveLayer() );
aDimension->m_crossBarOx = aDimension->m_crossBarFx = pos.x;
aDimension->m_crossBarOy = aDimension->m_crossBarFy = pos.y;
aDimension->m_featureLineDOx = aDimension->m_featureLineDFx = pos.x;
aDimension->m_featureLineDOy = aDimension->m_featureLineDFy = pos.y;
aDimension->m_featureLineGOx = aDimension->m_featureLineGFx = pos.x;
aDimension->m_featureLineGOy = aDimension->m_featureLineGFy = pos.y;
aDimension->m_arrowG1Ox = aDimension->m_arrowG1Fx = pos.x;
aDimension->m_arrowG1Oy = aDimension->m_arrowG1Fy = pos.y;
aDimension->m_arrowG2Ox = aDimension->m_arrowG2Fx = pos.x;
aDimension->m_arrowG2Oy = aDimension->m_arrowG2Fy = pos.y;
aDimension->m_arrowD1Ox = aDimension->m_arrowD1Fx = pos.x;
aDimension->m_arrowD1Oy = aDimension->m_arrowD1Fy = pos.y;
aDimension->m_arrowD2Ox = aDimension->m_arrowD2Fx = pos.x;
aDimension->m_arrowD2Oy = aDimension->m_arrowD2Fy = pos.y;
aDimension->m_crossBarO = aDimension->m_crossBarF = pos;
aDimension->m_featureLineDO = aDimension->m_featureLineDF = pos;
aDimension->m_featureLineGO = aDimension->m_featureLineGF = pos;
aDimension->m_arrowG1O = aDimension->m_arrowG1F = pos;
aDimension->m_arrowG2O = aDimension->m_arrowG2F = pos;
aDimension->m_arrowD1O = aDimension->m_arrowD1F = pos;
aDimension->m_arrowD2O = aDimension->m_arrowD2F = pos;
aDimension->m_Text.m_Size = GetBoard()->GetDesignSettings().m_PcbTextSize;
int width = GetBoard()->GetDesignSettings().m_PcbTextWidth;
......@@ -327,31 +314,28 @@ static void BuildDimension( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
if( status_dimension == 1 )
{
Dimension->m_featureLineDOx = pos.x;
Dimension->m_featureLineDOy = pos.y;
Dimension->m_crossBarFx = Dimension->m_featureLineDOx;
Dimension->m_crossBarFy = Dimension->m_featureLineDOy;
Dimension->m_featureLineDO = pos;
Dimension->m_crossBarF = Dimension->m_featureLineDO;
Dimension->AdjustDimensionDetails( );
}
else
{
int deltax, deltay, dx, dy;
wxPoint delta;
int dx, dy;
float angle, depl;
deltax = Dimension->m_featureLineDOx - Dimension->m_featureLineGOx;
deltay = Dimension->m_featureLineDOy - Dimension->m_featureLineGOy;
delta = Dimension->m_featureLineDO - Dimension->m_featureLineGO;
/* Calculating the direction of travel perpendicular to the selected axis. */
angle = atan2( (double)deltay, (double)deltax ) + (M_PI / 2);
angle = atan2( (double)delta.y, (double)delta.x ) + (M_PI / 2);
deltax = pos.x - Dimension->m_featureLineDOx;
deltay = pos.y - Dimension->m_featureLineDOy;
depl = ( deltax * cos( angle ) ) + ( deltay * sin( angle ) );
delta = pos - Dimension->m_featureLineDO;
depl = ( delta.x * cos( angle ) ) + ( delta.y * sin( angle ) );
dx = (int) ( depl * cos( angle ) );
dy = (int) ( depl * sin( angle ) );
Dimension->m_crossBarOx = Dimension->m_featureLineGOx + dx;
Dimension->m_crossBarOy = Dimension->m_featureLineGOy + dy;
Dimension->m_crossBarFx = Dimension->m_featureLineDOx + dx;
Dimension->m_crossBarFy = Dimension->m_featureLineDOy + dy;
Dimension->m_crossBarO.x = Dimension->m_featureLineGO.x + dx;
Dimension->m_crossBarO.y = Dimension->m_featureLineGO.y + dy;
Dimension->m_crossBarF.x = Dimension->m_featureLineDO.x + dx;
Dimension->m_crossBarF.y = Dimension->m_featureLineDO.y + dy;
Dimension->AdjustDimensionDetails( );
}
......
......@@ -644,46 +644,46 @@ void PCB_IO::format( DIMENSION* aDimension, int aNestLevel ) const
Format( (TEXTE_PCB*) &aDimension->m_Text, aNestLevel+1 );
m_out->Print( aNestLevel+1, "(feature1 (pts (xy %s %s) (xy %s %s)))\n",
FMT_IU( aDimension->m_featureLineDOx ).c_str(),
FMT_IU( aDimension->m_featureLineDOy ).c_str(),
FMT_IU( aDimension->m_featureLineDFx ).c_str(),
FMT_IU( aDimension->m_featureLineDFy ).c_str() );
FMT_IU( aDimension->m_featureLineDO.x ).c_str(),
FMT_IU( aDimension->m_featureLineDO.y ).c_str(),
FMT_IU( aDimension->m_featureLineDF.x ).c_str(),
FMT_IU( aDimension->m_featureLineDF.y ).c_str() );
m_out->Print( aNestLevel+1, "(feature2 (pts (xy %s %s) (xy %s %s)))\n",
FMT_IU( aDimension->m_featureLineGOx ).c_str(),
FMT_IU( aDimension->m_featureLineGOy ).c_str(),
FMT_IU( aDimension->m_featureLineGFx ).c_str(),
FMT_IU( aDimension->m_featureLineGFy ).c_str() );
FMT_IU( aDimension->m_featureLineGO.x ).c_str(),
FMT_IU( aDimension->m_featureLineGO.y ).c_str(),
FMT_IU( aDimension->m_featureLineGF.x ).c_str(),
FMT_IU( aDimension->m_featureLineGF.y ).c_str() );
m_out->Print( aNestLevel+1, "(crossbar (pts (xy %s %s) (xy %s %s)))\n",
FMT_IU( aDimension->m_crossBarOx ).c_str(),
FMT_IU( aDimension->m_crossBarOy ).c_str(),
FMT_IU( aDimension->m_crossBarFx ).c_str(),
FMT_IU( aDimension->m_crossBarFy ).c_str() );
FMT_IU( aDimension->m_crossBarO.x ).c_str(),
FMT_IU( aDimension->m_crossBarO.y ).c_str(),
FMT_IU( aDimension->m_crossBarF.x ).c_str(),
FMT_IU( aDimension->m_crossBarF.y ).c_str() );
m_out->Print( aNestLevel+1, "(arrow1a (pts (xy %s %s) (xy %s %s)))\n",
FMT_IU( aDimension->m_arrowD1Ox ).c_str(),
FMT_IU( aDimension->m_arrowD1Oy ).c_str(),
FMT_IU( aDimension->m_arrowD1Fx ).c_str(),
FMT_IU( aDimension->m_arrowD1Fy ).c_str() );
FMT_IU( aDimension->m_arrowD1O.x ).c_str(),
FMT_IU( aDimension->m_arrowD1O.y ).c_str(),
FMT_IU( aDimension->m_arrowD1F.x ).c_str(),
FMT_IU( aDimension->m_arrowD1F.y ).c_str() );
m_out->Print( aNestLevel+1, "(arrow1b (pts (xy %s %s) (xy %s %s)))\n",
FMT_IU( aDimension->m_arrowD2Ox ).c_str(),
FMT_IU( aDimension->m_arrowD2Oy ).c_str(),
FMT_IU( aDimension->m_arrowD2Fx ).c_str(),
FMT_IU( aDimension->m_arrowD2Fy ).c_str() );
FMT_IU( aDimension->m_arrowD2O.x ).c_str(),
FMT_IU( aDimension->m_arrowD2O.y ).c_str(),
FMT_IU( aDimension->m_arrowD2F.x ).c_str(),
FMT_IU( aDimension->m_arrowD2F.y ).c_str() );
m_out->Print( aNestLevel+1, "(arrow2a (pts (xy %s %s) (xy %s %s)))\n",
FMT_IU( aDimension->m_arrowG1Ox ).c_str(),
FMT_IU( aDimension->m_arrowG1Oy ).c_str(),
FMT_IU( aDimension->m_arrowG1Fx ).c_str(),
FMT_IU( aDimension->m_arrowG1Fy ).c_str() );
FMT_IU( aDimension->m_arrowG1O.x ).c_str(),
FMT_IU( aDimension->m_arrowG1O.y ).c_str(),
FMT_IU( aDimension->m_arrowG1F.x ).c_str(),
FMT_IU( aDimension->m_arrowG1F.y ).c_str() );
m_out->Print( aNestLevel+1, "(arrow2b (pts (xy %s %s) (xy %s %s)))\n",
FMT_IU( aDimension->m_arrowG2Ox ).c_str(),
FMT_IU( aDimension->m_arrowG2Oy ).c_str(),
FMT_IU( aDimension->m_arrowG2Fx ).c_str(),
FMT_IU( aDimension->m_arrowG2Fy ).c_str() );
FMT_IU( aDimension->m_arrowG2O.x ).c_str(),
FMT_IU( aDimension->m_arrowG2O.y ).c_str(),
FMT_IU( aDimension->m_arrowG2F.x ).c_str(),
FMT_IU( aDimension->m_arrowG2F.y ).c_str() );
m_out->Print( aNestLevel, ")\n" );
}
......
......@@ -2485,10 +2485,10 @@ void LEGACY_PLUGIN::loadDIMENSION()
BIU crossBarFy = biuParse( data, &data );
BIU width = biuParse( data );
dim->m_crossBarOx = crossBarOx;
dim->m_crossBarOy = crossBarOy;
dim->m_crossBarFx = crossBarFx;
dim->m_crossBarFy = crossBarFy;
dim->m_crossBarO.x = crossBarOx;
dim->m_crossBarO.y = crossBarOy;
dim->m_crossBarF.x = crossBarFx;
dim->m_crossBarF.y = crossBarFy;
dim->m_Width = width;
(void) ignore;
}
......@@ -2503,10 +2503,10 @@ void LEGACY_PLUGIN::loadDIMENSION()
BIU featureLineDFx = biuParse( data, &data );
BIU featureLineDFy = biuParse( data );
dim->m_featureLineDOx = featureLineDOx;
dim->m_featureLineDOy = featureLineDOy;
dim->m_featureLineDFx = featureLineDFx;
dim->m_featureLineDFy = featureLineDFy;
dim->m_featureLineDO.x = featureLineDOx;
dim->m_featureLineDO.y = featureLineDOy;
dim->m_featureLineDF.x = featureLineDFx;
dim->m_featureLineDF.y = featureLineDFy;
(void) ignore;
}
......@@ -2520,10 +2520,10 @@ void LEGACY_PLUGIN::loadDIMENSION()
BIU featureLineGFx = biuParse( data, &data );
BIU featureLineGFy = biuParse( data );
dim->m_featureLineGOx = featureLineGOx;
dim->m_featureLineGOy = featureLineGOy;
dim->m_featureLineGFx = featureLineGFx;
dim->m_featureLineGFy = featureLineGFy;
dim->m_featureLineGO.x = featureLineGOx;
dim->m_featureLineGO.y = featureLineGOy;
dim->m_featureLineGF.x = featureLineGFx;
dim->m_featureLineGF.y = featureLineGFy;
(void) ignore;
}
......@@ -2537,10 +2537,10 @@ void LEGACY_PLUGIN::loadDIMENSION()
BIU arrowD1Fx = biuParse( data, &data );
BIU arrowD1Fy = biuParse( data );
dim->m_arrowD1Ox = arrowD10x;
dim->m_arrowD1Oy = arrowD10y;
dim->m_arrowD1Fx = arrowD1Fx;
dim->m_arrowD1Fy = arrowD1Fy;
dim->m_arrowD1O.x = arrowD10x;
dim->m_arrowD1O.y = arrowD10y;
dim->m_arrowD1F.x = arrowD1Fx;
dim->m_arrowD1F.y = arrowD1Fy;
(void) ignore;
}
......@@ -2554,10 +2554,10 @@ void LEGACY_PLUGIN::loadDIMENSION()
BIU arrowD2Fx = biuParse( data, &data );
BIU arrowD2Fy = biuParse( data, &data );
dim->m_arrowD2Ox = arrowD2Ox;
dim->m_arrowD2Oy = arrowD2Oy;
dim->m_arrowD2Fx = arrowD2Fx;
dim->m_arrowD2Fy = arrowD2Fy;
dim->m_arrowD2O.x = arrowD2Ox;
dim->m_arrowD2O.y = arrowD2Oy;
dim->m_arrowD2F.x = arrowD2Fx;
dim->m_arrowD2F.y = arrowD2Fy;
(void) ignore;
}
......@@ -2570,10 +2570,10 @@ void LEGACY_PLUGIN::loadDIMENSION()
BIU arrowG1Fx = biuParse( data, &data );
BIU arrowG1Fy = biuParse( data, &data );
dim->m_arrowG1Ox = arrowG1Ox;
dim->m_arrowG1Oy = arrowG1Oy;
dim->m_arrowG1Fx = arrowG1Fx;
dim->m_arrowG1Fy = arrowG1Fy;
dim->m_arrowG1O.x = arrowG1Ox;
dim->m_arrowG1O.y = arrowG1Oy;
dim->m_arrowG1F.x = arrowG1Fx;
dim->m_arrowG1F.y = arrowG1Fy;
(void) ignore;
}
......@@ -2586,10 +2586,10 @@ void LEGACY_PLUGIN::loadDIMENSION()
BIU arrowG2Fx = biuParse( data, &data );
BIU arrowG2Fy = biuParse( data, &data );
dim->m_arrowG2Ox = arrowG2Ox;
dim->m_arrowG2Oy = arrowG2Oy;
dim->m_arrowG2Fx = arrowG2Fx;
dim->m_arrowG2Fy = arrowG2Fy;
dim->m_arrowG2O.x = arrowG2Ox;
dim->m_arrowG2O.y = arrowG2Oy;
dim->m_arrowG2F.x = arrowG2Fx;
dim->m_arrowG2F.y = arrowG2Fy;
(void) ignore;
}
}
......@@ -3743,38 +3743,38 @@ void LEGACY_PLUGIN::saveDIMENTION( const DIMENSION* me ) const
);
fprintf( m_fp, "Sb %d %s %s %s\n", S_SEGMENT,
fmtBIUPair( me->m_crossBarOx, me->m_crossBarOy ).c_str(),
fmtBIUPair( me->m_crossBarFx, me->m_crossBarFy ).c_str(),
fmtBIUPair( me->m_crossBarO.x, me->m_crossBarO.y ).c_str(),
fmtBIUPair( me->m_crossBarF.x, me->m_crossBarF.y ).c_str(),
fmtBIU( me->GetWidth() ).c_str() );
fprintf( m_fp, "Sd %d %s %s %s\n", S_SEGMENT,
fmtBIUPair( me->m_featureLineDOx, me->m_featureLineDOy ).c_str(),
fmtBIUPair( me->m_featureLineDFx, me->m_featureLineDFy ).c_str(),
fmtBIUPair( me->m_featureLineDO.x, me->m_featureLineDO.y ).c_str(),
fmtBIUPair( me->m_featureLineDF.x, me->m_featureLineDF.y ).c_str(),
fmtBIU( me->GetWidth() ).c_str() );
fprintf( m_fp, "Sg %d %s %s %s\n", S_SEGMENT,
fmtBIUPair( me->m_featureLineGOx, me->m_featureLineGOy ).c_str(),
fmtBIUPair( me->m_featureLineGFx, me->m_featureLineGFy ).c_str(),
fmtBIUPair( me->m_featureLineGO.x, me->m_featureLineGO.y ).c_str(),
fmtBIUPair( me->m_featureLineGF.x, me->m_featureLineGF.y ).c_str(),
fmtBIU( me->GetWidth() ).c_str() );
fprintf( m_fp, "S1 %d %s %s %s\n", S_SEGMENT,
fmtBIUPair( me->m_arrowD1Ox, me->m_arrowD1Oy ).c_str(),
fmtBIUPair( me->m_arrowD1Fx, me->m_arrowD1Fy ).c_str(),
fmtBIUPair( me->m_arrowD1O.x, me->m_arrowD1O.y ).c_str(),
fmtBIUPair( me->m_arrowD1F.x, me->m_arrowD1F.y ).c_str(),
fmtBIU( me->GetWidth() ).c_str() );
fprintf( m_fp, "S2 %d %s %s %s\n", S_SEGMENT,
fmtBIUPair( me->m_arrowD2Ox, me->m_arrowD2Oy ).c_str(),
fmtBIUPair( me->m_arrowD2Fx, me->m_arrowD2Fy ).c_str(),
fmtBIUPair( me->m_arrowD2O.x, me->m_arrowD2O.y ).c_str(),
fmtBIUPair( me->m_arrowD2F.x, me->m_arrowD2F.y ).c_str(),
fmtBIU( me->GetWidth() ).c_str() );
fprintf( m_fp, "S3 %d %s %s %s\n", S_SEGMENT,
fmtBIUPair( me->m_arrowG1Ox, me->m_arrowG1Oy ).c_str(),
fmtBIUPair( me->m_arrowG1Fx, me->m_arrowG1Fy ).c_str(),
fmtBIUPair( me->m_arrowG1O.x, me->m_arrowG1O.y ).c_str(),
fmtBIUPair( me->m_arrowG1F.x, me->m_arrowG1F.y ).c_str(),
fmtBIU( me->GetWidth() ).c_str() );
fprintf( m_fp, "S4 %d %s %s %s\n", S_SEGMENT,
fmtBIUPair( me->m_arrowG2Ox, me->m_arrowG2Oy ).c_str(),
fmtBIUPair( me->m_arrowG2Fx, me->m_arrowG2Fy ).c_str(),
fmtBIUPair( me->m_arrowG2O.x, me->m_arrowG2O.y ).c_str(),
fmtBIUPair( me->m_arrowG2F.x, me->m_arrowG2F.y ).c_str(),
fmtBIU( me->GetWidth() ).c_str() );
fprintf( m_fp, "$endCOTATION\n" );
......
......@@ -1418,8 +1418,8 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR )
if( token != T_pts )
Expecting( T_pts );
parseXY( &dimension->m_featureLineDOx, &dimension->m_featureLineDOy );
parseXY( &dimension->m_featureLineDFx, &dimension->m_featureLineDFy );
parseXY( &dimension->m_featureLineDO.x, &dimension->m_featureLineDO.y );
parseXY( &dimension->m_featureLineDF.x, &dimension->m_featureLineDF.y );
NeedRIGHT();
NeedRIGHT();
break;
......@@ -1431,8 +1431,8 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR )
if( token != T_pts )
Expecting( T_pts );
parseXY( &dimension->m_featureLineGOx, &dimension->m_featureLineGOy );
parseXY( &dimension->m_featureLineGFx, &dimension->m_featureLineGFy );
parseXY( &dimension->m_featureLineGO.x, &dimension->m_featureLineGO.y );
parseXY( &dimension->m_featureLineGF.x, &dimension->m_featureLineGF.y );
NeedRIGHT();
NeedRIGHT();
break;
......@@ -1445,8 +1445,8 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR )
if( token != T_pts )
Expecting( T_pts );
parseXY( &dimension->m_crossBarOx, &dimension->m_crossBarOy );
parseXY( &dimension->m_crossBarFx, &dimension->m_crossBarFy );
parseXY( &dimension->m_crossBarO.x, &dimension->m_crossBarO.y );
parseXY( &dimension->m_crossBarF.x, &dimension->m_crossBarF.y );
NeedRIGHT();
NeedRIGHT();
break;
......@@ -1458,8 +1458,8 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR )
if( token != T_pts )
Expecting( T_pts );
parseXY( &dimension->m_arrowD1Ox, &dimension->m_arrowD1Oy );
parseXY( &dimension->m_arrowD1Fx, &dimension->m_arrowD1Fy );
parseXY( &dimension->m_arrowD1O.x, &dimension->m_arrowD1O.y );
parseXY( &dimension->m_arrowD1F.x, &dimension->m_arrowD1F.y );
NeedRIGHT();
NeedRIGHT();
break;
......@@ -1471,8 +1471,8 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR )
if( token != T_pts )
Expecting( T_pts );
parseXY( &dimension->m_arrowD2Ox, &dimension->m_arrowD2Oy );
parseXY( &dimension->m_arrowD2Fx, &dimension->m_arrowD2Fy );
parseXY( &dimension->m_arrowD2O.x, &dimension->m_arrowD2O.y );
parseXY( &dimension->m_arrowD2F.x, &dimension->m_arrowD2F.y );
NeedRIGHT();
NeedRIGHT();
break;
......@@ -1484,8 +1484,8 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR )
if( token != T_pts )
Expecting( T_pts );
parseXY( &dimension->m_arrowG1Ox, &dimension->m_arrowG1Oy );
parseXY( &dimension->m_arrowG1Fx, &dimension->m_arrowG1Fy );
parseXY( &dimension->m_arrowG1O.x, &dimension->m_arrowG1O.y );
parseXY( &dimension->m_arrowG1F.x, &dimension->m_arrowG1F.y );
NeedRIGHT();
NeedRIGHT();
break;
......@@ -1497,8 +1497,8 @@ DIMENSION* PCB_PARSER::parseDIMENSION() throw( IO_ERROR, PARSE_ERROR )
if( token != T_pts )
Expecting( T_pts );
parseXY( &dimension->m_arrowG2Ox, &dimension->m_arrowG2Oy );
parseXY( &dimension->m_arrowG2Fx, &dimension->m_arrowG2Fy );
parseXY( &dimension->m_arrowG2O.x, &dimension->m_arrowG2O.y );
parseXY( &dimension->m_arrowG2F.x, &dimension->m_arrowG2F.y );
NeedRIGHT();
NeedRIGHT();
break;
......
......@@ -277,32 +277,32 @@ void BRDITEMS_PLOTTER::PlotDimension( DIMENSION* aDim )
PlotTextePcb( &aDim->m_Text );
draw.SetStart( wxPoint( aDim->m_crossBarOx, aDim->m_crossBarOy ));
draw.SetEnd( wxPoint( aDim->m_crossBarFx, aDim->m_crossBarFy ));
draw.SetStart( aDim->m_crossBarO );
draw.SetEnd( aDim->m_crossBarF );
PlotDrawSegment( &draw );
draw.SetStart( wxPoint( aDim->m_featureLineGOx, aDim->m_featureLineGOy ));
draw.SetEnd( wxPoint( aDim->m_featureLineGFx, aDim->m_featureLineGFy ));
draw.SetStart( aDim->m_featureLineGO);
draw.SetEnd( aDim->m_featureLineGF );
PlotDrawSegment( &draw );
draw.SetStart( wxPoint( aDim->m_featureLineDOx, aDim->m_featureLineDOy ));
draw.SetEnd( wxPoint( aDim->m_featureLineDFx, aDim->m_featureLineDFy ));
draw.SetStart( aDim->m_featureLineDO );
draw.SetEnd( aDim->m_featureLineDF );
PlotDrawSegment( &draw );
draw.SetStart( wxPoint( aDim->m_arrowD1Ox, aDim->m_arrowD1Oy ));
draw.SetEnd( wxPoint( aDim->m_arrowD1Fx, aDim->m_arrowD1Fy ));
draw.SetStart( aDim->m_arrowD1O );
draw.SetEnd( aDim->m_arrowD1F );
PlotDrawSegment( &draw );
draw.SetStart( wxPoint( aDim->m_arrowD2Ox, aDim->m_arrowD2Oy ));
draw.SetEnd( wxPoint( aDim->m_arrowD2Fx, aDim->m_arrowD2Fy ));
draw.SetStart( aDim->m_arrowD2O );
draw.SetEnd( aDim->m_arrowD2F );
PlotDrawSegment( &draw );
draw.SetStart( wxPoint( aDim->m_arrowG1Ox, aDim->m_arrowG1Oy ));
draw.SetEnd( wxPoint( aDim->m_arrowG1Fx, aDim->m_arrowG1Fy ));
draw.SetStart( aDim->m_arrowG1O );
draw.SetEnd( aDim->m_arrowG1F );
PlotDrawSegment( &draw );
draw.SetStart( wxPoint( aDim->m_arrowG2Ox, aDim->m_arrowG2Oy ));
draw.SetEnd( wxPoint( aDim->m_arrowG2Fx, aDim->m_arrowG2Fy ));
draw.SetStart( aDim->m_arrowG2O );
draw.SetEnd( aDim->m_arrowG2F );
PlotDrawSegment( &draw );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment