Loading change_log.txt +8 −17 Original line number Diff line number Diff line Loading @@ -8,23 +8,14 @@ email address. 2008-Feb-3 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ +pcbnew specctra_export.cpp was not exporting the nets correctly. beautification of a few modules. 2008-Feb-1 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ +pcbnew: SPECCTRA export now exports pads with offset OK, exports oval pads OK, and tries to do less with pcb edges that are not a connected set of lines, putting the burden back on the PCBNEW user to have clean perimeter lines. Discovered that freerouter does not support oval pads yet, asked for enhancement. Discovered a small problem if you modify a PAD in the MODULE editor but do not replicate that change throughout all module instances in the board. Is on my @todo list. Otherwise it is getting pretty good now. Most boards load into freerouter, except mine, which if exported with part numbers, hangs the freerouter! I may be away for a few days doing billable work, after which I will begin the 2 imports, *.dsn and *.ses. * specctra_export.cpp was not exporting the nets correctly, now fixed. * Had a problem with an isolated pad modification on a single module instance in the context of several unmodified instances of same module, now fixed. * Fixed oval pads to make freerouting.net happy. See: http://www.freerouting.net/usren/viewtopic.php?f=3&t=317#p408 Done with specctra export for now, will think about adding controls (by dialog) on the export later. * Beautification of a few modules. 2008-Jan-31 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> Loading pcbnew/specctra.h +37 −4 Original line number Diff line number Diff line Loading @@ -1943,10 +1943,11 @@ public: } }; class LIBRARY; class IMAGE : public ELEM_HOLDER { friend class SPECCTRA_DB; friend class LIBRARY; std::string hash; ///< a hash string used by Compare(), not Format()ed/exported. Loading @@ -1967,6 +1968,8 @@ class IMAGE : public ELEM_HOLDER KEEPOUTS keepouts; int duplicated; ///< no. times this image_id is duplicated public: IMAGE( ELEM* aParent ) : Loading @@ -1976,6 +1979,7 @@ public: unit = 0; rules = 0; place_rules = 0; duplicated = 0; } ~IMAGE() { Loading @@ -1990,12 +1994,30 @@ public: */ static int Compare( IMAGE* lhs, IMAGE* rhs ); std::string GetImageId() { if( duplicated ) { char buf[32]; std::string ret = image_id; ret += "::"; sprintf( buf, "%d", duplicated ); ret += buf; return ret; } return image_id; } void Format( OUTPUTFORMATTER* out, int nestLevel ) throw( IOError ) { const char* quote = out->GetQuoteChar( image_id.c_str() ); std::string imageId = GetImageId(); const char* quote = out->GetQuoteChar( imageId.c_str() ); out->Print( nestLevel, "(%s %s%s%s", LEXER::GetTokenText( Type() ), quote, image_id.c_str(), quote ); quote, imageId.c_str(), quote ); FormatContents( out, nestLevel+1 ); Loading Loading @@ -2205,11 +2227,22 @@ public: */ int FindIMAGE( IMAGE* aImage ) { for( unsigned i=0; i<images.size(); ++i ) unsigned i; for( i=0; i<images.size(); ++i ) { if( 0 == IMAGE::Compare( aImage, &images[i] ) ) return (int) i; } // There is no match to the IMAGE contents, but now generate a unique // name for it. int dups = 1; for( i=0; i<images.size(); ++i ) { if( 0 == aImage->image_id.compare( images[i].image_id ) ) aImage->duplicated = dups++; } return -1; } Loading pcbnew/specctra_export.cpp +26 −6 Original line number Diff line number Diff line Loading @@ -230,7 +230,7 @@ static void swapEnds( POINT_PAIRS& aList ) } } #if 1 && defined(DEBUG) #if 0 && defined(DEBUG) printf( "swapEnds():\n" ); for( unsigned i=0; i<sorted.size(); ++i ) { Loading Loading @@ -317,6 +317,7 @@ static PATH* makePath( const POINT& aStart, const POINT& aEnd, const std::string } /* static QARC* makeArc( const POINT& aStart, const POINT& aEnd, const POINT& aCenter, const std::string& aLayerName ) { Loading @@ -328,6 +329,7 @@ static QARC* makeArc( const POINT& aStart, const POINT& aEnd, qarc->SetLayerId( aLayerName.c_str() ); return qarc; } */ IMAGE* SPECCTRA_DB::makeIMAGE( MODULE* aModule ) Loading Loading @@ -582,10 +584,10 @@ void SPECCTRA_DB::makePADSTACKs( BOARD* aBoard, TYPE_COLLECTOR& aPads ) { if( doLayer[layer] ) { // each oval is 2 lines and 4 (quarter circle) qarcs SHAPE* shape; PATH* path; #if 0 // each oval is 2 lines and 4 (quarter circle) qarcs QARC* qarc; shape = new SHAPE( padstack ); Loading Loading @@ -639,6 +641,14 @@ void SPECCTRA_DB::makePADSTACKs( BOARD* aBoard, TYPE_COLLECTOR& aPads ) POINT( -dr, 0.0 ), // aCenter layerName ); shape->SetShape( qarc ); #else // see http://www.freerouting.net/usren/viewtopic.php?f=3&t=317#p408 shape = new SHAPE( padstack ); padstack->Append( shape ); path = makePath( POINT(-dr, 0.0), POINT(dr, 0.0), layerName ); shape->SetShape( path ); path->aperture_width = 2.0 * radius; #endif ++coppers; } Loading @@ -654,10 +664,10 @@ void SPECCTRA_DB::makePADSTACKs( BOARD* aBoard, TYPE_COLLECTOR& aPads ) { if( doLayer[layer] ) { // each oval is 2 lines and 2 qarcs SHAPE* shape; PATH* path; #if 0 // each oval is 2 lines and 2 qarcs QARC* qarc; shape = new SHAPE( padstack ); Loading Loading @@ -711,6 +721,14 @@ void SPECCTRA_DB::makePADSTACKs( BOARD* aBoard, TYPE_COLLECTOR& aPads ) POINT( 0.0, -dr ), // aCenter layerName ); shape->SetShape( qarc ); #else // see http://www.freerouting.net/usren/viewtopic.php?f=3&t=317#p408 shape = new SHAPE( padstack ); padstack->Append( shape ); path = makePath( POINT(0.0, -dr), POINT(0.0, dr), layerName ); shape->SetShape( path ); path->aperture_width = 2.0 * radius; #endif ++coppers; } Loading Loading @@ -1061,7 +1079,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) // and made it different from what is in the PCBNEW library. Need to test // each image for uniqueness, not just based on name as is done here: COMPONENT* comp = pcb->placement->LookupCOMPONENT( registered->image_id ); COMPONENT* comp = pcb->placement->LookupCOMPONENT( registered->GetImageId() ); PLACE* place = new PLACE( comp ); comp->places.push_back( place ); Loading Loading @@ -1130,6 +1148,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) } } #if 1 // do existing wires and vias //-----<create the wires from tracks>----------------------------------- { Loading Loading @@ -1236,6 +1255,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) } } #endif // do existing wires and vias //-----<via_descriptor>------------------------------------------------- { Loading Loading
change_log.txt +8 −17 Original line number Diff line number Diff line Loading @@ -8,23 +8,14 @@ email address. 2008-Feb-3 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ +pcbnew specctra_export.cpp was not exporting the nets correctly. beautification of a few modules. 2008-Feb-1 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ +pcbnew: SPECCTRA export now exports pads with offset OK, exports oval pads OK, and tries to do less with pcb edges that are not a connected set of lines, putting the burden back on the PCBNEW user to have clean perimeter lines. Discovered that freerouter does not support oval pads yet, asked for enhancement. Discovered a small problem if you modify a PAD in the MODULE editor but do not replicate that change throughout all module instances in the board. Is on my @todo list. Otherwise it is getting pretty good now. Most boards load into freerouter, except mine, which if exported with part numbers, hangs the freerouter! I may be away for a few days doing billable work, after which I will begin the 2 imports, *.dsn and *.ses. * specctra_export.cpp was not exporting the nets correctly, now fixed. * Had a problem with an isolated pad modification on a single module instance in the context of several unmodified instances of same module, now fixed. * Fixed oval pads to make freerouting.net happy. See: http://www.freerouting.net/usren/viewtopic.php?f=3&t=317#p408 Done with specctra export for now, will think about adding controls (by dialog) on the export later. * Beautification of a few modules. 2008-Jan-31 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> Loading
pcbnew/specctra.h +37 −4 Original line number Diff line number Diff line Loading @@ -1943,10 +1943,11 @@ public: } }; class LIBRARY; class IMAGE : public ELEM_HOLDER { friend class SPECCTRA_DB; friend class LIBRARY; std::string hash; ///< a hash string used by Compare(), not Format()ed/exported. Loading @@ -1967,6 +1968,8 @@ class IMAGE : public ELEM_HOLDER KEEPOUTS keepouts; int duplicated; ///< no. times this image_id is duplicated public: IMAGE( ELEM* aParent ) : Loading @@ -1976,6 +1979,7 @@ public: unit = 0; rules = 0; place_rules = 0; duplicated = 0; } ~IMAGE() { Loading @@ -1990,12 +1994,30 @@ public: */ static int Compare( IMAGE* lhs, IMAGE* rhs ); std::string GetImageId() { if( duplicated ) { char buf[32]; std::string ret = image_id; ret += "::"; sprintf( buf, "%d", duplicated ); ret += buf; return ret; } return image_id; } void Format( OUTPUTFORMATTER* out, int nestLevel ) throw( IOError ) { const char* quote = out->GetQuoteChar( image_id.c_str() ); std::string imageId = GetImageId(); const char* quote = out->GetQuoteChar( imageId.c_str() ); out->Print( nestLevel, "(%s %s%s%s", LEXER::GetTokenText( Type() ), quote, image_id.c_str(), quote ); quote, imageId.c_str(), quote ); FormatContents( out, nestLevel+1 ); Loading Loading @@ -2205,11 +2227,22 @@ public: */ int FindIMAGE( IMAGE* aImage ) { for( unsigned i=0; i<images.size(); ++i ) unsigned i; for( i=0; i<images.size(); ++i ) { if( 0 == IMAGE::Compare( aImage, &images[i] ) ) return (int) i; } // There is no match to the IMAGE contents, but now generate a unique // name for it. int dups = 1; for( i=0; i<images.size(); ++i ) { if( 0 == aImage->image_id.compare( images[i].image_id ) ) aImage->duplicated = dups++; } return -1; } Loading
pcbnew/specctra_export.cpp +26 −6 Original line number Diff line number Diff line Loading @@ -230,7 +230,7 @@ static void swapEnds( POINT_PAIRS& aList ) } } #if 1 && defined(DEBUG) #if 0 && defined(DEBUG) printf( "swapEnds():\n" ); for( unsigned i=0; i<sorted.size(); ++i ) { Loading Loading @@ -317,6 +317,7 @@ static PATH* makePath( const POINT& aStart, const POINT& aEnd, const std::string } /* static QARC* makeArc( const POINT& aStart, const POINT& aEnd, const POINT& aCenter, const std::string& aLayerName ) { Loading @@ -328,6 +329,7 @@ static QARC* makeArc( const POINT& aStart, const POINT& aEnd, qarc->SetLayerId( aLayerName.c_str() ); return qarc; } */ IMAGE* SPECCTRA_DB::makeIMAGE( MODULE* aModule ) Loading Loading @@ -582,10 +584,10 @@ void SPECCTRA_DB::makePADSTACKs( BOARD* aBoard, TYPE_COLLECTOR& aPads ) { if( doLayer[layer] ) { // each oval is 2 lines and 4 (quarter circle) qarcs SHAPE* shape; PATH* path; #if 0 // each oval is 2 lines and 4 (quarter circle) qarcs QARC* qarc; shape = new SHAPE( padstack ); Loading Loading @@ -639,6 +641,14 @@ void SPECCTRA_DB::makePADSTACKs( BOARD* aBoard, TYPE_COLLECTOR& aPads ) POINT( -dr, 0.0 ), // aCenter layerName ); shape->SetShape( qarc ); #else // see http://www.freerouting.net/usren/viewtopic.php?f=3&t=317#p408 shape = new SHAPE( padstack ); padstack->Append( shape ); path = makePath( POINT(-dr, 0.0), POINT(dr, 0.0), layerName ); shape->SetShape( path ); path->aperture_width = 2.0 * radius; #endif ++coppers; } Loading @@ -654,10 +664,10 @@ void SPECCTRA_DB::makePADSTACKs( BOARD* aBoard, TYPE_COLLECTOR& aPads ) { if( doLayer[layer] ) { // each oval is 2 lines and 2 qarcs SHAPE* shape; PATH* path; #if 0 // each oval is 2 lines and 2 qarcs QARC* qarc; shape = new SHAPE( padstack ); Loading Loading @@ -711,6 +721,14 @@ void SPECCTRA_DB::makePADSTACKs( BOARD* aBoard, TYPE_COLLECTOR& aPads ) POINT( 0.0, -dr ), // aCenter layerName ); shape->SetShape( qarc ); #else // see http://www.freerouting.net/usren/viewtopic.php?f=3&t=317#p408 shape = new SHAPE( padstack ); padstack->Append( shape ); path = makePath( POINT(0.0, -dr), POINT(0.0, dr), layerName ); shape->SetShape( path ); path->aperture_width = 2.0 * radius; #endif ++coppers; } Loading Loading @@ -1061,7 +1079,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) // and made it different from what is in the PCBNEW library. Need to test // each image for uniqueness, not just based on name as is done here: COMPONENT* comp = pcb->placement->LookupCOMPONENT( registered->image_id ); COMPONENT* comp = pcb->placement->LookupCOMPONENT( registered->GetImageId() ); PLACE* place = new PLACE( comp ); comp->places.push_back( place ); Loading Loading @@ -1130,6 +1148,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) } } #if 1 // do existing wires and vias //-----<create the wires from tracks>----------------------------------- { Loading Loading @@ -1236,6 +1255,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) } } #endif // do existing wires and vias //-----<via_descriptor>------------------------------------------------- { Loading