Commit 1794a2ae authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Updated boost to version 1.34. Added boost::polygon (experimental).

Fixed some issues with wxWidgets 2.9.1 (fixed Gerbview and Pcbnew crashes under Linux when starting. Could explain also crashes under MACOSX)
Code cleaning.
pcbnew:
    Added experimental zone fill calculations with boost::polygon
    old file zones_convert_brd_items_to_polygons.cpp has now 2 versions:
    zones_convert_brd_items_to_polygons_with_Boost.cpp use boost::polygon to calculate filled areas
    zones_convert_brd_items_to_polygons_with_BKbool.cpp use kbool (code cleaned).
    >>> to use boost polygon version:
        call cmake with option: -DUSE_BOOST_POLYGON_LIBRARY=ON
Eeschema: added patches from Yuri Khalyavin
parents 5ae97bb3 60c1cbe8
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -4,6 +4,20 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.


2010-jul-27, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++all:
    Updated boost to version 1.34
    Added boost::polygon (experimental)
++pcbnew:
    Added experimental zone fill calculations with boost::polygon
    old file zones_convert_brd_items_to_polygons.cpp has now 2 versions:
    zones_convert_brd_items_to_polygons_with_Boost.cpp use boost::polygon to calculate filled areas
    zones_convert_brd_items_to_polygons_with_BKbool.cpp use kbool (code cleaned).

    >>> to use boost polygon version:
        call cmake with option: -DUSE_BOOST_POLYGON_LIBRARY=ON

