mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-13 17:53:11 +02:00
Compare commits
24 Commits
8baa1ac8bc
...
34a953ad75
Author | SHA1 | Date | |
---|---|---|---|
|
34a953ad75 | ||
|
aa4de22ef4 | ||
|
79a3b7ac5f | ||
|
56ad08cdd8 | ||
|
accbee3c6e | ||
|
29025882fc | ||
|
4cb9016711 | ||
|
d4e6915cc7 | ||
|
cde0f2bc6b | ||
|
4ede7ac89b | ||
|
0cac688d0e | ||
|
42431925cb | ||
|
32be56b3f4 | ||
|
6b5d345647 | ||
|
f31231c1ca | ||
|
4100128f4d | ||
|
d0c1ef1805 | ||
|
6c2b4a23ec | ||
|
03e4505eda | ||
|
84b4eebe76 | ||
|
62a10ca715 | ||
|
340edcf071 | ||
|
d0a3401338 | ||
|
b1866776af |
@ -1087,14 +1087,16 @@ void EDA_3D_CANVAS::OnLeftDown( wxMouseEvent& event )
|
||||
|
||||
if( footprint )
|
||||
{
|
||||
std::string command =
|
||||
fmt::format( "$SELECT: 0,F{}",
|
||||
EscapeString( footprint->GetReference(), CTX_IPC ).ToStdString() );
|
||||
|
||||
EDA_3D_VIEWER_FRAME* frame = static_cast<EDA_3D_VIEWER_FRAME*>( GetParent() );
|
||||
// We send a message (by ExpressMail) to the board and schematic editor, but only
|
||||
// if the manager of this canvas is a EDA_3D_VIEWER_FRAME, because only this
|
||||
// kind of frame has ExpressMail stuff
|
||||
EDA_3D_VIEWER_FRAME* frame = dynamic_cast<EDA_3D_VIEWER_FRAME*>( GetParent() );
|
||||
|
||||
if( frame )
|
||||
{
|
||||
std::string command = fmt::format( "$SELECT: 0,F{}",
|
||||
EscapeString( footprint->GetReference(), CTX_IPC ).ToStdString() );
|
||||
|
||||
frame->Kiway().ExpressMail( FRAME_PCB_EDITOR, MAIL_SELECTION, command, frame );
|
||||
frame->Kiway().ExpressMail( FRAME_SCH, MAIL_SELECTION, command, frame );
|
||||
}
|
||||
|
@ -67,6 +67,30 @@ set( KICOMMON_SRCS
|
||||
# Gal
|
||||
gal/color4d.cpp
|
||||
gal/opengl/gl_context_mgr.cpp
|
||||
|
||||
# Git
|
||||
git/git_add_to_index_handler.cpp
|
||||
git/git_branch_handler.cpp
|
||||
git/git_clone_handler.cpp
|
||||
git/git_commit_handler.cpp
|
||||
git/git_config_handler.cpp
|
||||
git/git_compare_handler.cpp
|
||||
git/git_init_handler.cpp
|
||||
git/project_git_utils.cpp
|
||||
git/git_pull_handler.cpp
|
||||
git/git_push_handler.cpp
|
||||
git/git_remove_from_index_handler.cpp
|
||||
git/git_remove_vcs_handler.cpp
|
||||
git/git_resolve_conflict_handler.cpp
|
||||
git/git_revert_handler.cpp
|
||||
git/git_status_handler.cpp
|
||||
git/git_switch_branch_handler.cpp
|
||||
git/git_sync_handler.cpp
|
||||
git/kicad_git_common.cpp
|
||||
git/kicad_git_errors.cpp
|
||||
git/git_backend.cpp
|
||||
git/libgit_backend.cpp
|
||||
|
||||
# Jobs
|
||||
jobs/job.cpp
|
||||
jobs/job_dispatcher.cpp
|
||||
@ -616,26 +640,6 @@ set( COMMON_IMPORT_GFX_SRCS
|
||||
import_gfx/svg_import_plugin.cpp
|
||||
)
|
||||
|
||||
set( COMMON_GIT_SRCS
|
||||
git/git_add_to_index_handler.cpp
|
||||
git/git_branch_handler.cpp
|
||||
git/git_clone_handler.cpp
|
||||
git/git_commit_handler.cpp
|
||||
git/git_config_handler.cpp
|
||||
git/git_init_handler.cpp
|
||||
git/git_pull_handler.cpp
|
||||
git/git_push_handler.cpp
|
||||
git/git_remove_from_index_handler.cpp
|
||||
git/git_resolve_conflict_handler.cpp
|
||||
git/git_revert_handler.cpp
|
||||
git/git_status_handler.cpp
|
||||
git/git_sync_handler.cpp
|
||||
git/project_git_utils.cpp
|
||||
git/kicad_git_common.cpp
|
||||
git/kicad_git_errors.cpp
|
||||
git/git_backend.cpp
|
||||
git/libgit_backend.cpp
|
||||
)
|
||||
|
||||
set( COMMON_SRCS
|
||||
${LIB_KICAD_SRCS}
|
||||
@ -648,7 +652,6 @@ set( COMMON_SRCS
|
||||
${COMMON_IO_SRCS}
|
||||
${FONT_SRCS}
|
||||
${COMMON_IMPORT_GFX_SRCS}
|
||||
${COMMON_GIT_SRCS}
|
||||
${COMMON_TRANSLINE_CALCULATION_SRCS}
|
||||
base_screen.cpp
|
||||
bin_mod.cpp
|
||||
|
@ -25,12 +25,13 @@
|
||||
#define GIT_ADD_TO_INDEX_HANDLER_H_
|
||||
|
||||
#include <git/kicad_git_common.h>
|
||||
#include <import_export.h>
|
||||
#include <vector>
|
||||
#include <wx/string.h>
|
||||
|
||||
class LIBGIT_BACKEND;
|
||||
|
||||
class GIT_ADD_TO_INDEX_HANDLER : public KIGIT_COMMON
|
||||
class APIEXPORT GIT_ADD_TO_INDEX_HANDLER : public KIGIT_COMMON
|
||||
{
|
||||
public:
|
||||
GIT_ADD_TO_INDEX_HANDLER( git_repository* aRepository );
|
||||
|
@ -25,6 +25,7 @@
|
||||
#define GIT_BACKEND_H_
|
||||
|
||||
#include <map>
|
||||
#include <import_export.h>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <wx/string.h>
|
||||
@ -56,7 +57,7 @@ enum class CommitResult
|
||||
Cancelled
|
||||
};
|
||||
|
||||
class GIT_BACKEND
|
||||
class APIEXPORT GIT_BACKEND
|
||||
{
|
||||
public:
|
||||
virtual ~GIT_BACKEND() = default;
|
||||
@ -121,7 +122,7 @@ public:
|
||||
virtual void PerformRemoveFromIndex( GIT_REMOVE_FROM_INDEX_HANDLER* aHandler ) = 0;
|
||||
};
|
||||
|
||||
GIT_BACKEND* GetGitBackend();
|
||||
void SetGitBackend( GIT_BACKEND* aBackend );
|
||||
APIEXPORT GIT_BACKEND* GetGitBackend();
|
||||
APIEXPORT void SetGitBackend( GIT_BACKEND* aBackend );
|
||||
|
||||
#endif
|
||||
|
@ -25,6 +25,7 @@
|
||||
#define GIT_BRANCH_HANDLER_H
|
||||
|
||||
#include <git/git_repo_mixin.h>
|
||||
#include <import_export.h>
|
||||
#include <wx/string.h>
|
||||
#include <vector>
|
||||
|
||||
@ -36,7 +37,7 @@ enum class BranchResult
|
||||
Error
|
||||
};
|
||||
|
||||
class GIT_BRANCH_HANDLER : public KIGIT_REPO_MIXIN
|
||||
class APIEXPORT GIT_BRANCH_HANDLER : public KIGIT_REPO_MIXIN
|
||||
{
|
||||
public:
|
||||
GIT_BRANCH_HANDLER( KIGIT_COMMON* aCommon );
|
||||
|
@ -25,10 +25,11 @@
|
||||
#define GIT_CLONE_HANDLER_H_
|
||||
|
||||
#include "kicad_git_common.h"
|
||||
#include <import_export.h>
|
||||
#include "git_repo_mixin.h"
|
||||
#include "git_progress.h"
|
||||
|
||||
class GIT_CLONE_HANDLER : public KIGIT_REPO_MIXIN
|
||||
class APIEXPORT GIT_CLONE_HANDLER : public KIGIT_REPO_MIXIN
|
||||
{
|
||||
public:
|
||||
GIT_CLONE_HANDLER( KIGIT_COMMON* aCommon );
|
||||
|
@ -27,6 +27,7 @@
|
||||
// Define a class to handle git commit operations
|
||||
|
||||
#include <git/kicad_git_common.h>
|
||||
#include <import_export.h>
|
||||
#include "git_backend.h"
|
||||
|
||||
#include <string>
|
||||
@ -35,7 +36,7 @@
|
||||
|
||||
class LIBGIT_BACKEND;
|
||||
|
||||
class GIT_COMMIT_HANDLER : public KIGIT_COMMON
|
||||
class APIEXPORT GIT_COMMIT_HANDLER : public KIGIT_COMMON
|
||||
{
|
||||
public:
|
||||
GIT_COMMIT_HANDLER( git_repository* aRepo );
|
||||
|
@ -25,6 +25,7 @@
|
||||
#define GIT_CONFIG_HANDLER_H
|
||||
|
||||
#include <git/git_repo_mixin.h>
|
||||
#include <import_export.h>
|
||||
#include <wx/string.h>
|
||||
|
||||
struct GitUserConfig
|
||||
@ -35,7 +36,7 @@ struct GitUserConfig
|
||||
bool hasEmail = false;
|
||||
};
|
||||
|
||||
class GIT_CONFIG_HANDLER : public KIGIT_REPO_MIXIN
|
||||
class APIEXPORT GIT_CONFIG_HANDLER : public KIGIT_REPO_MIXIN
|
||||
{
|
||||
public:
|
||||
GIT_CONFIG_HANDLER( KIGIT_COMMON* aCommon );
|
||||
|
@ -25,6 +25,7 @@
|
||||
#define GIT_INIT_HANDLER_H
|
||||
|
||||
#include <git/git_repo_mixin.h>
|
||||
#include <import_export.h>
|
||||
#include <wx/string.h>
|
||||
|
||||
enum class InitResult
|
||||
@ -43,7 +44,7 @@ struct RemoteConfig
|
||||
KIGIT_COMMON::GIT_CONN_TYPE connType;
|
||||
};
|
||||
|
||||
class GIT_INIT_HANDLER : public KIGIT_REPO_MIXIN
|
||||
class APIEXPORT GIT_INIT_HANDLER : public KIGIT_REPO_MIXIN
|
||||
{
|
||||
public:
|
||||
GIT_INIT_HANDLER( KIGIT_COMMON* aCommon );
|
||||
|
@ -25,10 +25,11 @@
|
||||
#define GIT_PROGRESS_H_
|
||||
|
||||
#include <widgets/wx_progress_reporters.h>
|
||||
#include <import_export.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
class GIT_PROGRESS
|
||||
class APIEXPORT GIT_PROGRESS
|
||||
{
|
||||
public:
|
||||
GIT_PROGRESS() :
|
||||
|
@ -25,6 +25,7 @@
|
||||
#define _GIT_PULL_HANDLER_H_
|
||||
|
||||
#include <git/git_repo_mixin.h>
|
||||
#include <import_export.h>
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@ -51,7 +52,7 @@ enum class PullResult : int
|
||||
|
||||
class LIBGIT_BACKEND;
|
||||
|
||||
class GIT_PULL_HANDLER : public KIGIT_REPO_MIXIN
|
||||
class APIEXPORT GIT_PULL_HANDLER : public KIGIT_REPO_MIXIN
|
||||
{
|
||||
public:
|
||||
friend class LIBGIT_BACKEND;
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include <git/git_progress.h>
|
||||
#include <git/git_repo_mixin.h>
|
||||
#include <import_export.h>
|
||||
#include <git/kicad_git_errors.h>
|
||||
#include <wx/string.h>
|
||||
|
||||
@ -37,7 +38,7 @@ enum class PushResult
|
||||
Error
|
||||
};
|
||||
|
||||
class GIT_PUSH_HANDLER : public KIGIT_REPO_MIXIN
|
||||
class APIEXPORT GIT_PUSH_HANDLER : public KIGIT_REPO_MIXIN
|
||||
{
|
||||
public:
|
||||
GIT_PUSH_HANDLER( KIGIT_COMMON* aCommon );
|
||||
|
@ -25,12 +25,13 @@
|
||||
#define GIT_REMOVE_FROM_INDEX_HANDLER_H_
|
||||
|
||||
#include <git/kicad_git_common.h>
|
||||
#include <import_export.h>
|
||||
#include <vector>
|
||||
#include <wx/string.h>
|
||||
|
||||
class LIBGIT_BACKEND;
|
||||
|
||||
class GIT_REMOVE_FROM_INDEX_HANDLER : public KIGIT_COMMON
|
||||
class APIEXPORT GIT_REMOVE_FROM_INDEX_HANDLER : public KIGIT_COMMON
|
||||
{
|
||||
public:
|
||||
GIT_REMOVE_FROM_INDEX_HANDLER( git_repository* aRepository );
|
||||
|
@ -17,8 +17,9 @@
|
||||
#include "kicad_git_common.h"
|
||||
#include "kicad_git_errors.h"
|
||||
#include "git_progress.h"
|
||||
#include <import_export.h>
|
||||
|
||||
class KIGIT_REPO_MIXIN: public KIGIT_ERRORS, public GIT_PROGRESS
|
||||
class APIEXPORT KIGIT_REPO_MIXIN: public KIGIT_ERRORS, public GIT_PROGRESS
|
||||
{
|
||||
public:
|
||||
KIGIT_REPO_MIXIN( KIGIT_COMMON* aCommon ) : m_common( aCommon )
|
||||
|
@ -25,10 +25,11 @@
|
||||
#define GIT_RESOLVE_CONFLICT_HANDLER_H
|
||||
|
||||
#include <git2.h>
|
||||
#include <import_export.h>
|
||||
|
||||
class wxString;
|
||||
|
||||
class GIT_RESOLVE_CONFLICT_HANDLER
|
||||
class APIEXPORT GIT_RESOLVE_CONFLICT_HANDLER
|
||||
{
|
||||
public:
|
||||
GIT_RESOLVE_CONFLICT_HANDLER( git_repository* aRepository );
|
||||
|
@ -25,6 +25,7 @@
|
||||
#define GIT_REVERT_HANDLER_H_
|
||||
|
||||
#include <git2.h>
|
||||
#include <import_export.h>
|
||||
#include <vector>
|
||||
#include <wx/string.h>
|
||||
// TEMPORARY HACKFIX INCLUDE FOR STD::VECTOR EXPORT OUT OF KICOMMON ON WINDOWS
|
||||
@ -32,7 +33,7 @@
|
||||
|
||||
class LIBGIT_BACKEND;
|
||||
|
||||
class GIT_REVERT_HANDLER
|
||||
class APIEXPORT GIT_REVERT_HANDLER
|
||||
{
|
||||
public:
|
||||
GIT_REVERT_HANDLER( git_repository* aRepository );
|
||||
|
@ -25,6 +25,7 @@
|
||||
#define GIT_STATUS_HANDLER_H
|
||||
|
||||
#include <git/git_repo_mixin.h>
|
||||
#include <import_export.h>
|
||||
#include <wx/string.h>
|
||||
#include <map>
|
||||
#include <set>
|
||||
@ -38,7 +39,7 @@ struct FileStatus
|
||||
unsigned int gitStatus; // Raw git status flags
|
||||
};
|
||||
|
||||
class GIT_STATUS_HANDLER : public KIGIT_REPO_MIXIN
|
||||
class APIEXPORT GIT_STATUS_HANDLER : public KIGIT_REPO_MIXIN
|
||||
{
|
||||
public:
|
||||
GIT_STATUS_HANDLER( KIGIT_COMMON* aCommon );
|
||||
|
@ -25,10 +25,11 @@
|
||||
#define GIT_SYNC_HANDLER_H_
|
||||
|
||||
#include <git2.h>
|
||||
#include <import_export.h>
|
||||
|
||||
class wxString;
|
||||
|
||||
class GIT_SYNC_HANDLER
|
||||
class APIEXPORT GIT_SYNC_HANDLER
|
||||
{
|
||||
public:
|
||||
GIT_SYNC_HANDLER( git_repository* aRepository );
|
||||
|
@ -25,11 +25,12 @@
|
||||
#include <istream>
|
||||
#include <string>
|
||||
#include <git2.h>
|
||||
#include <import_export.h>
|
||||
|
||||
#include <richio.h>
|
||||
|
||||
|
||||
class BLOB_BUFFER_STREAM : public std::streambuf
|
||||
class APIEXPORT BLOB_BUFFER_STREAM : public std::streambuf
|
||||
{
|
||||
public:
|
||||
BLOB_BUFFER_STREAM( git_blob* aBlob )
|
||||
@ -57,7 +58,7 @@ public:
|
||||
};
|
||||
|
||||
// Build a class that implements LINE_READER for git_blobs
|
||||
class BLOB_READER : public LINE_READER
|
||||
class APIEXPORT BLOB_READER : public LINE_READER
|
||||
{
|
||||
public:
|
||||
BLOB_READER( git_blob* aBlob ) : m_blob( aBlob )
|
||||
|
@ -25,6 +25,7 @@
|
||||
#define _GIT_COMMON_H_
|
||||
|
||||
#include <git/kicad_git_errors.h>
|
||||
#include <import_export.h>
|
||||
|
||||
#include <git2.h>
|
||||
#include <atomic>
|
||||
@ -35,7 +36,7 @@
|
||||
|
||||
class LIBGIT_BACKEND;
|
||||
|
||||
class KIGIT_COMMON
|
||||
class APIEXPORT KIGIT_COMMON
|
||||
{
|
||||
|
||||
public:
|
||||
@ -193,19 +194,19 @@ private:
|
||||
static const unsigned KIGIT_CREDENTIAL_SSH_AGENT = 1 << sizeof( m_testedTypes - 1 );
|
||||
};
|
||||
|
||||
extern "C" int progress_cb( const char* str, int len, void* data );
|
||||
extern "C" void clone_progress_cb( const char* str, size_t len, size_t total, void* data );
|
||||
extern "C" int transfer_progress_cb( const git_transfer_progress* aStats, void* aPayload );
|
||||
extern "C" int update_cb( const char* aRefname, const git_oid* aFirst, const git_oid* aSecond,
|
||||
void* aPayload );
|
||||
extern "C" int push_transfer_progress_cb( unsigned int aCurrent, unsigned int aTotal,
|
||||
size_t aBytes, void* aPayload );
|
||||
extern "C" int push_update_reference_cb( const char* aRefname, const char* aStatus,
|
||||
void* aPayload );
|
||||
extern "C" APIEXPORT int progress_cb( const char* str, int len, void* data );
|
||||
extern "C" APIEXPORT void clone_progress_cb( const char* str, size_t len, size_t total, void* data );
|
||||
extern "C" APIEXPORT int transfer_progress_cb( const git_transfer_progress* aStats, void* aPayload );
|
||||
extern "C" APIEXPORT int update_cb( const char* aRefname, const git_oid* aFirst, const git_oid* aSecond,
|
||||
void* aPayload );
|
||||
extern "C" APIEXPORT int push_transfer_progress_cb( unsigned int aCurrent, unsigned int aTotal,
|
||||
size_t aBytes, void* aPayload );
|
||||
extern "C" APIEXPORT int push_update_reference_cb( const char* aRefname, const char* aStatus,
|
||||
void* aPayload );
|
||||
|
||||
extern "C" int fetchhead_foreach_cb( const char*, const char*,
|
||||
const git_oid* aOID, unsigned int aIsMerge, void* aPayload );
|
||||
extern "C" int credentials_cb( git_cred** aOut, const char* aUrl, const char* aUsername,
|
||||
unsigned int aAllowedTypes, void* aPayload );
|
||||
extern "C" APIEXPORT int fetchhead_foreach_cb( const char*, const char*,
|
||||
const git_oid* aOID, unsigned int aIsMerge, void* aPayload );
|
||||
extern "C" APIEXPORT int credentials_cb( git_cred** aOut, const char* aUrl, const char* aUsername,
|
||||
unsigned int aAllowedTypes, void* aPayload );
|
||||
|
||||
#endif // _GIT_COMMON_H_
|
||||
|
@ -25,10 +25,11 @@
|
||||
#define KICAD_GIT_ERRORS_H
|
||||
|
||||
#include <vector>
|
||||
#include <import_export.h>
|
||||
|
||||
#include <wx/translation.h>
|
||||
|
||||
class KIGIT_ERRORS
|
||||
class APIEXPORT KIGIT_ERRORS
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -25,11 +25,12 @@
|
||||
#define LIBGIT_BACKEND_H_
|
||||
|
||||
#include "git_backend.h"
|
||||
#include <import_export.h>
|
||||
|
||||
// Forward declarations to avoid exposing libgit2 headers
|
||||
struct git_annotated_commit;
|
||||
|
||||
class LIBGIT_BACKEND : public GIT_BACKEND
|
||||
class APIEXPORT LIBGIT_BACKEND : public GIT_BACKEND
|
||||
{
|
||||
public:
|
||||
void Init() override;
|
||||
|
@ -26,12 +26,13 @@
|
||||
|
||||
#include <git2.h>
|
||||
#include <wx/string.h>
|
||||
#include <import_export.h>
|
||||
|
||||
namespace KIGIT
|
||||
{
|
||||
|
||||
/** Utility class with helper functions for project level git operations. */
|
||||
class PROJECT_GIT_UTILS
|
||||
class APIEXPORT PROJECT_GIT_UTILS
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -56,6 +56,7 @@ public:
|
||||
m_FuseShapes( false ),
|
||||
m_FillAllVias( false ),
|
||||
m_OptimizeStep( true ),
|
||||
m_ExtraPadThickness( true ),
|
||||
m_Format( FORMAT::STEP ),
|
||||
m_OutputFile()
|
||||
{};
|
||||
@ -98,6 +99,7 @@ public:
|
||||
bool m_FuseShapes;
|
||||
bool m_FillAllVias;
|
||||
bool m_OptimizeStep;
|
||||
bool m_ExtraPadThickness;
|
||||
FORMAT m_Format;
|
||||
wxString m_OutputFile;
|
||||
|
||||
|
@ -384,7 +384,8 @@ void BACK_ANNOTATE::applyChangelist()
|
||||
if( !m_dryRun )
|
||||
commit.Modify( symbol, screen, RECURSE_MODE::NO_RECURSE );
|
||||
|
||||
if( m_processReferences && ref.GetRef() != fpData.m_ref && !skip )
|
||||
if( m_processReferences && ref.GetRef() != fpData.m_ref && !skip
|
||||
&& !symbol->GetField( FIELD_T::REFERENCE )->HasTextVars() )
|
||||
{
|
||||
++m_changesCount;
|
||||
msg.Printf( _( "Change %s reference designator to '%s'." ),
|
||||
@ -397,7 +398,8 @@ void BACK_ANNOTATE::applyChangelist()
|
||||
m_reporter.ReportHead( msg, RPT_SEVERITY_ACTION );
|
||||
}
|
||||
|
||||
if( m_processFootprints && oldFootprint != fpData.m_footprint && !skip )
|
||||
if( m_processFootprints && oldFootprint != fpData.m_footprint && !skip
|
||||
&& !symbol->GetField( FIELD_T::FOOTPRINT )->HasTextVars() )
|
||||
{
|
||||
++m_changesCount;
|
||||
msg.Printf( _( "Change %s footprint assignment from '%s' to '%s'." ),
|
||||
@ -411,7 +413,8 @@ void BACK_ANNOTATE::applyChangelist()
|
||||
m_reporter.ReportHead( msg, RPT_SEVERITY_ACTION );
|
||||
}
|
||||
|
||||
if( m_processValues && oldValue != fpData.m_value && !skip )
|
||||
if( m_processValues && oldValue != fpData.m_value && !skip
|
||||
&& !symbol->GetField( FIELD_T::VALUE )->HasTextVars() )
|
||||
{
|
||||
++m_changesCount;
|
||||
msg.Printf( _( "Change %s value from '%s' to '%s'." ),
|
||||
@ -502,6 +505,7 @@ void BACK_ANNOTATE::applyChangelist()
|
||||
// with all the variables resolved. The footprints field value gets the symbol's
|
||||
// resolved value when the PCB is updated from the schematic.
|
||||
if( symField
|
||||
&& !symField->HasTextVars()
|
||||
&& symField->GetShownText( &ref.GetSheetPath(), false ) != fpFieldValue )
|
||||
{
|
||||
m_changesCount++;
|
||||
|
@ -50,6 +50,7 @@
|
||||
#define ARG_FUSE_SHAPES "--fuse-shapes"
|
||||
#define ARG_FILL_ALL_VIAS "--fill-all-vias"
|
||||
#define ARG_NO_OPTIMIZE_STEP "--no-optimize-step"
|
||||
#define ARG_NO_EXTRA_PAD_THICKNESS "--no-extra-pad-thickness"
|
||||
#define ARG_NET_FILTER "--net-filter"
|
||||
#define ARG_FORMAT "--format"
|
||||
#define ARG_VRML_UNITS "--units"
|
||||
@ -165,6 +166,10 @@ CLI::PCB_EXPORT_3D_COMMAND::PCB_EXPORT_3D_COMMAND( const std::string& aNa
|
||||
.help( UTF8STDSTR( _( "Don't cut via holes in conductor layers." ) ) )
|
||||
.flag();
|
||||
|
||||
m_argParser.add_argument( ARG_NO_EXTRA_PAD_THICKNESS )
|
||||
.help( UTF8STDSTR( _( "Disable extra pad thickness (pads will have normal thickness)" ) ) )
|
||||
.flag();
|
||||
|
||||
m_argParser.add_argument( ARG_MIN_DISTANCE )
|
||||
.default_value( std::string( "0.01mm" ) )
|
||||
.help( UTF8STDSTR( _( "Minimum distance between points to treat them as separate "
|
||||
@ -231,6 +236,7 @@ int CLI::PCB_EXPORT_3D_COMMAND::doPerform( KIWAY& aKiway )
|
||||
params.m_ExportSoldermask = m_argParser.get<bool>( ARG_INCLUDE_SOLDERMASK );
|
||||
params.m_FuseShapes = m_argParser.get<bool>( ARG_FUSE_SHAPES );
|
||||
params.m_FillAllVias = m_argParser.get<bool>( ARG_FILL_ALL_VIAS );
|
||||
params.m_ExtraPadThickness = !m_argParser.get<bool>( ARG_NO_EXTRA_PAD_THICKNESS );
|
||||
params.m_BoardOnly = m_argParser.get<bool>( ARG_BOARD_ONLY );
|
||||
params.m_NetFilter = From_UTF8( m_argParser.get<std::string>( ARG_NET_FILTER ).c_str() );
|
||||
params.m_ComponentFilter =
|
||||
|
@ -226,8 +226,8 @@ void DIALOG_FP_EDIT_PAD_TABLE::Populate()
|
||||
m_grid->SetCellValue( row, COL_DRILL_Y, m_unitsProvider->StringFromValue( drill.y, true ) );
|
||||
}
|
||||
else
|
||||
m_grid->SetCellValue( row, COL_SIZE_X, m_unitsProvide
|
||||
{
|
||||
// For non-PTH pads, drill columns are not applicable.
|
||||
m_grid->SetReadOnly( row, COL_DRILL_X, true );
|
||||
m_grid->SetReadOnly( row, COL_DRILL_Y, true );
|
||||
}
|
||||
|
@ -725,6 +725,7 @@ bool EXPORTER_STEP::buildBoard3DShapes()
|
||||
m_pcbModel->SetEnabledLayers( m_layersToExport );
|
||||
m_pcbModel->SetFuseShapes( m_params.m_FuseShapes );
|
||||
m_pcbModel->SetNetFilter( m_params.m_NetFilter );
|
||||
m_pcbModel->SetExtraPadThickness( m_params.m_ExtraPadThickness );
|
||||
|
||||
// Note: m_params.m_BoardOutlinesChainingEpsilon is used only to build the board outlines,
|
||||
// not to set OCC chaining epsilon (much smaller)
|
||||
|
@ -786,6 +786,7 @@ STEP_PCB_MODEL::STEP_PCB_MODEL( const wxString& aPcbName, REPORTER* aReporter )
|
||||
m_minx = 1.0e10; // absurdly large number; any valid PCB X value will be smaller
|
||||
m_pcbName = aPcbName;
|
||||
m_fuseShapes = false;
|
||||
m_extraPadThickness = true;
|
||||
m_outFmt = OUTPUT_FORMAT::FMT_OUT_UNKNOWN;
|
||||
}
|
||||
|
||||
@ -819,7 +820,7 @@ bool STEP_PCB_MODEL::AddPadShape( const PAD* aPad, const VECTOR2D& aOrigin, bool
|
||||
double Zpos, thickness;
|
||||
getLayerZPlacement( pcb_layer, Zpos, thickness );
|
||||
|
||||
if( !aVia )
|
||||
if( !aVia && m_extraPadThickness )
|
||||
{
|
||||
// Pad surface as a separate face for FEM simulations.
|
||||
if( pcb_layer == F_Cu )
|
||||
@ -883,7 +884,7 @@ bool STEP_PCB_MODEL::AddPadShape( const PAD* aPad, const VECTOR2D& aOrigin, bool
|
||||
getLayerZPlacement( F_Cu, f_pos, f_thickness );
|
||||
getLayerZPlacement( B_Cu, b_pos, b_thickness );
|
||||
|
||||
if( !aVia )
|
||||
if( !aVia && m_extraPadThickness )
|
||||
{
|
||||
// Pad surface is slightly thicker
|
||||
f_thickness += c_padExtraThickness;
|
||||
@ -979,7 +980,7 @@ bool STEP_PCB_MODEL::AddHole( const SHAPE_SEGMENT& aShape, int aPlatingThickness
|
||||
// must be > OCC_MAX_DISTANCE_TO_MERGE_POINTS
|
||||
|
||||
// Pads are taller by 0.01 mm
|
||||
if( !aVia )
|
||||
if( !aVia && m_extraPadThickness)
|
||||
margin += 0.01;
|
||||
|
||||
double f_pos, f_thickness;
|
||||
@ -1295,6 +1296,12 @@ void STEP_PCB_MODEL::SetNetFilter( const wxString& aFilter )
|
||||
}
|
||||
|
||||
|
||||
void STEP_PCB_MODEL::SetExtraPadThickness( bool aValue )
|
||||
{
|
||||
m_extraPadThickness = aValue;
|
||||
}
|
||||
|
||||
|
||||
void STEP_PCB_MODEL::SetCopperColor( double r, double g, double b )
|
||||
{
|
||||
m_copperColor[0] = r;
|
||||
|
@ -128,6 +128,7 @@ public:
|
||||
void SetSimplifyShapes( bool aValue );
|
||||
void SetStackup( const BOARD_STACKUP& aStackup );
|
||||
void SetNetFilter( const wxString& aFilter );
|
||||
void SetExtraPadThickness( bool aValue );
|
||||
|
||||
// Set the max distance (in mm) to consider 2 points have the same coordinates
|
||||
// and can be merged
|
||||
@ -260,6 +261,7 @@ private:
|
||||
bool m_hasPCB; // set true if CreatePCB() has been invoked
|
||||
bool m_simplifyShapes; // convert parts of outlines to arcs where possible
|
||||
bool m_fuseShapes; // fuse geometry together
|
||||
bool m_extraPadThickness; // add extra thickness to pads equal to copper thickness
|
||||
std::vector<TDF_Label> m_pcb_labels; // labels for the PCB model (one by main outline)
|
||||
MODEL_MAP m_models; // map of file names to model labels
|
||||
int m_components; // number of successfully loaded components;
|
||||
|
Loading…
x
Reference in New Issue
Block a user