Loading change_log.txt +17 −2 Original line number Diff line number Diff line Loading @@ -4,6 +4,21 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. 2007-Nov-30 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ +pcbnew * added virtual GetPosition() to BOARD_ITEM and derivatives. * added classes DRC, REPORT_ISSUE, DRC_ITEM and rearranged drc.cpp entirely to comprize the DRC class. The result has finer granularity of functions and each is fairly well documented in English, see drc_stuff.h. Keeping old stuff commented out at bottom of drc.cpp until some more usage and testing is done. * Made the DRC dialog modeless, so it can sit off to the side while the MARKER are inspected one by one. Need another 4-8 hours or so to finish the actual dialog display, remove debug statements and finish testing. 2007-Nov-29 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> ================================================================================ +pcbnew: Loading include/base_struct.h +7 −0 Original line number Diff line number Diff line Loading @@ -456,6 +456,13 @@ public: BOARD_ITEM* Back() const { return (BOARD_ITEM*) Pback; } BOARD_ITEM* GetParent() const { return (BOARD_ITEM*) m_Parent; } /** * Function GetPosition * returns the position of this object. * @return wxPoint& - The position of this object, non-const so it * can be changed */ virtual wxPoint& GetPosition() = 0; /** * Function GetLayer Loading include/pcbstruct.h +34 −3 Original line number Diff line number Diff line Loading @@ -199,8 +199,11 @@ enum DisplayViaMode { class BOARD : public BOARD_ITEM { friend class WinEDA_PcbFrame; private: std::vector<MARKER*> m_markers; ///< MARKERs which we own by pointer std::vector<MARKER*> m_markers; ///< MARKERs for clearance problems, owned by pointer // std::vector<MARKER*> m_markersUnconnected; ///< MARKERs for unconnected problems, owned by pointer public: WinEDA_BasePcbFrame* m_PcbFrame; // Window de visualisation Loading Loading @@ -233,6 +236,14 @@ public: BOARD( EDA_BaseStruct* StructFather, WinEDA_BasePcbFrame* frame ); ~BOARD(); /** * Function GetPosition * is here to satisfy BOARD_ITEM's requirements, but this implementation * is a dummy. * @return const wxPoint& of (0,0) */ wxPoint& GetPosition(); /* supprime du chainage la structure Struct */ void UnLink(); Loading Loading @@ -275,7 +286,16 @@ public: int GetNumSegmTrack(); int GetNumSegmZone(); int GetNumNoconnect(); // retourne le nombre de connexions manquantes int GetNumRatsnests(); // retourne le nombre de chevelus /** * Function GetNumRatsnests * @return int - The number of rats */ int GetNumRatsnests() { return m_NbLinks; } int GetNumNodes(); // retourne le nombre de pads a netcode > 0 // Calcul du rectangle d'encadrement: Loading Loading @@ -407,7 +427,18 @@ public: DRAWSEGMENT( BOARD_ITEM* StructFather, KICAD_T idtype = TYPEDRAWSEGMENT ); ~DRAWSEGMENT(); // Read/write data /** * Function GetPosition * returns the position of this object. * Required by pure virtual BOARD_ITEM::GetPosition() * @return const wxPoint& - The position of this object. */ wxPoint& GetPosition() { return m_Start; } /** * Function Save Loading include/wxstruct.h +6 −1 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ class Ki_PageDescr; class Ki_HotkeyInfo; class GENERAL_COLLECTOR; class GENERAL_COLLECTORS_GUIDE; class DRC; enum id_librarytype { Loading Loading @@ -574,6 +575,9 @@ private: bool m_SelViaSizeBox_Changed; wxMenu* m_FilesMenu; DRC* m_drc; ///< the DRC controller, see drc.cpp // we'll use lower case function names for private member functions. void createPopUpMenuForFootprints( MODULE* aModule, wxMenu* aPopMenu ); void createPopUpMenuForFpTexts( TEXTE_MODULE* aText, wxMenu* aPopMenu ); Loading Loading @@ -655,7 +659,6 @@ public: MODULE* ListAndSelectModuleName(); void Liste_Equipot( wxCommandEvent& event ); void Swap_Layers( wxCommandEvent& event ); int Test_DRC( wxDC* DC, bool TestPad2Pad, bool TestZone ); void Install_Test_DRC_Frame( wxDC* DC ); void Trace_Pcb( wxDC* DC, int mode ); Loading Loading @@ -719,6 +722,8 @@ public: bool PlaceDraggedTrackSegment( TRACK* Track, wxDC* DC ); void Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC ); void SwitchLayer( wxDC* DC, int layer ); int Add_45_degrees_Segment( wxDC* DC, TRACK* pt_segm ); bool Genere_Pad_Connexion( wxDC* DC, int layer ); // zone handling EDGE_ZONE* Del_SegmEdgeZone( wxDC* DC, EDGE_ZONE* edge_zone ); Loading pcbnew/autoplac.cpp +17 −8 Original line number Diff line number Diff line Loading @@ -865,22 +865,25 @@ float WinEDA_PcbFrame::Compute_Ratsnest_PlaceModule( wxDC* DC ) CHEVELU* pt_local_chevelu; int ii; float cout, icout; int ox, oy, fx, fy, dx, dy; int ox, oy; int fx, fy; int dx, dy; if( (m_Pcb->m_Status_Pcb & CHEVELU_LOCAL_OK) == 0 ) return -1; pt_local_chevelu = local_liste_chevelu; ii = nb_local_chevelu; cout = 0; ii = nb_local_chevelu; cout = 0; while( ii-- > 0 ) { if( !(pt_local_chevelu->status & LOCAL_CHEVELU) ) { ox = pt_local_chevelu->pad_start->m_Pos.x - g_Offset_Module.x; oy = pt_local_chevelu->pad_start->m_Pos.y - g_Offset_Module.y; fx = pt_local_chevelu->pad_end->m_Pos.x; fy = pt_local_chevelu->pad_end->m_Pos.y; ox = pt_local_chevelu->pad_start->GetPosition().x - g_Offset_Module.x; oy = pt_local_chevelu->pad_start->GetPosition().y - g_Offset_Module.y; fx = pt_local_chevelu->pad_end->GetPosition().x; fy = pt_local_chevelu->pad_end->GetPosition().y; if( AutoPlaceShowAll ) { Loading @@ -889,12 +892,18 @@ float WinEDA_PcbFrame::Compute_Ratsnest_PlaceModule( wxDC* DC ) } /* Evaluation du cout du chevelu: */ dx = fx - ox; dy = fy - oy; dx = abs( dx ); dy = abs( dy ); dx = fx - ox; dy = fy - oy; dx = abs( dx ); dy = abs( dy ); if( dx < dy ) EXCHG( dx, dy );/* dx >= dy */ /* cout de la distance: */ icout = (float) dx * dx; /* cout de l'inclinaison */ icout += 3 * (float) dy * dy; icout = sqrt( icout ); Loading Loading
change_log.txt +17 −2 Original line number Diff line number Diff line Loading @@ -4,6 +4,21 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. 2007-Nov-30 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ +pcbnew * added virtual GetPosition() to BOARD_ITEM and derivatives. * added classes DRC, REPORT_ISSUE, DRC_ITEM and rearranged drc.cpp entirely to comprize the DRC class. The result has finer granularity of functions and each is fairly well documented in English, see drc_stuff.h. Keeping old stuff commented out at bottom of drc.cpp until some more usage and testing is done. * Made the DRC dialog modeless, so it can sit off to the side while the MARKER are inspected one by one. Need another 4-8 hours or so to finish the actual dialog display, remove debug statements and finish testing. 2007-Nov-29 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> ================================================================================ +pcbnew: Loading
include/base_struct.h +7 −0 Original line number Diff line number Diff line Loading @@ -456,6 +456,13 @@ public: BOARD_ITEM* Back() const { return (BOARD_ITEM*) Pback; } BOARD_ITEM* GetParent() const { return (BOARD_ITEM*) m_Parent; } /** * Function GetPosition * returns the position of this object. * @return wxPoint& - The position of this object, non-const so it * can be changed */ virtual wxPoint& GetPosition() = 0; /** * Function GetLayer Loading
include/pcbstruct.h +34 −3 Original line number Diff line number Diff line Loading @@ -199,8 +199,11 @@ enum DisplayViaMode { class BOARD : public BOARD_ITEM { friend class WinEDA_PcbFrame; private: std::vector<MARKER*> m_markers; ///< MARKERs which we own by pointer std::vector<MARKER*> m_markers; ///< MARKERs for clearance problems, owned by pointer // std::vector<MARKER*> m_markersUnconnected; ///< MARKERs for unconnected problems, owned by pointer public: WinEDA_BasePcbFrame* m_PcbFrame; // Window de visualisation Loading Loading @@ -233,6 +236,14 @@ public: BOARD( EDA_BaseStruct* StructFather, WinEDA_BasePcbFrame* frame ); ~BOARD(); /** * Function GetPosition * is here to satisfy BOARD_ITEM's requirements, but this implementation * is a dummy. * @return const wxPoint& of (0,0) */ wxPoint& GetPosition(); /* supprime du chainage la structure Struct */ void UnLink(); Loading Loading @@ -275,7 +286,16 @@ public: int GetNumSegmTrack(); int GetNumSegmZone(); int GetNumNoconnect(); // retourne le nombre de connexions manquantes int GetNumRatsnests(); // retourne le nombre de chevelus /** * Function GetNumRatsnests * @return int - The number of rats */ int GetNumRatsnests() { return m_NbLinks; } int GetNumNodes(); // retourne le nombre de pads a netcode > 0 // Calcul du rectangle d'encadrement: Loading Loading @@ -407,7 +427,18 @@ public: DRAWSEGMENT( BOARD_ITEM* StructFather, KICAD_T idtype = TYPEDRAWSEGMENT ); ~DRAWSEGMENT(); // Read/write data /** * Function GetPosition * returns the position of this object. * Required by pure virtual BOARD_ITEM::GetPosition() * @return const wxPoint& - The position of this object. */ wxPoint& GetPosition() { return m_Start; } /** * Function Save Loading
include/wxstruct.h +6 −1 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ class Ki_PageDescr; class Ki_HotkeyInfo; class GENERAL_COLLECTOR; class GENERAL_COLLECTORS_GUIDE; class DRC; enum id_librarytype { Loading Loading @@ -574,6 +575,9 @@ private: bool m_SelViaSizeBox_Changed; wxMenu* m_FilesMenu; DRC* m_drc; ///< the DRC controller, see drc.cpp // we'll use lower case function names for private member functions. void createPopUpMenuForFootprints( MODULE* aModule, wxMenu* aPopMenu ); void createPopUpMenuForFpTexts( TEXTE_MODULE* aText, wxMenu* aPopMenu ); Loading Loading @@ -655,7 +659,6 @@ public: MODULE* ListAndSelectModuleName(); void Liste_Equipot( wxCommandEvent& event ); void Swap_Layers( wxCommandEvent& event ); int Test_DRC( wxDC* DC, bool TestPad2Pad, bool TestZone ); void Install_Test_DRC_Frame( wxDC* DC ); void Trace_Pcb( wxDC* DC, int mode ); Loading Loading @@ -719,6 +722,8 @@ public: bool PlaceDraggedTrackSegment( TRACK* Track, wxDC* DC ); void Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC ); void SwitchLayer( wxDC* DC, int layer ); int Add_45_degrees_Segment( wxDC* DC, TRACK* pt_segm ); bool Genere_Pad_Connexion( wxDC* DC, int layer ); // zone handling EDGE_ZONE* Del_SegmEdgeZone( wxDC* DC, EDGE_ZONE* edge_zone ); Loading
pcbnew/autoplac.cpp +17 −8 Original line number Diff line number Diff line Loading @@ -865,22 +865,25 @@ float WinEDA_PcbFrame::Compute_Ratsnest_PlaceModule( wxDC* DC ) CHEVELU* pt_local_chevelu; int ii; float cout, icout; int ox, oy, fx, fy, dx, dy; int ox, oy; int fx, fy; int dx, dy; if( (m_Pcb->m_Status_Pcb & CHEVELU_LOCAL_OK) == 0 ) return -1; pt_local_chevelu = local_liste_chevelu; ii = nb_local_chevelu; cout = 0; ii = nb_local_chevelu; cout = 0; while( ii-- > 0 ) { if( !(pt_local_chevelu->status & LOCAL_CHEVELU) ) { ox = pt_local_chevelu->pad_start->m_Pos.x - g_Offset_Module.x; oy = pt_local_chevelu->pad_start->m_Pos.y - g_Offset_Module.y; fx = pt_local_chevelu->pad_end->m_Pos.x; fy = pt_local_chevelu->pad_end->m_Pos.y; ox = pt_local_chevelu->pad_start->GetPosition().x - g_Offset_Module.x; oy = pt_local_chevelu->pad_start->GetPosition().y - g_Offset_Module.y; fx = pt_local_chevelu->pad_end->GetPosition().x; fy = pt_local_chevelu->pad_end->GetPosition().y; if( AutoPlaceShowAll ) { Loading @@ -889,12 +892,18 @@ float WinEDA_PcbFrame::Compute_Ratsnest_PlaceModule( wxDC* DC ) } /* Evaluation du cout du chevelu: */ dx = fx - ox; dy = fy - oy; dx = abs( dx ); dy = abs( dy ); dx = fx - ox; dy = fy - oy; dx = abs( dx ); dy = abs( dy ); if( dx < dy ) EXCHG( dx, dy );/* dx >= dy */ /* cout de la distance: */ icout = (float) dx * dx; /* cout de l'inclinaison */ icout += 3 * (float) dy * dy; icout = sqrt( icout ); Loading