2010-jul-12, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
2010-jul-12, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
================================================================================
++pcbnew:
++pcbnew:
+7 −0
Original line number Original line Diff line number Diff line
@@ -24,6 +24,8 @@ option(USE_WX_ZOOM "Use wxDC to perform zooming (default OFF). Warning, this is
option(USE_WX_GRAPHICS_CONTEXT
option(USE_WX_GRAPHICS_CONTEXT
       "Use wxGraphicsContext for rendering (default OFF).  Warning, this is experimental")
       "Use wxGraphicsContext for rendering (default OFF).  Warning, this is experimental")


option(USE_BOOST_POLYGON_LIBRARY
       "Use boost polygon library instead of Kbool to calculate filled areas in zones (default OFF). Warning, this is experimental")


#================================================
#================================================
# Set flags for GCC.
# Set flags for GCC.
@@ -58,6 +60,11 @@ if(USE_WX_GRAPHICS_CONTEXT)
    add_definitions(-DUSE_WX_GRAPHICS_CONTEXT)
    add_definitions(-DUSE_WX_GRAPHICS_CONTEXT)
endif(USE_WX_GRAPHICS_CONTEXT)
endif(USE_WX_GRAPHICS_CONTEXT)


if(USE_BOOST_POLYGON_LIBRARY)
    set( USE_BOOST_POLYGON_LIBRARY ON )
    add_definitions(-DUSE_BOOST_POLYGON_LIBRARY)
endif(USE_WX_GRAPHICS_CONTEXT)

# Locations for install targets.
# Locations for install targets.
set(KICAD_BIN bin
set(KICAD_BIN bin
    CACHE PATH "Location of KiCad binaries.")
    CACHE PATH "Location of KiCad binaries.")
+4 −2
Original line number Original line Diff line number Diff line
@@ -88,12 +88,12 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
	brightSizer->Add( m_buttonLoad, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
	brightSizer->Add( m_buttonLoad, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	
	m_buttonExportEeschema = new wxButton( this, wxID_ANY, _("Export to eeschema"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonExportEeschema = new wxButton( this, wxID_ANY, _("Export to eeschema"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonExportEeschema->SetToolTip( _("Create a lib file for Eeschema") );
	m_buttonExportEeschema->SetToolTip( _("Create a library file for Eeschema\nThis library contains only one component: logo") );
	
	
	brightSizer->Add( m_buttonExportEeschema, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
	brightSizer->Add( m_buttonExportEeschema, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	
	m_buttonExportPcbnew = new wxButton( this, wxID_ANY, _("Export to Pcbnew"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonExportPcbnew = new wxButton( this, wxID_ANY, _("Export to Pcbnew"), wxDefaultPosition, wxDefaultSize, 0 );
	m_buttonExportPcbnew->SetToolTip( _("Create a footprint file for PcbNew") );
	m_buttonExportPcbnew->SetToolTip( _("Create a footprint file for PcbNew\nThis footprint contains only one footprint: logo") );
	
	
	brightSizer->Add( m_buttonExportPcbnew, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
	brightSizer->Add( m_buttonExportPcbnew, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	
@@ -108,6 +108,8 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
	brightSizer->Add( m_ThresholdText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	brightSizer->Add( m_ThresholdText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
	
	
	m_sliderThreshold = new wxSlider( this, wxID_ANY, 25, 0, 50, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP );
	m_sliderThreshold = new wxSlider( this, wxID_ANY, 25, 0, 50, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP );
	m_sliderThreshold->SetToolTip( _("Adjust the level to convert the greysvale picture to the binary picture.") );
	
	brightSizer->Add( m_sliderThreshold, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	brightSizer->Add( m_sliderThreshold, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
	
	
	bMainSizer->Add( brightSizer, 0, wxEXPAND, 5 );
	bMainSizer->Add( brightSizer, 0, wxEXPAND, 5 );
+3 −3
Original line number Original line Diff line number Diff line
@@ -851,7 +851,7 @@
                                <property name="size"></property>
                                <property name="size"></property>
                                <property name="style"></property>
                                <property name="style"></property>
                                <property name="subclass"></property>
                                <property name="subclass"></property>
                                <property name="tooltip">Create a lib file for Eeschema</property>
                                <property name="tooltip">Create a library file for Eeschema&#x0A;This library contains only one component: logo</property>
                                <property name="window_extra_style"></property>
                                <property name="window_extra_style"></property>
                                <property name="window_name"></property>
                                <property name="window_name"></property>
                                <property name="window_style"></property>
                                <property name="window_style"></property>
@@ -903,7 +903,7 @@
                                <property name="size"></property>
                                <property name="size"></property>
                                <property name="style"></property>
                                <property name="style"></property>
                                <property name="subclass"></property>
                                <property name="subclass"></property>
                                <property name="tooltip">Create a footprint file for PcbNew</property>
                                <property name="tooltip">Create a footprint file for PcbNew&#x0A;This footprint contains only one footprint: logo</property>
                                <property name="window_extra_style"></property>
                                <property name="window_extra_style"></property>
                                <property name="window_name"></property>
                                <property name="window_name"></property>
                                <property name="window_style"></property>
                                <property name="window_style"></property>
@@ -1060,7 +1060,7 @@
                                <property name="size"></property>
                                <property name="size"></property>
                                <property name="style">wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP</property>
                                <property name="style">wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP</property>
                                <property name="subclass"></property>
                                <property name="subclass"></property>
                                <property name="tooltip"></property>
                                <property name="tooltip">Adjust the level to convert the greysvale picture to the binary picture.</property>
                                <property name="value">25</property>
                                <property name="value">25</property>
                                <property name="window_extra_style"></property>
                                <property name="window_extra_style"></property>
                                <property name="window_name"></property>
                                <property name="window_name"></property>
+23 −18
Original line number Original line Diff line number Diff line
@@ -364,28 +364,33 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
}
}




/*
/** Function SetToolID
 * Enables the icon of the selected tool in the vertical toolbar.
 * Enables the icon of the selected tool in the vertical toolbar.
 * (Or tool ID_NO_SELECT_BUTT default if no new selection)
 * (Or tool ID_NO_SELECT_BUTT default if no new selection)
 * if (id >= 0)
 * @param aId = new m_ID_current_state value (if aId >= 0)
 * @param aCursor = the new cursor shape (0 = default cursor)
 * @param aTitle = tool message in status bar
 * if (aId >= 0)
 * Updates all variables related:
 * Updates all variables related:
 * Message m_ID_current_state, cursor
 *      m_ID_current_state, cursor shape and message in status bar
 * If (id < 0)
 * If (aId < 0)
 * Only updates the variables message and cursor
 *      Only updates the cursor shape and message in status bar
 *      (does not the current m_ID_current_state value
 */
 */
void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
void WinEDA_DrawFrame::SetToolID( int aId, int aCursor,
                                  const wxString& title )
                                  const wxString& aToolMsg )
{
{
    // Change Cursor
    // Keep default cursor in toolbars
    SetCursor( wxNullCursor );
    // Change Cursor in DrawPanel only
    if( DrawPanel )
    if( DrawPanel )
    {
    {
        DrawPanel->m_PanelDefaultCursor = new_cursor_id;
        DrawPanel->m_PanelDefaultCursor = aCursor;
        DrawPanel->SetCursor( new_cursor_id );
        DrawPanel->SetCursor( aCursor );
    }
    }
    SetCursor( wxCURSOR_ARROW );
    DisplayToolMsg( aToolMsg );
    DisplayToolMsg( title );


    if( id < 0 )
    if( aId < 0 )
        return;
        return;


    // Old Tool ID_NO_SELECT_BUTT active or inactive if no new tool.
    // Old Tool ID_NO_SELECT_BUTT active or inactive if no new tool.
@@ -399,7 +404,7 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
    }
    }
    else
    else
    {
    {
        if( id )
        if( aId )
        {
        {
            if( m_VToolBar )
            if( m_VToolBar )
                m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, FALSE );
                m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, FALSE );
@@ -411,18 +416,18 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
            m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );
            m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );
    }
    }


    if( id )
    if( aId )
    {
    {
        if( m_VToolBar )
        if( m_VToolBar )
            m_VToolBar->ToggleTool( id, TRUE );
            m_VToolBar->ToggleTool( aId, TRUE );


        if( m_AuxVToolBar )
        if( m_AuxVToolBar )
            m_AuxVToolBar->ToggleTool( id, TRUE );
            m_AuxVToolBar->ToggleTool( aId, TRUE );
    }
    }
    else if( m_VToolBar )
    else if( m_VToolBar )
        m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );
        m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );


    m_ID_current_state = id;
    m_ID_current_state = aId;
    if( m_VToolBar )
    if( m_VToolBar )
        m_VToolBar->Refresh( );
        m_VToolBar->Refresh( );
}
}
Loading