Merge trunk @5250
This commit is contained in:
commit
c9d3fd6d89
2
Doxyfile
2
Doxyfile
|
@ -690,7 +690,7 @@ RECURSIVE = YES
|
|||
# Note that relative paths are relative to the directory from which doxygen is
|
||||
# run.
|
||||
|
||||
EXCLUDE = include/boost
|
||||
EXCLUDE = polygon/clipper.cpp
|
||||
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @file sch_bitmap.cpp
|
||||
* @file class_bitmap_base.cpp
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -93,6 +93,11 @@ const wxString PROJECT::GetProjectFullName() const
|
|||
return m_project_name.GetFullPath();
|
||||
}
|
||||
|
||||
const wxString PROJECT::GetProjectPath() const
|
||||
{
|
||||
return m_project_name.GetPathWithSep();
|
||||
}
|
||||
|
||||
|
||||
const wxString PROJECT::FootprintLibTblName() const
|
||||
{
|
||||
|
@ -248,10 +253,10 @@ static bool copy_pro_file_template( const SEARCH_STACK& aSearchS, const wxString
|
|||
|
||||
|
||||
wxConfigBase* PROJECT::configCreate( const SEARCH_STACK& aSList,
|
||||
const wxString& aGroupName, const wxString& aFileName )
|
||||
const wxString& aGroupName, const wxString& aProjectFileName )
|
||||
{
|
||||
wxConfigBase* cfg = 0;
|
||||
wxString cur_pro_fn = !aFileName ? GetProjectFullName() : aFileName;
|
||||
wxString cur_pro_fn = !aProjectFileName ? GetProjectFullName() : aProjectFileName;
|
||||
|
||||
if( wxFileName( cur_pro_fn ).IsFileReadable() )
|
||||
{
|
||||
|
|
|
@ -121,8 +121,6 @@ public:
|
|||
* allocates and adds a part library to the library list.
|
||||
*
|
||||
* @param aFileName - File name object of part library.
|
||||
* @param aErrorMsg - Error message if the part library failed to load.
|
||||
* @return PART_LIB* - the new PART_LIB, which remains owned by this PART_LIBS container.
|
||||
* @throw IO_ERROR if there's any problem loading.
|
||||
*/
|
||||
PART_LIB* AddLibrary( const wxString& aFileName ) throw( IO_ERROR );
|
||||
|
@ -136,7 +134,8 @@ public:
|
|||
* @return PART_LIB* - the new PART_LIB, which remains owned by this PART_LIBS container.
|
||||
* @throw IO_ERROR if there's any problem loading.
|
||||
*/
|
||||
PART_LIB* AddLibrary( const wxString& aFileName, PART_LIBS::iterator& aIterator ) throw( IO_ERROR );
|
||||
PART_LIB* AddLibrary( const wxString& aFileName,
|
||||
PART_LIBS::iterator& aIterator ) throw( IO_ERROR );
|
||||
|
||||
/**
|
||||
* Function RemoveLibrary
|
||||
|
|
|
@ -97,7 +97,7 @@ public:
|
|||
|
||||
/** Function GetSelectedAlias
|
||||
*
|
||||
* @param if not-NULL, the selected sub-unit is set here.
|
||||
* @param aUnit : if not NULL, the selected sub-unit is set here.
|
||||
* @return the selected alias or NULL if there is none, or there is no tree.
|
||||
*/
|
||||
LIB_ALIAS* GetSelectedAlias( int* aUnit );
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <class_sch_screen.h>
|
||||
#include <wxEeschemaStruct.h>
|
||||
#include <base_units.h>
|
||||
#include <sch_sheet.h>
|
||||
#include <dialog_plot_schematic.h>
|
||||
|
||||
// Keys for configuration
|
||||
|
@ -183,8 +184,7 @@ void DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked( wxCommandEvent& even
|
|||
if( dialog.ShowModal() == wxID_YES )
|
||||
{
|
||||
|
||||
wxString plotFilePath = m_parent->GetUniqueFilenameForCurrentSheet() + wxT( "." )
|
||||
+ PS_PLOTTER::GetDefaultFileExtension();
|
||||
wxString plotFilePath = g_RootSheet->GetFileName();
|
||||
|
||||
plotFilePath = Prj().AbsolutePath(plotFilePath);
|
||||
plotFilePath = wxPathOnly( plotFilePath );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Sep 11 2014)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -28,7 +28,7 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
|
|||
|
||||
m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_outputDirectoryName->SetMaxLength( 0 );
|
||||
m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the schematic file location.") );
|
||||
m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the schematic main file location.") );
|
||||
|
||||
bSizer5->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
|
|
@ -247,7 +247,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Target directory for plot files. Can be absolute or relative to the schematic file location.</property>
|
||||
<property name="tooltip">Target directory for plot files. Can be absolute or relative to the schematic main file location.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Sep 11 2014)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
|
|
@ -431,6 +431,7 @@ private:
|
|||
* Any changes are updated in memory only and NOT to a file. The old component is
|
||||
* deleted from the library and/or any aliases before the edited component is updated
|
||||
* in the library.
|
||||
* @param aLib - the part library where the part must be saved.
|
||||
* @param aPromptUser true to ask for confirmation, when the part_lib is already existing
|
||||
* in memory, false to save silently
|
||||
* @return true if the part was saved, false if aborted by user
|
||||
|
|
|
@ -211,6 +211,7 @@ public:
|
|||
/**
|
||||
* Function AnnotatePowerSymbols
|
||||
* annotates the power symbols only starting at \a aReference in the sheet path.
|
||||
* @param aLibs the library list to use
|
||||
* @param aReference A pointer to the number for the reference designator of the
|
||||
* first power symbol to be annotated. If the pointer is NULL
|
||||
* the annotation starts at 1. The number is incremented for
|
||||
|
@ -221,10 +222,12 @@ public:
|
|||
/**
|
||||
* Function GetComponents
|
||||
* adds a SCH_REFERENCE() object to \a aReferences for each component in the sheet.
|
||||
* @param aLibs the library list to use
|
||||
* @param aReferences List of references to populate.
|
||||
* @param aIncludePowerSymbols Set to false to only get normal components.
|
||||
* @param aIncludePowerSymbols : false to only get normal components.
|
||||
*/
|
||||
void GetComponents( PART_LIBS* aLibs, SCH_REFERENCE_LIST& aReferences, bool aIncludePowerSymbols = true );
|
||||
void GetComponents( PART_LIBS* aLibs, SCH_REFERENCE_LIST& aReferences,
|
||||
bool aIncludePowerSymbols = true );
|
||||
|
||||
/**
|
||||
* Function SetFootprintField
|
||||
|
@ -391,6 +394,7 @@ public:
|
|||
/**
|
||||
* Function AnnotatePowerSymbols
|
||||
* clear and annotates the entire hierarchy of the sheet path list.
|
||||
* @param aLib the library list to use
|
||||
*/
|
||||
void AnnotatePowerSymbols( PART_LIBS* aLib );
|
||||
|
||||
|
@ -398,6 +402,7 @@ public:
|
|||
* Function GetComponents
|
||||
* adds a SCH_REFERENCE() object to \a aReferences for each component in the list
|
||||
* of sheets.
|
||||
* @param aLibs the library list to use
|
||||
* @param aReferences List of references to populate.
|
||||
* @param aIncludePowerSymbols Set to false to only get normal components.
|
||||
*/
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
#include <dialogs/dialog_sch_sheet_props.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <project.h>
|
||||
|
||||
|
||||
bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
||||
|
@ -85,7 +86,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
|||
// Duplicate sheet names are not valid.
|
||||
const SCH_SHEET* sheet = GetScreen()->GetSheet( dlg.GetSheetName() );
|
||||
|
||||
if( (sheet != NULL) && (sheet != aSheet) )
|
||||
if( sheet && sheet != aSheet )
|
||||
{
|
||||
DisplayError( this, wxString::Format( _( "A sheet named \"%s\" already exists." ),
|
||||
GetChars( dlg.GetSheetName() ) ) );
|
||||
|
@ -101,29 +102,36 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
|||
bool loadFromFile = false;
|
||||
SCH_SCREEN* useScreen = NULL;
|
||||
|
||||
wxString newFullFilename = fileName.GetFullPath();
|
||||
// Inside Eeschema, filenames are stored using unix notation
|
||||
newFullFilename.Replace( wxT("\\"), wxT("/") );
|
||||
wxString newFilename = fileName.GetFullPath();
|
||||
|
||||
// Search for a schematic file having the same filename exists,
|
||||
// already in use in the hierarchy, or on disk,
|
||||
// in order to reuse it
|
||||
if( !g_RootSheet->SearchHierarchy( newFullFilename, &useScreen ) )
|
||||
loadFromFile = fileName.FileExists();
|
||||
// Search for a schematic file having the same filename
|
||||
// already in use in the hierarchy or on disk, in order to reuse it.
|
||||
if( !g_RootSheet->SearchHierarchy( newFilename, &useScreen ) )
|
||||
{
|
||||
// if user entered a relative path, allow that to stay, but do the
|
||||
// file existence test with an absolute (full) path. This transformation
|
||||
// is local to this scope, but is the same one used at load time later.
|
||||
wxString absolute = Prj().AbsolutePath( newFilename );
|
||||
|
||||
loadFromFile = wxFileExists( absolute );
|
||||
}
|
||||
|
||||
// Inside Eeschema, filenames are stored using unix notation
|
||||
newFilename.Replace( wxT("\\"), wxT("/") );
|
||||
|
||||
if( aSheet->GetScreen() == NULL ) // New sheet.
|
||||
{
|
||||
if( ( useScreen != NULL ) || loadFromFile ) // Load from existing file.
|
||||
if( useScreen || loadFromFile ) // Load from existing file.
|
||||
{
|
||||
if( useScreen != NULL )
|
||||
{
|
||||
msg.Printf( _( "A file named '%s' already exists in the current schematic hierarchy." ),
|
||||
GetChars( newFullFilename ) );
|
||||
GetChars( newFilename ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.Printf( _( "A file named '%s' already exists." ),
|
||||
GetChars( newFullFilename ) );
|
||||
GetChars( newFilename ) );
|
||||
}
|
||||
|
||||
msg += _("\n\nDo you want to create a sheet with the contents of this file?" );
|
||||
|
@ -139,7 +147,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
|||
else // New file.
|
||||
{
|
||||
aSheet->SetScreen( new SCH_SCREEN( &Kiway() ) );
|
||||
aSheet->GetScreen()->SetFileName( newFullFilename );
|
||||
aSheet->GetScreen()->SetFileName( newFilename );
|
||||
}
|
||||
}
|
||||
else // Existing sheet.
|
||||
|
@ -151,24 +159,24 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
|||
// to avoid issues under Windows, although under Unix
|
||||
// filenames are case sensitive.
|
||||
// But many users create schematic under both Unix and Windows
|
||||
if( newFullFilename.CmpNoCase( aSheet->GetFileName() ) != 0 )
|
||||
if( newFilename.CmpNoCase( aSheet->GetFileName() ) != 0 )
|
||||
{
|
||||
// Sheet file name changes cannot be undone.
|
||||
isUndoable = false;
|
||||
msg = _( "Changing the sheet file name cannot be undone. " );
|
||||
|
||||
if( ( useScreen != NULL ) || loadFromFile ) // Load from existing file.
|
||||
if( useScreen || loadFromFile ) // Load from existing file.
|
||||
{
|
||||
wxString tmp;
|
||||
if( useScreen != NULL )
|
||||
{
|
||||
tmp.Printf( _( "A file named <%s> already exists in the current schematic hierarchy." ),
|
||||
GetChars( newFullFilename ) );
|
||||
GetChars( newFilename ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp.Printf( _( "A file named <%s> already exists." ),
|
||||
GetChars( newFullFilename ) );
|
||||
GetChars( newFilename ) );
|
||||
}
|
||||
|
||||
msg += tmp;
|
||||
|
@ -203,7 +211,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
|||
|
||||
if( renameFile )
|
||||
{
|
||||
aSheet->GetScreen()->SetFileName( newFullFilename );
|
||||
aSheet->GetScreen()->SetFileName( newFilename );
|
||||
SaveEEFile( aSheet->GetScreen() );
|
||||
|
||||
// If the the associated screen is shared by more than one sheet, remove the
|
||||
|
@ -217,7 +225,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
|||
}
|
||||
}
|
||||
|
||||
aSheet->SetFileName( newFullFilename );
|
||||
aSheet->SetFileName( newFilename );
|
||||
|
||||
if( useScreen )
|
||||
aSheet->SetScreen( useScreen );
|
||||
|
|
|
@ -49,8 +49,11 @@ public:
|
|||
|
||||
/**
|
||||
* Constructor
|
||||
* @param aKiway
|
||||
* @param aParent = the parent frame
|
||||
* @param aFrameType must be given either FRAME_SCH_LIB_VIEWER or
|
||||
* FRAME_SCH_LIB_VIEWER_MODAL
|
||||
* @param aLibrary = the library to open when starting (default = NULL)
|
||||
*/
|
||||
LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
||||
FRAME_T aFrameType, PART_LIB* aLibrary = NULL );
|
||||
|
@ -115,10 +118,11 @@ public:
|
|||
/**
|
||||
* Set the selected component.
|
||||
*
|
||||
* @param the alias name of the component to be selected.
|
||||
* @param aComponentName : the name of the component to be selected.
|
||||
*/
|
||||
void SetSelectedComponent( const wxString& aComponentName );
|
||||
|
||||
// Accessors:
|
||||
void SetUnit( int aUnit ) { m_unit = aUnit; }
|
||||
int GetUnit( void ) { return m_unit; }
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ EDA_COLOR_T ColorFindNearest( const wxColour &aColor );
|
|||
* Find the nearest color match
|
||||
* @param aR is the red component of the color to be matched (in range 0-255)
|
||||
* @param aG is the green component of the color to be matched (in range 0-255)
|
||||
* @param aG is the blue component of the color to be matched (in range 0-255)
|
||||
* @param aB is the blue component of the color to be matched (in range 0-255)
|
||||
*/
|
||||
EDA_COLOR_T ColorFindNearest( int aR, int aG, int aB );
|
||||
|
||||
|
|
|
@ -584,8 +584,8 @@ void SystemDirsAppend( SEARCH_STACK* aSearchStack );
|
|||
* <p>
|
||||
* Return the KiCad help file with path and extension.
|
||||
* Help files can be html (.html ext) or pdf (.pdf ext) files.
|
||||
* A <BaseName>.html file is searched and if not found,
|
||||
* <BaseName>.pdf file is searched in the same path.
|
||||
* A \<BaseName\>.html file is searched and if not found,
|
||||
* \<BaseName\>.pdf file is searched in the same path.
|
||||
* If the help file for the current locale is not found, an attempt to find
|
||||
* the English version of the help file is made.
|
||||
* Help file is searched in directories in this order:
|
||||
|
|
|
@ -199,9 +199,9 @@ public:
|
|||
* Function FromHSV()
|
||||
* Changes currently used color to the one given by hue, saturation and value parameters.
|
||||
*
|
||||
* @param aOutH is hue component.
|
||||
* @param aOutS is saturation component.
|
||||
* @param aOutV is value component.
|
||||
* @param aInH is hue component.
|
||||
* @param aInS is saturation component.
|
||||
* @param aInV is value component.
|
||||
*/
|
||||
void FromHSV( double aInH, double aInS, double aInV );
|
||||
|
||||
|
|
|
@ -44,13 +44,13 @@ public:
|
|||
NONCACHED_CONTAINER( unsigned int aSize = defaultInitSize );
|
||||
virtual ~NONCACHED_CONTAINER();
|
||||
|
||||
///< @copydoc VERTEX_CONTAINER::SetItem()
|
||||
///< @copydoc VERTEX_CONTAINER::SetItem( VERTEX_ITEM* aItem )
|
||||
virtual void SetItem( VERTEX_ITEM* aItem );
|
||||
|
||||
///< @copydoc VERTEX_CONTAINER::Allocate()
|
||||
///< @copydoc VERTEX_CONTAINER::Allocate( unsigned int aSize )
|
||||
virtual VERTEX* Allocate( unsigned int aSize );
|
||||
|
||||
///< @copydoc VERTEX_CONTAINER::Delete()
|
||||
///< @copydoc VERTEX_CONTAINER::Delete( VERTEX_ITEM* aItem )
|
||||
void Delete( VERTEX_ITEM* aItem ) {};
|
||||
|
||||
///< @copydoc VERTEX_CONTAINER::Clear()
|
||||
|
|
|
@ -99,7 +99,7 @@ public:
|
|||
/**
|
||||
* Function GetVertices()
|
||||
* returns vertices stored at the specific offset.
|
||||
* @aOffset is the offset.
|
||||
* @param aOffset is the offset.
|
||||
*/
|
||||
virtual inline VERTEX* GetVertices( unsigned int aOffset ) const
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
/**
|
||||
* Function GetSize()
|
||||
* Returns information about number of vertices stored.
|
||||
* @param Number of vertices.
|
||||
* @return Number of vertices.
|
||||
*/
|
||||
inline unsigned int GetSize() const
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ public:
|
|||
|
||||
/**
|
||||
* Function GetVertices()
|
||||
* Returns pointer to the data used by the VERTEX_ITEM.
|
||||
* areturn a pointer to the data used by the VERTEX_ITEM.
|
||||
*/
|
||||
VERTEX* GetVertices() const;
|
||||
|
||||
|
|
|
@ -123,7 +123,6 @@ public:
|
|||
/// Find all within search rectangle
|
||||
/// \param a_min Min of search bounding rect
|
||||
/// \param a_max Max of search bounding rect
|
||||
/// \param a_searchResult Search result array. Caller should set grow size. Function will reset, not append to array.
|
||||
/// \param a_resultCallback Callback function to return result. Callback should return 'true' to continue searching
|
||||
/// \param a_context User context to pass as parameter to a_resultCallback
|
||||
/// \return Returns the number of entries found
|
||||
|
|
|
@ -112,8 +112,8 @@ public:
|
|||
* @param aMTV minimum translation vector
|
||||
* @return true, if there is a collision.
|
||||
*/
|
||||
virtual bool Collide( const SHAPE* aShape, int aClerance, VECTOR2I& aMTV ) const;
|
||||
virtual bool Collide( const SHAPE* aShape, int aClerance = 0 ) const;
|
||||
virtual bool Collide( const SHAPE* aShape, int aClearance, VECTOR2I& aMTV ) const;
|
||||
virtual bool Collide( const SHAPE* aShape, int aClearance = 0 ) const;
|
||||
|
||||
/**
|
||||
* Function Collide()
|
||||
|
@ -129,7 +129,7 @@ public:
|
|||
*
|
||||
* Computes a bounding box of the shape, with a margin of aClearance
|
||||
* a collision.
|
||||
* @aClearance how much the bounding box is expanded wrs to the minimum enclosing rectangle
|
||||
* @param aClearance how much the bounding box is expanded wrs to the minimum enclosing rectangle
|
||||
* for the shape.
|
||||
* @return the bounding box.
|
||||
*/
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
* It is used by SHAPE_INDEX to get a SHAPE* from another type.
|
||||
* By default relies on T::GetShape() method, should be specialized if the T object
|
||||
* doesn't allow that method.
|
||||
* @param object generic T object
|
||||
* @param aItem generic T object
|
||||
* @return a SHAPE* object equivalent to object.
|
||||
*/
|
||||
template <class T>
|
||||
|
@ -59,7 +59,7 @@ const SHAPE* shapeFunctor( SHAPE* aItem );
|
|||
* It is used by SHAPE_INDEX to get the bounding box of a generic T object.
|
||||
* By default relies on T::BBox() method, should be specialized if the T object
|
||||
* doesn't allow that method.
|
||||
* @param object generic T object
|
||||
* @param aObject generic T object
|
||||
* @return a BOX2I object containing the bounding box of the T object.
|
||||
*/
|
||||
template <class T>
|
||||
|
@ -75,8 +75,8 @@ BOX2I boundingBox( T aObject )
|
|||
* It is used by SHAPE_INDEX to implement Accept().
|
||||
* By default relies on V::operation() redefinition, should be specialized if V class
|
||||
* doesn't have its () operation defined to accept T objects.
|
||||
* @param object generic T object
|
||||
* @param visitor V visitor object
|
||||
* @param aObject generic T object
|
||||
* @param aVisitor V visitor object
|
||||
*/
|
||||
template <class T, class V>
|
||||
void acceptVisitor( T aObject, V aVisitor )
|
||||
|
@ -91,9 +91,9 @@ void acceptVisitor( T aObject, V aVisitor )
|
|||
* It is used by SHAPE_INDEX to implement Query().
|
||||
* By default relies on T::Collide(U) method, should be specialized if the T object
|
||||
* doesn't allow that method.
|
||||
* @param object generic T object
|
||||
* @param anotherObject generic U object
|
||||
* @param minDistance minimum collision distance
|
||||
* @param aObject generic T object
|
||||
* @param aAnotherObject generic U object
|
||||
* @param aMinDistance minimum collision distance
|
||||
* @return if object and anotherObject collide
|
||||
*/
|
||||
template <class T, class U>
|
||||
|
@ -126,7 +126,7 @@ class SHAPE_INDEX
|
|||
* Function Init()
|
||||
*
|
||||
* Setup the internal tree iterator.
|
||||
* @param tree pointer to a RTREE object
|
||||
* @param aTree pointer to a RTREE object
|
||||
*/
|
||||
void Init( RTree<T, int, 2, float>* aTree )
|
||||
{
|
||||
|
@ -138,7 +138,7 @@ class SHAPE_INDEX
|
|||
* Iterator constructor
|
||||
*
|
||||
* Creates an iterator for the index object
|
||||
* @param index SHAPE_INDEX object to iterate
|
||||
* @param aIndex SHAPE_INDEX object to iterate
|
||||
*/
|
||||
Iterator( SHAPE_INDEX* aIndex )
|
||||
{
|
||||
|
@ -244,7 +244,7 @@ class SHAPE_INDEX
|
|||
* Function Accept()
|
||||
*
|
||||
* Accepts a visitor for every SHAPE object contained in this INDEX.
|
||||
* @param visitor Visitor object to be run
|
||||
* @param aVisitor Visitor object to be run
|
||||
*/
|
||||
template <class V>
|
||||
void Accept( V aVisitor )
|
||||
|
@ -271,9 +271,9 @@ class SHAPE_INDEX
|
|||
* Function Query()
|
||||
*
|
||||
* Runs a callback on every SHAPE object contained in the bounding box of (shape).
|
||||
* @param shape shape to search against
|
||||
* @param minDistance distance threshold
|
||||
* @param visitor object to be invoked on every object contained in the search area.
|
||||
* @param aShape shape to search against
|
||||
* @param aMinDistance distance threshold
|
||||
* @param aVisitor object to be invoked on every object contained in the search area.
|
||||
*/
|
||||
template <class V>
|
||||
int Query( const SHAPE *aShape, int aMinDistance, V& aVisitor, bool aExact )
|
||||
|
|
|
@ -270,7 +270,7 @@ public:
|
|||
* Function Collide()
|
||||
*
|
||||
* Checks if box aBox lies closer to us than aClearance.
|
||||
* @param aP the box to check for collisions with
|
||||
* @param aBox the box to check for collisions with
|
||||
* @param aClearance minimum distance that does not qualify as a collision.
|
||||
* @return true, when a collision has been found
|
||||
*/
|
||||
|
|
|
@ -78,12 +78,12 @@ public:
|
|||
* @param a00 is the component [0,0].
|
||||
* @param a01 is the component [0,1].
|
||||
* @param a02 is the component [0,2].
|
||||
* @param a10 is the component [1,0].
|
||||
* @param a11 is the component [1,1].
|
||||
* @param a12 is the component [1,2].
|
||||
* @param a13 is the component [1,3].
|
||||
* @param a20 is the component [2,0].
|
||||
* @param a21 is the component [2,1].
|
||||
* @param a00 is the component [2,2].
|
||||
* @param a22 is the component [2,2].
|
||||
*/
|
||||
MATRIX3x3( T a00, T a01, T a02, T a10, T a11, T a12, T a20, T a21, T a22 );
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ public:
|
|||
* Function SetHighlight
|
||||
* Turns on/off highlighting - it may be done for the active layer or the specified net.
|
||||
* @param aEnabled tells if highlighting should be enabled.
|
||||
* @param aNetCode is optional and if specified, turns on higlighting only for the net with
|
||||
* @param aNetcode is optional and if specified, turns on higlighting only for the net with
|
||||
* number given as the parameter.
|
||||
*/
|
||||
inline void SetHighlight( bool aEnabled, int aNetcode = -1 )
|
||||
|
@ -180,7 +180,7 @@ public:
|
|||
/**
|
||||
* Function TranslateColor
|
||||
* Returns the color responding to the one of EDA_COLOR_T enum values.
|
||||
* @param EDA_COLOR_T color equivalent.
|
||||
* @param aColor equivalent.
|
||||
*/
|
||||
inline const COLOR4D& TranslateColor( EDA_COLOR_T aColor )
|
||||
{
|
||||
|
|
|
@ -68,8 +68,8 @@ struct prof_counter
|
|||
/**
|
||||
* Function prof_start
|
||||
* Begins code execution time counting for a given profiling counter.
|
||||
* @param cnt is the counter which should be started.
|
||||
* @param use_rdtsc tells if processor's time-stamp counter should be used for time counting.
|
||||
* @param aCnt is the counter which should be started.
|
||||
* use_rdtsc tells if processor's time-stamp counter should be used for time counting.
|
||||
* Otherwise is system tics method will be used. IMPORTANT: time-stamp counter should not
|
||||
* be used on multicore machines executing threaded code.
|
||||
*/
|
||||
|
@ -81,7 +81,7 @@ static inline void prof_start( prof_counter* aCnt )
|
|||
/**
|
||||
* Function prof_stop
|
||||
* Ends code execution time counting for a given profiling counter.
|
||||
* @param cnt is the counter which should be stopped.
|
||||
* @param aCnt is the counter which should be stopped.
|
||||
*/
|
||||
static inline void prof_end( prof_counter* aCnt )
|
||||
{
|
||||
|
|
|
@ -86,6 +86,13 @@ public:
|
|||
*/
|
||||
VTBL_ENTRY const wxString GetProjectFullName() const;
|
||||
|
||||
/**
|
||||
* Function GetProjectPath
|
||||
* returns the full path of the project. This is the path
|
||||
* of the *.pro file and will always be an absolute path, ending by a dir separator.
|
||||
*/
|
||||
VTBL_ENTRY const wxString GetProjectPath() const;
|
||||
|
||||
/**
|
||||
* Function FootprintLibTblName
|
||||
* returns the path and filename of this project's fp-lib-table,
|
||||
|
@ -98,8 +105,8 @@ public:
|
|||
* saves the current "project" parameters into the wxConfigBase* derivative.
|
||||
* Then the wxConfigBase derivative is written to the *.pro file for the project.
|
||||
*
|
||||
* @param aSearchS a SEARCH_STACK
|
||||
* @param aGroupName
|
||||
* @param aSList a SEARCH_STACK
|
||||
* @param aGroupName is the name of the group inside the config which contains parameters
|
||||
* @param aParams is a ptr vector of PARAM_CFG_BASE derivatives.
|
||||
* Saved parameters are the subset in this array having the .m_Setup member
|
||||
* set to false.
|
||||
|
@ -258,9 +265,9 @@ private:
|
|||
* @param aProjectFileName is the *.pro file to open.
|
||||
*/
|
||||
wxConfigBase* configCreate( const SEARCH_STACK& aSList,
|
||||
const wxString& aGroupName, const wxString& aFileName = wxEmptyString );
|
||||
const wxString& aGroupName, const wxString& aProjectFileName = wxEmptyString );
|
||||
|
||||
wxFileName m_project_name; ///< <fullpath>/<basename>.pro
|
||||
wxFileName m_project_name; ///< \<fullpath\>/\<basename\>.pro
|
||||
wxString m_pro_date_and_time;
|
||||
|
||||
/// @see this::SetRString(), GetRString(), and enum RSTRING_T.
|
||||
|
|
|
@ -58,8 +58,7 @@ int
|
|||
* Function StrPrintf
|
||||
* is like sprintf() but the output is returned in a std::string instead of to a
|
||||
* character array.
|
||||
* @param aResult is the string to append to, previous text is not clear()ed.
|
||||
* @param aFormat is a printf() style format string.
|
||||
* @param format is a printf() style format string.
|
||||
* @return std::string - the result of the sprintf().
|
||||
*/
|
||||
std::string
|
||||
|
|
|
@ -107,7 +107,7 @@ protected:
|
|||
* Calls the library viewer to select component to import into schematic.
|
||||
* if the library viewer is currently running, it is closed and reopened
|
||||
* in modal mode.
|
||||
* @param aPreslectedAlias Preselected component alias. NULL if none.
|
||||
* @param aPreselectedAlias Preselected component alias. NULL if none.
|
||||
* @param aUnit Pointer to Unit-number. Input is the pre-selected unit, output
|
||||
* is the finally selected unit by the user. Can be NULL.
|
||||
* @param aConvert Pointer to deMorgan conversion. Input is what is pre-selected,
|
||||
|
|
|
@ -54,9 +54,9 @@ public:
|
|||
* Constructor
|
||||
*
|
||||
* @param aToolMgr: tool manager instance the events will be sent to
|
||||
* @param aEditFrame: the frame wx events come from
|
||||
*/
|
||||
TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr );
|
||||
|
||||
virtual ~TOOL_DISPATCHER();
|
||||
|
||||
/**
|
||||
|
|
|
@ -252,11 +252,12 @@ public:
|
|||
|
||||
/**
|
||||
* Sets behaviour of the tool's context popup menu.
|
||||
* @param aTool - the parent tool
|
||||
* @param aMenu - the menu structure, defined by the tool
|
||||
* @param aTrigger - when the menu is activated:
|
||||
* CMENU_NOW: opens the menu right now
|
||||
* CMENU_BUTTON: opens the menu when RMB is pressed
|
||||
* CMENU_OFF: menu is disabled.
|
||||
* CMENU_NOW: opens the menu right now
|
||||
* CMENU_BUTTON: opens the menu when RMB is pressed
|
||||
* CMENU_OFF: menu is disabled.
|
||||
* May be called from a coroutine context.
|
||||
*/
|
||||
void ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu,
|
||||
|
@ -309,7 +310,7 @@ private:
|
|||
/**
|
||||
* Function dispatchStandardEvents()
|
||||
* Handles specific events, that are intended for TOOL_MANAGER rather than tools.
|
||||
* @aEvent is the event to be processed.
|
||||
* @param aEvent is the event to be processed.
|
||||
* @return False if the event was processed and should not go any further.
|
||||
*/
|
||||
bool dispatchStandardEvents( TOOL_EVENT& aEvent );
|
||||
|
@ -350,7 +351,7 @@ private:
|
|||
* Makes a tool active, so it can receive events and react to them. Activated tool is pushed
|
||||
* on the active tools stack, so the last activated tool receives events first.
|
||||
*
|
||||
* @param aToolId is the name of tool to be run.
|
||||
* @param aName is the name of tool to be run.
|
||||
*/
|
||||
bool runTool( const std::string& aName );
|
||||
|
||||
|
@ -359,7 +360,7 @@ private:
|
|||
* Makes a tool active, so it can receive events and react to them. Activated tool is pushed
|
||||
* on the active tools stack, so the last activated tool receives events first.
|
||||
*
|
||||
* @param aToolId is the tool to be run.
|
||||
* @param aTool is the tool to be run.
|
||||
*/
|
||||
bool runTool( TOOL_BASE* aTool );
|
||||
|
||||
|
@ -379,7 +380,7 @@ private:
|
|||
* Returns information about a tool registration status.
|
||||
*
|
||||
* @param aTool is the tool to be checked.
|
||||
* @return True if the tool is in the registered tools list, false otherwise.
|
||||
* @return true if the tool is in the registered tools list, false otherwise.
|
||||
*/
|
||||
bool isRegistered( TOOL_BASE* aTool ) const
|
||||
{
|
||||
|
|
|
@ -65,7 +65,6 @@ public:
|
|||
/**
|
||||
* Constructor.
|
||||
* @param aIsDynamic decides whether we are creating a static or a dynamic VIEW.
|
||||
* @param aUseGroups tells if items added to the VIEW should be stored in groups.
|
||||
*/
|
||||
VIEW( bool aIsDynamic = true );
|
||||
|
||||
|
@ -192,6 +191,7 @@ public:
|
|||
* Function SetScale()
|
||||
* Sets the scaling factor, zooming around a given anchor point.
|
||||
* (depending on correct GAL unit length & DPI settings).
|
||||
* @param aAnchor: the zooming anchor point
|
||||
* @param aScale: the scale factor
|
||||
*/
|
||||
void SetScale( double aScale, const VECTOR2D& aAnchor );
|
||||
|
@ -235,7 +235,7 @@ public:
|
|||
* Function ToWorld()
|
||||
* Converts a screen space one dimensional size to a one dimensional size in world
|
||||
* space coordinates.
|
||||
* @param aCoord: the size to be converted
|
||||
* @param aSize : the size to be converted
|
||||
*/
|
||||
double ToWorld( double aSize ) const;
|
||||
|
||||
|
@ -383,7 +383,7 @@ public:
|
|||
* Enables or disables display of the top layer. When disabled - layers are rendered as usual
|
||||
* with no influence from SetTopLayer function. Otherwise on the top there is displayed the
|
||||
* layer set previously with SetTopLayer function.
|
||||
* @param aEnabled: whether to enable or disable display of the top layer.
|
||||
* @param aEnable whether to enable or disable display of the top layer.
|
||||
*/
|
||||
void EnableTopLayer( bool aEnable );
|
||||
|
||||
|
@ -574,7 +574,7 @@ private:
|
|||
* Function draw()
|
||||
* Draws a group of items on all layers that those items use.
|
||||
*
|
||||
* @param aItem is the group to be drawn.
|
||||
* @param aGroup is the group to be drawn.
|
||||
* @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode
|
||||
* for cached items.
|
||||
*/
|
||||
|
|
|
@ -125,7 +125,7 @@ public:
|
|||
/**
|
||||
* Function SetAutoPanMArgin()
|
||||
* Sets margin for autopanning (ie. the area when autopanning becomes active).
|
||||
* @param aSpeed is a new margin for autopanning.
|
||||
* @param aMargin is a new margin for autopanning.
|
||||
*/
|
||||
virtual void SetAutoPanMargin( float aMargin )
|
||||
{
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
*/
|
||||
virtual void SetValue( double aValue );
|
||||
|
||||
/**
|
||||
/*
|
||||
* Function GetValue
|
||||
* Returns the current value using specified units (if currently used units are different, then
|
||||
* they are converted first).
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include <menus_helpers.h>
|
||||
|
||||
|
||||
#define TreeFrameWidthEntry wxT( "LeftWinWidth" )
|
||||
#define TREE_FRAME_WIDTH_ENTRY wxT( "LeftWinWidth" )
|
||||
|
||||
|
||||
KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent,
|
||||
|
@ -440,13 +440,11 @@ void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event )
|
|||
#include <wx/filefn.h>
|
||||
void KICAD_MANAGER_FRAME::OnRunGerbview( wxCommandEvent& event )
|
||||
{
|
||||
|
||||
// Gerbview is called without any file to open, because we do not know
|
||||
// the list and the name of files to open (if any...).
|
||||
// however we run it in the path of the project
|
||||
wxFileName fn( GetProjectFileName() );
|
||||
wxString cwd = wxGetCwd();
|
||||
wxSetWorkingDirectory( fn.GetPathWithSep() );
|
||||
wxSetWorkingDirectory( Prj().GetProjectPath() );
|
||||
Execute( this, GERBVIEW_EXE, wxEmptyString );
|
||||
wxSetWorkingDirectory( cwd );
|
||||
}
|
||||
|
@ -470,7 +468,7 @@ void KICAD_MANAGER_FRAME::OnOpenFileInTextEditor( wxCommandEvent& event )
|
|||
#endif
|
||||
|
||||
mask = _( "Text file (" ) + mask + wxT( ")|" ) + mask;
|
||||
wxString default_dir = wxFileName( Prj().GetProjectFullName() ).GetPathWithSep();
|
||||
wxString default_dir = Prj().GetProjectPath();
|
||||
|
||||
wxFileDialog dlg( this, _( "Load File to Edit" ), default_dir,
|
||||
wxEmptyString, mask, wxFD_OPEN );
|
||||
|
@ -509,14 +507,14 @@ void KICAD_MANAGER_FRAME::ClearMsg()
|
|||
void KICAD_MANAGER_FRAME::LoadSettings( wxConfigBase* aCfg )
|
||||
{
|
||||
EDA_BASE_FRAME::LoadSettings( aCfg );
|
||||
aCfg->Read( TreeFrameWidthEntry, &m_leftWinWidth );
|
||||
aCfg->Read( TREE_FRAME_WIDTH_ENTRY, &m_leftWinWidth );
|
||||
}
|
||||
|
||||
|
||||
void KICAD_MANAGER_FRAME::SaveSettings( wxConfigBase* aCfg )
|
||||
{
|
||||
EDA_BASE_FRAME::SaveSettings( aCfg );
|
||||
aCfg->Write( TreeFrameWidthEntry, m_LeftWin->GetSize().x );
|
||||
aCfg->Write( TREE_FRAME_WIDTH_ENTRY, m_LeftWin->GetSize().x );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ void PCB_EDIT_FRAME::Autoroute( wxDC* DC, int mode )
|
|||
Module = (MODULE*) GetScreen()->GetCurItem();
|
||||
if( (Module == NULL) || (Module->Type() != PCB_MODULE_T) )
|
||||
{
|
||||
wxMessageBox( _( "Module not selected" ) );
|
||||
wxMessageBox( _( "Footprint not selected" ) );
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -136,7 +136,7 @@ void PCB_EDIT_FRAME::OnPlaceOrRouteFootprints( wxCommandEvent& event )
|
|||
case ID_POPUP_PCB_SPREAD_NEW_MODULES:
|
||||
if( GetBoard()->m_Modules == NULL )
|
||||
{
|
||||
DisplayError( this, _( "No modules found!" ) );
|
||||
DisplayError( this, _( "No footprint found!" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -651,8 +651,8 @@ public:
|
|||
* GetLayerName() if want the layer names of a specific BOARD, which could
|
||||
* be different than the default if the user has renamed any copper layers.
|
||||
*
|
||||
* @param aLayerNumber is the layer number to fetch
|
||||
* @return const wxString - containing the layer name or "BAD INDEX" if aLayerNumber
|
||||
* @param aLayerId is the layer identifier (index) to fetch
|
||||
* @return const wxString - containing the layer name or "BAD INDEX" if aLayerId
|
||||
* is not legal
|
||||
*/
|
||||
static const wxString GetStandardLayerName( LAYER_ID aLayerId )
|
||||
|
|
|
@ -254,11 +254,9 @@ void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode,
|
|||
if( panel == NULL )
|
||||
return;
|
||||
|
||||
MODULE* module = static_cast<MODULE*>( m_Parent );
|
||||
|
||||
/* parent must *not* be NULL (a module text without a footprint
|
||||
/* parent must *not* be NULL (a footprint text without a footprint
|
||||
parent has no sense) */
|
||||
wxASSERT( module );
|
||||
wxASSERT( m_Parent );
|
||||
|
||||
BOARD* brd = GetBoard( );
|
||||
|
||||
|
@ -384,7 +382,7 @@ void TEXTE_MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
|
|||
};
|
||||
|
||||
Line = module->GetReference();
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Module" ), Line, DARKCYAN ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Footprint" ), Line, DARKCYAN ) );
|
||||
|
||||
Line = GetShownText();
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Text" ), Line, BROWN ) );
|
||||
|
|
|
@ -398,8 +398,8 @@ public:
|
|||
* Function SetLayerPair
|
||||
* For a via m_Layer contains the top layer, the other layer is in
|
||||
* m_BottomLayer
|
||||
* @param top_layer = first layer connected by the via
|
||||
* @param bottom_layer = last layer connected by the via
|
||||
* @param aTopLayer = first layer connected by the via
|
||||
* @param aBottomLayer = last layer connected by the via
|
||||
*/
|
||||
void SetLayerPair( LAYER_ID aTopLayer, LAYER_ID aBottomLayer );
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ public:
|
|||
/**
|
||||
* Function HitTest
|
||||
* tests if a point is near an outline edge or a corner of this zone.
|
||||
* @param aRefPos A wxPoint to test
|
||||
* @param aPosition the wxPoint to test
|
||||
* @return bool - true if a hit, else false
|
||||
*/
|
||||
virtual bool HitTest( const wxPoint& aPosition ) const;
|
||||
|
@ -244,7 +244,7 @@ public:
|
|||
* Function HitTest
|
||||
* tests if a point is inside the zone area, i.e. inside the main outline
|
||||
* and outside holes.
|
||||
* @param aRefPos A wxPoint to test
|
||||
* @param aPosition : the wxPoint to test
|
||||
* @return bool - true if a hit, else false
|
||||
*/
|
||||
bool HitTestInsideZone( const wxPoint& aPosition ) const
|
||||
|
|
|
@ -183,9 +183,8 @@ std::string FormatProbeItem( BOARD_ITEM* aItem )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send a remote command to Eeschema via a socket,
|
||||
* @param objectToSync = item to be located on schematic (module, pin or text)
|
||||
/* Send a remote command to Eeschema via a socket,
|
||||
* aSyncItem = item to be located on schematic (module, pin or text)
|
||||
* Commands are
|
||||
* $PART: "reference" put cursor on component anchor
|
||||
* $PART: "reference" $PAD: "pad number" put cursor on the component pin
|
||||
|
|
|
@ -209,7 +209,7 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event )
|
|||
{
|
||||
if( m_parent->GetBoard()->m_Modules == NULL )
|
||||
{
|
||||
DisplayInfoMessage( this, _( "No modules" ) );
|
||||
DisplayInfoMessage( this, _( "No footprints" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event )
|
|||
|
||||
// Search for missing modules on board.
|
||||
if( missing.size() == 0 )
|
||||
list << wxT("<p><b>") << _( "No missing modules." ) << wxT("</b></p>");
|
||||
list << wxT("<p><b>") << _( "No missing footprints." ) << wxT("</b></p>");
|
||||
else
|
||||
{
|
||||
list << wxT("<p><b>") << _( "Missing:" ) << wxT("</b></p>");
|
||||
|
@ -287,7 +287,7 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event )
|
|||
|
||||
// Search for modules found on board but not in net list.
|
||||
if( notInNetlist.size() == 0 )
|
||||
list << wxT( "<p><b>" ) << _( "No extra modules." ) << wxT( "</b></p>" );
|
||||
list << wxT( "<p><b>" ) << _( "No extra footprints." ) << wxT( "</b></p>" );
|
||||
else
|
||||
{
|
||||
list << wxT( "<p><b>" ) << _( "Not in Netlist:" ) << wxT( "</b></p>" );
|
||||
|
@ -319,7 +319,7 @@ void DIALOG_NETLIST::OnTestFootprintsClick( wxCommandEvent& event )
|
|||
<< wxT( "</b></p>" );
|
||||
}
|
||||
|
||||
HTML_MESSAGE_BOX dlg( this, _( "Check Modules" ) );
|
||||
HTML_MESSAGE_BOX dlg( this, _( "Check footprints" ) );
|
||||
dlg.AddHTML_Text( list );
|
||||
dlg.ShowModal();
|
||||
}
|
||||
|
|
|
@ -554,9 +554,9 @@ void PCB_EDIT_FRAME::GenFootprintsReport( wxCommandEvent& event )
|
|||
wxString msg;
|
||||
if( success )
|
||||
{
|
||||
msg.Printf( _( "Module report file created:\n'%s'" ),
|
||||
msg.Printf( _( "Footprint report file created:\n'%s'" ),
|
||||
GetChars( fn.GetFullPath() ) );
|
||||
wxMessageBox( msg, _( "Module Report" ), wxICON_INFORMATION );
|
||||
wxMessageBox( msg, _( "Footprint Report" ), wxICON_INFORMATION );
|
||||
}
|
||||
|
||||
else
|
||||
|
|
|
@ -181,6 +181,7 @@ public:
|
|||
* @param aMirror = true to create mirrored coordinates (Y coordinates negated)
|
||||
* @param aMinimalHeader = true to use a minimal header (no comments, no info)
|
||||
* @param aOffset = drill coordinates offset
|
||||
* @param aMergePTHNPTH : true to create only one list which contains both PTH and NPTH
|
||||
*/
|
||||
void SetOptions( bool aMirror, bool aMinimalHeader, wxPoint aOffset, bool aMergePTHNPTH )
|
||||
{
|
||||
|
@ -202,6 +203,7 @@ public:
|
|||
* @param aGenerateNPTH_list :
|
||||
* true to create NPTH only list (with no plated holes)
|
||||
* false to created plated holes list (with no NPTH )
|
||||
* @param aMergePTHNPTH : true to create only one list which contains both PTH and NPTH
|
||||
*/
|
||||
void BuildHolesList( int aFirstLayer, int aLastLayer,
|
||||
bool aExcludeThroughHoles,
|
||||
|
|
|
@ -143,7 +143,7 @@ bool AskLoadBoardFileName( wxWindow* aParent, int* aCtl, wxString* aFileName, bo
|
|||
* puts up a wxFileDialog asking for a BOARD filename to save.
|
||||
*
|
||||
* @param aParent is a wxFrame passed to wxFileDialog.
|
||||
* @param aFullFileName on entry is a probable choice, on return is the
|
||||
* @param aFileName on entry is a probable choice, on return is the
|
||||
* chosen full filename (includes path).
|
||||
*
|
||||
* @return bool - true if chosen, else false if user aborted.
|
||||
|
|
|
@ -206,16 +206,17 @@ bool InvokeDXFDialogBoardImport( PCB_BASE_FRAME* aCaller )
|
|||
|
||||
bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule )
|
||||
{
|
||||
wxASSERT( aModule );
|
||||
|
||||
DIALOG_DXF_IMPORT dlg( aCaller );
|
||||
bool success = ( dlg.ShowModal() == wxID_OK );
|
||||
|
||||
if( success )
|
||||
{
|
||||
const std::list<BOARD_ITEM*>& list = dlg.GetImportedItems();
|
||||
MODULE* module = aCaller->GetBoard()->m_Modules;
|
||||
KIGFX::VIEW* view = aCaller->GetGalCanvas()->GetView();
|
||||
|
||||
aCaller->SaveCopyInUndoList( module, UR_MODEDIT );
|
||||
aCaller->SaveCopyInUndoList( aModule, UR_MODEDIT );
|
||||
aCaller->OnModify();
|
||||
|
||||
std::list<BOARD_ITEM*>::const_iterator it, itEnd;
|
||||
|
@ -230,9 +231,9 @@ bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule )
|
|||
{
|
||||
case PCB_LINE_T:
|
||||
{
|
||||
converted = new EDGE_MODULE( module );
|
||||
converted = new EDGE_MODULE( aModule );
|
||||
*static_cast<DRAWSEGMENT*>( converted ) = *static_cast<DRAWSEGMENT*>( item );
|
||||
module->Add( converted );
|
||||
aModule->Add( converted );
|
||||
static_cast<EDGE_MODULE*>( converted )->SetLocalCoord();
|
||||
delete item;
|
||||
break;
|
||||
|
@ -240,20 +241,20 @@ bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule )
|
|||
|
||||
case PCB_TEXT_T:
|
||||
{
|
||||
converted = new TEXTE_MODULE( module );
|
||||
converted = new TEXTE_MODULE( aModule );
|
||||
*static_cast<TEXTE_PCB*>( converted ) = *static_cast<TEXTE_PCB*>( item );
|
||||
module->Add( module );
|
||||
aModule->Add( converted );
|
||||
static_cast<TEXTE_MODULE*>( converted )->SetLocalCoord();
|
||||
delete item;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
assert( false ); // there is a type that is currently not handled here
|
||||
wxLogDebug( wxT( "type %d currently not handled" ), item->Type() );
|
||||
break;
|
||||
}
|
||||
|
||||
if( aCaller->IsGalCanvasActive() )
|
||||
if( aCaller->IsGalCanvasActive() && converted )
|
||||
view->Add( converted );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,10 @@ class PCB_PLOT_PARAMS;
|
|||
* Function InvokePcbLibTableEditor
|
||||
* shows the modal DIALOG_FP_LIB_TABLE for purposes of editing two lib tables.
|
||||
*
|
||||
* @param aCaller is the wxTopLevelWindow which is invoking the dialog.
|
||||
* @param aGlobal is the common footprint library table file being edited.
|
||||
* @param aProject is the project specific footprint library table file being edited.
|
||||
*
|
||||
* @return int - bits 0 and 1 tell whether a change was made to the @a aGlobal
|
||||
* and/or the @a aProject table, respectively. If set, table was modified.
|
||||
*/
|
||||
|
@ -76,7 +80,7 @@ int InvokePcbLibTableEditor( wxTopLevelWindow* aCaller, FP_LIB_TABLE* aGlobal, F
|
|||
* @param aCaller is the wxTopLevelWindow which is invoking the dialog.
|
||||
* @param aNickname is the footprint library whose options are being edited.
|
||||
* @param aPluginType is something that will pass through IO_MGR::EnumFromStr().
|
||||
* @param aOptionsIn is the options string on calling into this function.
|
||||
* @param aOptions is the options string on calling into this function.
|
||||
* @param aResult is where to put the result of the editing.
|
||||
*/
|
||||
void InvokePluginOptionsEditor( wxTopLevelWindow* aCaller, const wxString& aNickname,
|
||||
|
@ -93,9 +97,10 @@ bool InvokeDXFDialogBoardImport( PCB_BASE_FRAME* aCaller );
|
|||
|
||||
/**
|
||||
* Function InvokeDXFDialogModuleImport
|
||||
* shows the modal DIALOG_DXF_IMPORT for importing a DXF file.to a module.
|
||||
* shows the modal DIALOG_DXF_IMPORT for importing a DXF file as footprint outlines.
|
||||
*
|
||||
* @param aCaller is the wxTopLevelWindow which is invoking the dialog.
|
||||
* @param aModule is the footprint currently edited.
|
||||
* @return true if the import was made.
|
||||
*/
|
||||
bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule );
|
||||
|
@ -103,10 +108,20 @@ bool InvokeDXFDialogModuleImport( PCB_BASE_FRAME* aCaller, MODULE* aModule );
|
|||
/**
|
||||
* Function InvokeLayerSetup
|
||||
* shows the layer setup dialog
|
||||
* @param aCaller is the wxTopLevelWindow which is invoking the dialog.
|
||||
* @param aBoard is the currently edited board.
|
||||
* @return bool - true if user pressed OK (did not abort), else false.
|
||||
*/
|
||||
bool InvokeLayerSetup( wxTopLevelWindow* aCaller, BOARD* aBoard );
|
||||
|
||||
/**
|
||||
* Function InvokeSVGPrint
|
||||
* shows the SVG print dialog
|
||||
* @param aCaller is the wxTopLevelWindow which is invoking the dialog.
|
||||
* @param aBoard is the currently edited board.
|
||||
* @param aSettings is the current pcb plot parameters.
|
||||
* @return bool - true if user pressed OK (did not abort), else false.
|
||||
*/
|
||||
bool InvokeSVGPrint( wxTopLevelWindow* aCaller, BOARD* aBoard, PCB_PLOT_PARAMS* aSettings );
|
||||
|
||||
#endif // INVOKE_A_DIALOG_H_
|
||||
|
|
|
@ -415,10 +415,10 @@ wxString PCB_BASE_FRAME::SelectFootprint( EDA_DRAW_FRAME* aWindow,
|
|||
{
|
||||
wxArrayString headers;
|
||||
|
||||
headers.Add( _( "Module" ) );
|
||||
headers.Add( _( "Footprint" ) );
|
||||
headers.Add( _( "Library" ) );
|
||||
|
||||
msg.Printf( _( "Modules [%d items]" ), (int) rows.size() );
|
||||
msg.Printf( _( "Footprints [%d items]" ), (int) rows.size() );
|
||||
|
||||
EDA_LIST_DIALOG dlg( aWindow, msg, headers, rows, oldName, DisplayCmpDoc );
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName()
|
|||
{
|
||||
if( GetBoard()->m_Modules == NULL )
|
||||
{
|
||||
DisplayError( this, _( "No Modules" ) );
|
||||
DisplayError( this, _( "No footprints" ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
/**
|
||||
* Function Clone()
|
||||
*
|
||||
* Returns a deep copy of the item
|
||||
* Returns a deep copy of the item
|
||||
*/
|
||||
virtual PNS_ITEM* Clone() const = 0;
|
||||
|
||||
|
@ -111,17 +111,17 @@ public:
|
|||
*
|
||||
* Returns the type (kind) of the item
|
||||
*/
|
||||
PnsKind Kind() const
|
||||
{
|
||||
PnsKind Kind() const
|
||||
{
|
||||
return m_kind;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function OfKind()
|
||||
*
|
||||
* Returns true if the item's type matches the mask aKindMask.
|
||||
*/
|
||||
bool OfKind( int aKindMask ) const
|
||||
bool OfKind( int aKindMask ) const
|
||||
{
|
||||
return ( aKindMask & m_kind ) != 0;
|
||||
}
|
||||
|
@ -138,19 +138,19 @@ public:
|
|||
*
|
||||
* Sets the corresponding parent object in the host application's model.
|
||||
*/
|
||||
void SetParent( BOARD_CONNECTED_ITEM* aParent )
|
||||
void SetParent( BOARD_CONNECTED_ITEM* aParent )
|
||||
{
|
||||
m_parent = aParent;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Parent()
|
||||
*
|
||||
* Returns the corresponding parent object in the host application's model.
|
||||
*/
|
||||
BOARD_CONNECTED_ITEM* Parent() const
|
||||
{
|
||||
return m_parent;
|
||||
BOARD_CONNECTED_ITEM* Parent() const
|
||||
{
|
||||
return m_parent;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -158,9 +158,9 @@ public:
|
|||
*
|
||||
* Sets the item's net to aNet
|
||||
*/
|
||||
void SetNet( int aNet )
|
||||
{
|
||||
m_net = aNet;
|
||||
void SetNet( int aNet )
|
||||
{
|
||||
m_net = aNet;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -168,9 +168,9 @@ public:
|
|||
*
|
||||
* Returns the item's net.
|
||||
*/
|
||||
int Net() const
|
||||
{
|
||||
return m_net;
|
||||
int Net() const
|
||||
{
|
||||
return m_net;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -178,11 +178,11 @@ public:
|
|||
*
|
||||
* Sets the layers spanned by the item to aLayers.
|
||||
*/
|
||||
void SetLayers( const PNS_LAYERSET& aLayers )
|
||||
{
|
||||
m_layers = aLayers;
|
||||
void SetLayers( const PNS_LAYERSET& aLayers )
|
||||
{
|
||||
m_layers = aLayers;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function SetLayer()
|
||||
*
|
||||
|
@ -193,23 +193,23 @@ public:
|
|||
m_layers = PNS_LAYERSET( aLayer, aLayer );
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Function Layers()
|
||||
*
|
||||
* Returns the contiguous set of layers spanned by the item.
|
||||
*/
|
||||
const PNS_LAYERSET& Layers() const
|
||||
{
|
||||
return m_layers;
|
||||
const PNS_LAYERSET& Layers() const
|
||||
{
|
||||
return m_layers;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Layer()
|
||||
*
|
||||
* Returns the item's layer, for single-layered items only.
|
||||
*/
|
||||
virtual int Layer() const
|
||||
{
|
||||
{
|
||||
return Layers().Start();
|
||||
}
|
||||
|
||||
|
@ -227,27 +227,27 @@ public:
|
|||
/**
|
||||
* Functon SetOwner()
|
||||
*
|
||||
* Sets the node that owns this item. An item can belong to a single
|
||||
* Sets the node that owns this item. An item can belong to a single
|
||||
* PNS_NODE or stay unowned.
|
||||
*/
|
||||
void SetOwner( PNS_NODE* aOwner )
|
||||
{
|
||||
m_owner = aOwner;
|
||||
void SetOwner( PNS_NODE* aOwner )
|
||||
{
|
||||
m_owner = aOwner;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function BelongsTo()
|
||||
*
|
||||
* Returns true if the item is owned by the node aNode.
|
||||
* @return true if the item is owned by the node aNode.
|
||||
*/
|
||||
bool BelongsTo( PNS_NODE* aNode ) const
|
||||
{
|
||||
return m_owner == aNode;
|
||||
bool BelongsTo( PNS_NODE* aNode ) const
|
||||
{
|
||||
return m_owner == aNode;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Owner()
|
||||
*
|
||||
*
|
||||
* Returns the owner of this item, or NULL if there's none.
|
||||
*/
|
||||
PNS_NODE* Owner() const { return m_owner; }
|
||||
|
@ -255,7 +255,7 @@ public:
|
|||
/**
|
||||
* Function Collide()
|
||||
*
|
||||
* Checks for a collision (clearance violation) with between us and item aOther.
|
||||
* Checks for a collision (clearance violation) with between us and item aOther.
|
||||
* Collision checking takes all PCB stuff into accound (layers, nets, DRC rules).
|
||||
* Optionally returns a minimum translation vector for force propagation
|
||||
* algorithm.
|
||||
|
@ -264,7 +264,7 @@ public:
|
|||
* @param aClearance desired clearance
|
||||
* @param aNeedMTV when true, the minimum translation vector is calculated
|
||||
* @param aMTV the minimum translation vector
|
||||
* @param true, if a collision was found.
|
||||
* @return true, if a collision was found.
|
||||
*/
|
||||
virtual bool Collide( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV,
|
||||
VECTOR2I& aMTV ) const;
|
||||
|
@ -292,17 +292,17 @@ public:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
virtual void Mark(int aMarker)
|
||||
virtual void Mark(int aMarker)
|
||||
{
|
||||
m_marker = aMarker;
|
||||
}
|
||||
|
||||
virtual void Unmark ()
|
||||
virtual void Unmark ()
|
||||
{
|
||||
m_marker = 0;
|
||||
}
|
||||
|
||||
virtual int Marker() const
|
||||
virtual int Marker() const
|
||||
{
|
||||
return m_marker;
|
||||
}
|
||||
|
@ -312,19 +312,19 @@ public:
|
|||
m_rank = aRank;
|
||||
}
|
||||
|
||||
virtual int Rank() const
|
||||
virtual int Rank() const
|
||||
{
|
||||
return m_rank;
|
||||
}
|
||||
|
||||
virtual VECTOR2I Anchor( int n ) const
|
||||
{
|
||||
{
|
||||
return VECTOR2I ();
|
||||
}
|
||||
|
||||
virtual int AnchorCount() const
|
||||
{
|
||||
return 0;
|
||||
|
||||
virtual int AnchorCount() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -99,7 +99,7 @@ public:
|
|||
typedef boost::optional<PNS_OBSTACLE> OPT_OBSTACLE;
|
||||
typedef std::vector<PNS_ITEM*> ITEM_VECTOR;
|
||||
typedef std::vector<PNS_OBSTACLE> OBSTACLES;
|
||||
|
||||
|
||||
PNS_NODE ();
|
||||
~PNS_NODE ();
|
||||
|
||||
|
@ -131,12 +131,12 @@ public:
|
|||
}
|
||||
|
||||
///> Returns the number of nodes in the inheritance chain (wrs to the root node)
|
||||
int Depth() const
|
||||
int Depth() const
|
||||
{
|
||||
return m_depth;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Function QueryColliding()
|
||||
*
|
||||
* Finds items collliding (closer than clearance) with the item aItem.
|
||||
|
@ -150,7 +150,7 @@ public:
|
|||
OBSTACLES& aObstacles,
|
||||
int aKindMask = PNS_ITEM::ANY,
|
||||
int aLimitCount = -1 );
|
||||
|
||||
|
||||
/**
|
||||
* Function NearestObstacle()
|
||||
*
|
||||
|
@ -163,7 +163,7 @@ public:
|
|||
OPT_OBSTACLE NearestObstacle( const PNS_LINE* aItem,
|
||||
int aKindMask = PNS_ITEM::ANY );
|
||||
|
||||
/**
|
||||
/**
|
||||
* Function CheckColliding()
|
||||
*
|
||||
* Checks if the item collides with anything else in the world,
|
||||
|
@ -174,9 +174,9 @@ public:
|
|||
*/
|
||||
OPT_OBSTACLE CheckColliding( const PNS_ITEM* aItem,
|
||||
int aKindMask = PNS_ITEM::ANY );
|
||||
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Function CheckColliding()
|
||||
*
|
||||
* Checks if any item in the set collides with anything else in the world,
|
||||
|
@ -189,12 +189,13 @@ public:
|
|||
int aKindMask = PNS_ITEM::ANY );
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Function CheckColliding()
|
||||
*
|
||||
* Checks if any item in the set collides with anything else in the world,
|
||||
* Checks if 2 items collide.
|
||||
* and if found, returns the obstacle.
|
||||
* @param aSet set of items to find collisions with
|
||||
* @param aItemA first item to find collisions with
|
||||
* @param aItemB second item to find collisions with
|
||||
* @param aKindMask mask of obstacle types to take into account
|
||||
* @return the obstacle, if found, otherwise empty.
|
||||
*/
|
||||
|
@ -202,7 +203,7 @@ public:
|
|||
const PNS_ITEM* aItemB,
|
||||
int aKindMask = PNS_ITEM::ANY );
|
||||
|
||||
/**
|
||||
/**
|
||||
* Function HitTest()
|
||||
*
|
||||
* Finds all items that contain the point aPoint.
|
||||
|
@ -214,22 +215,22 @@ public:
|
|||
/**
|
||||
* Function Add()
|
||||
*
|
||||
* Adds an item to the current node.
|
||||
* Adds an item to the current node.
|
||||
* @param aItem item to add
|
||||
* @param aAllowRedundant if true, duplicate items are allowed (e.g. a segment or via
|
||||
* @param aAllowRedundant if true, duplicate items are allowed (e.g. a segment or via
|
||||
* at the same coordinates as an existing one)
|
||||
*/
|
||||
void Add( PNS_ITEM* aItem, bool aAllowRedundant = false );
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Function Remove()
|
||||
*
|
||||
* Just as the name says, removes an item from this branch.
|
||||
* @param aItem item to remove
|
||||
*/
|
||||
void Remove( PNS_ITEM* aItem );
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Function Replace()
|
||||
*
|
||||
* Just as the name says, replaces an item with another one.
|
||||
|
@ -248,10 +249,10 @@ public:
|
|||
*/
|
||||
PNS_NODE* Branch();
|
||||
|
||||
/**
|
||||
/**
|
||||
* Function AssembleLine()
|
||||
*
|
||||
* Follows the joint map to assemble a line connecting two non-trivial
|
||||
* Follows the joint map to assemble a line connecting two non-trivial
|
||||
* joints starting from segment aSeg.
|
||||
* @param aSeg the initial segment
|
||||
* @param aOriginSegmentIndex index of aSeg in the resulting line
|
||||
|
@ -271,7 +272,7 @@ public:
|
|||
* @param aAdded added items
|
||||
*/
|
||||
void GetUpdatedItems( ITEM_VECTOR& aRemoved, ITEM_VECTOR& aAdded );
|
||||
|
||||
|
||||
/**
|
||||
* Function Commit()
|
||||
*
|
||||
|
@ -313,14 +314,14 @@ public:
|
|||
|
||||
///> finds the joints corresponding to the ends of line aLine
|
||||
void FindLineEnds( PNS_LINE* aLine, PNS_JOINT& aA, PNS_JOINT& aB );
|
||||
|
||||
|
||||
///> Destroys all child nodes. Applicable only to the root node.
|
||||
void KillChildren();
|
||||
|
||||
void AllItemsInNet( int aNet, std::set<PNS_ITEM*>& aItems );
|
||||
|
||||
|
||||
void ClearRanks();
|
||||
|
||||
|
||||
int FindByMarker( int aMarker, PNS_ITEMSET& aItems );
|
||||
int RemoveByMarker( int aMarker );
|
||||
|
||||
|
@ -334,7 +335,7 @@ private:
|
|||
PNS_NODE& operator=( const PNS_NODE& aB );
|
||||
|
||||
///> tries to find matching joint and creates a new one if not found
|
||||
PNS_JOINT& touchJoint( const VECTOR2I& aPos,
|
||||
PNS_JOINT& touchJoint( const VECTOR2I& aPos,
|
||||
const PNS_LAYERSET& aLayers,
|
||||
int aNet );
|
||||
|
||||
|
|
|
@ -184,8 +184,8 @@ public:
|
|||
* Constructor.
|
||||
*
|
||||
* @param aConstrained is the point that is put under constrain.
|
||||
* @parama aCenter is the point that is the center of the circle.
|
||||
* @parama aEnd is the point that decides on the radius of the circle.
|
||||
* @param aCenter is the point that is the center of the circle.
|
||||
* @param aEnd is the point that decides on the radius of the circle.
|
||||
*/
|
||||
EC_CIRCLE( EDIT_POINT& aConstrained, const EDIT_POINT& aCenter, const EDIT_POINT& aEnd ) :
|
||||
EDIT_CONSTRAINT<EDIT_POINT>( aConstrained ), m_center( aCenter ), m_end( aEnd )
|
||||
|
|
|
@ -391,7 +391,7 @@ bool DIALOG_EXCHANGE_MODULE::Change_1_Module( MODULE* aModule,
|
|||
FPID oldFootprintFPID = aModule->GetFPID();
|
||||
|
||||
// Load module.
|
||||
line.Printf( _( "Change module '%s' (from '%s') to '%s'" ),
|
||||
line.Printf( _( "Change footprint '%s' (from '%s') to '%s'" ),
|
||||
GetChars( aModule->GetReference() ),
|
||||
oldFootprintFPID.Format().c_str(),
|
||||
aNewFootprintFPID.Format().c_str() );
|
||||
|
@ -519,7 +519,7 @@ void PCB_EDIT_FRAME::RecreateCmpFileFromBoard( wxCommandEvent& aEvent )
|
|||
|
||||
if( module == NULL )
|
||||
{
|
||||
DisplayError( this, _( "No Modules!" ) );
|
||||
DisplayError( this, _( "No footprints!" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,17 +49,17 @@ struct Point;
|
|||
struct Edge;
|
||||
class Triangle;
|
||||
|
||||
class Sweep
|
||||
class Sweep
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Triangulate
|
||||
*
|
||||
*
|
||||
* @param tcx
|
||||
*/
|
||||
void Triangulate(SweepContext& tcx);
|
||||
|
||||
|
||||
/**
|
||||
* Destructor - clean up memory
|
||||
*/
|
||||
|
@ -69,7 +69,7 @@ private:
|
|||
|
||||
/**
|
||||
* Start sweeping the Y-sorted point set from bottom to top
|
||||
*
|
||||
*
|
||||
* @param tcx
|
||||
*/
|
||||
void SweepPoints(SweepContext& tcx);
|
||||
|
@ -86,8 +86,8 @@ private:
|
|||
Node& PointEvent(SweepContext& tcx, Point& point);
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param tcx
|
||||
* @param edge
|
||||
* @param node
|
||||
|
@ -98,7 +98,7 @@ private:
|
|||
|
||||
/**
|
||||
* Creates a new front triangle and legalize it
|
||||
*
|
||||
*
|
||||
* @param tcx
|
||||
* @param point
|
||||
* @param node
|
||||
|
@ -136,10 +136,10 @@ private:
|
|||
* a,b and c<br>
|
||||
* d is outside B if orient2d(a,b,d) or orient2d(c,a,d) is CW<br>
|
||||
* This preknowledge gives us a way to optimize the incircle test
|
||||
* @param a - triangle point, opposite d
|
||||
* @param b - triangle point
|
||||
* @param c - triangle point
|
||||
* @param d - point opposite a
|
||||
* @param pa - triangle point, opposite d
|
||||
* @param pb - triangle point
|
||||
* @param pc - triangle point
|
||||
* @param pd - point opposite a
|
||||
* @return true if d is inside circle, false if on circle edge
|
||||
*/
|
||||
bool Incircle(Point& pa, Point& pb, Point& pc, Point& pd);
|
||||
|
@ -168,8 +168,8 @@ private:
|
|||
* @param n
|
||||
*/
|
||||
void FillAdvancingFront(SweepContext& tcx, Node& n);
|
||||
|
||||
// Decision-making about when to Fill hole.
|
||||
|
||||
// Decision-making about when to Fill hole.
|
||||
// Contributed by ToolmakerSteve2
|
||||
bool LargeHole_DontFill(Node* node);
|
||||
bool AngleExceeds90Degrees(Point* origin, Point* pa, Point* pb);
|
||||
|
@ -204,7 +204,6 @@ private:
|
|||
*
|
||||
* @param tcx
|
||||
* @param node - bottom_node
|
||||
* @param cnt - counter used to alternate on even and odd numbers
|
||||
*/
|
||||
void FillBasinReq(SweepContext& tcx, Node* node);
|
||||
|
||||
|
@ -235,22 +234,22 @@ private:
|
|||
/**
|
||||
* After a flip we have two triangles and know that only one will still be
|
||||
* intersecting the edge. So decide which to contiune with and legalize the other
|
||||
*
|
||||
*
|
||||
* @param tcx
|
||||
* @param o - should be the result of an orient2d( eq, op, ep )
|
||||
* @param t - triangle 1
|
||||
* @param ot - triangle 2
|
||||
* @param p - a point shared by both triangles
|
||||
* @param p - a point shared by both triangles
|
||||
* @param op - another point shared by both triangles
|
||||
* @return returns the triangle still intersecting the edge
|
||||
*/
|
||||
Triangle& NextFlipTriangle(SweepContext& tcx, int o, Triangle& t, Triangle& ot, Point& p, Point& op);
|
||||
|
||||
/**
|
||||
* When we need to traverse from one triangle to the next we need
|
||||
* When we need to traverse from one triangle to the next we need
|
||||
* the point in current triangle that is the opposite point to the next
|
||||
* triangle.
|
||||
*
|
||||
* triangle.
|
||||
*
|
||||
* @param ep
|
||||
* @param eq
|
||||
* @param ot
|
||||
|
@ -261,10 +260,10 @@ private:
|
|||
|
||||
/**
|
||||
* Scan part of the FlipScan algorithm<br>
|
||||
* When a triangle pair isn't flippable we will scan for the next
|
||||
* point that is inside the flip triangle scan area. When found
|
||||
* When a triangle pair isn't flippable we will scan for the next
|
||||
* point that is inside the flip triangle scan area. When found
|
||||
* we generate a new flipEdgeEvent
|
||||
*
|
||||
*
|
||||
* @param tcx
|
||||
* @param ep - last point on the edge we are traversing
|
||||
* @param eq - first point on the edge we are traversing
|
||||
|
|
Loading…
Reference in New Issue