Compare commits
246 Commits
Author | SHA1 | Date |
---|---|---|
jean-pierre charras | 24ab8141ae | |
jean-pierre charras | 7848c3acf3 | |
jean-pierre charras | 752cc43fb8 | |
jean-pierre charras | cf5d3ae43f | |
jean-pierre charras | e22113ccef | |
joel-bertrand-JKB | 35dc387fc6 | |
Wayne Stambaugh | 025578fee7 | |
Wayne Stambaugh | 45a3d86d36 | |
Wayne Stambaugh | 9f1b6680a2 | |
Wayne Stambaugh | 385eb49cb2 | |
Wayne Stambaugh | 61b94c8c2c | |
Seth Hillbrand | 4aeef1e09e | |
jean-pierre charras | 93caff0ac1 | |
jean-pierre charras | 4e3fe6c55d | |
Jeff Young | 9240a54f4a | |
jean-pierre charras | 4e04468e47 | |
jean-pierre charras | 857d038b5d | |
jean-pierre charras | ec1eaf5d2d | |
jean-pierre charras | 7134b1c83f | |
jean-pierre charras | bc8739f930 | |
Maciej Suminski | 805bb3160f | |
Jeff Young | 187d7729ff | |
Jeff Young | 940b08ab85 | |
Jeff Young | e8c8bf8d11 | |
Wayne Stambaugh | 5d8c3e5033 | |
Wayne Stambaugh | ec5ed68af8 | |
jean-pierre charras | f66ccfb64f | |
jean-pierre charras | 7eac7dcdcb | |
Maciej Suminski | 1b1a3763d2 | |
Seth Hillbrand | 50eedcf0b3 | |
Seth Hillbrand | 62561292e9 | |
Jeff Young | 03132cabee | |
Seth Hillbrand | 82c9e54735 | |
Seth Hillbrand | c0d9b9ab81 | |
Jeff Young | daf4985a60 | |
Seth Hillbrand | b1805dd254 | |
Jeff Young | 66b0aca696 | |
Seth Hillbrand | 22fbf30f22 | |
Mario Luzeiro | f3d1f31e1d | |
jean-pierre charras | 9610f8f208 | |
jean-pierre charras | 76adf7dbe8 | |
jean-pierre charras | 3f32f0be9e | |
Seth Hillbrand | a77caa6baa | |
Seth Hillbrand | 0b5ca1a883 | |
jean-pierre charras | 839ade2c05 | |
jean-pierre charras | 922ce89643 | |
Seth Hillbrand | 78f7ba10ef | |
Maciej Suminski | dd39599903 | |
jean-pierre charras | dba32717b1 | |
jean-pierre charras | 57800b934e | |
jean-pierre charras | 4daaaa373c | |
Stefan Brüns | 36bb92f844 | |
Wayne Stambaugh | d95ab28db9 | |
Wayne Stambaugh | 09616fff7a | |
Jeff Young | f87a22fefb | |
Seth Hillbrand | 2701bdbbac | |
Michael Kavanagh | 49753d9dad | |
jean-pierre charras | 272b477e91 | |
jean-pierre charras | e453b5b87b | |
jean-pierre charras | c08d3baf8c | |
Maciej Suminski | 3d9e6867cf | |
jean-pierre charras | bd1b15ded7 | |
jean-pierre charras | 8f87aae99e | |
Seth Hillbrand | 43987cc50c | |
Seth Hillbrand | 6106210c87 | |
Seth Hillbrand | b37bc69476 | |
Seth Hillbrand | cccf4cf20b | |
John Beard | 99549f816f | |
Seth Hillbrand | e34dc4abb1 | |
jean-pierre charras | 82b37a5cbe | |
jean-pierre charras | 561dc052ff | |
jean-pierre charras | 553b529fd4 | |
Wayne Stambaugh | 7573c6a4e4 | |
Wayne Stambaugh | c000d70a51 | |
Seth Hillbrand | 234b01905d | |
Seth Hillbrand | a5bdee747a | |
Seth Hillbrand | 9977d0d737 | |
Seth Hillbrand | 46f7011463 | |
Wayne Stambaugh | 876232aa7a | |
jean-pierre charras | 39c38fb386 | |
jean-pierre charras | 99f25b0895 | |
Tomasz Wlostowski | a43ec3e3f0 | |
jean-pierre charras | 7b596f0365 | |
Seth Hillbrand | dd22c73666 | |
Seth Hillbrand | d15b34988d | |
Seth Hillbrand | 5e0ef36719 | |
jean-pierre charras | 6994291997 | |
Seth Hillbrand | 9837d1624f | |
Jeff Young | 13a41f11eb | |
Seth Hillbrand | 59723ce3ab | |
Seth Hillbrand | 79d19d9055 | |
Seth Hillbrand | 115f318976 | |
jean-pierre charras | 51a74b53cb | |
John Beard | f591f8741a | |
Jeff Young | f56ea6bf3c | |
Seth Hillbrand | e3f12ec0d9 | |
Seth Hillbrand | c26311918e | |
Jeff Young | 1f19903e7e | |
Jeff Young | 1e223b9027 | |
Seth Hillbrand | 036288d18f | |
Seth Hillbrand | 8efdcbfaf1 | |
Wayne Stambaugh | 6c3b4e5824 | |
Seth Hillbrand | 9831a14ef3 | |
Seth Hillbrand | f3400e03c6 | |
Jeff Young | 04e699f789 | |
Seth Hillbrand | 9e61ebfb0b | |
Seth Hillbrand | 9e355c29f1 | |
Seth Hillbrand | 5ce0c2065c | |
Wayne Stambaugh | 3f58dce1de | |
Seth Hillbrand | c5c89fd216 | |
Jeff Young | 1820e81f5e | |
Maciej Suminski | 4fcd80eda1 | |
Seth Hillbrand | e7a9643b37 | |
Wayne Stambaugh | 3e28ac9c7c | |
Seth Hillbrand | 4c37defd35 | |
Seth Hillbrand | a4564db082 | |
Martin Aberg | dd3c24faf8 | |
Seth Hillbrand | 0a9aedda8b | |
Seth Hillbrand | 48b4a897af | |
Seth Hillbrand | 4c409fbac9 | |
Seth Hillbrand | b4fc7575a5 | |
Seth Hillbrand | 4560d4ef69 | |
Jeff Young | 3a03c79255 | |
Seth Hillbrand | fca0785754 | |
Seth Hillbrand | 30d398b108 | |
Seth Hillbrand | dd7ce9f00a | |
Seth Hillbrand | 4f2f8e7f67 | |
Seth Hillbrand | c7e511c919 | |
Seth Hillbrand | d769d1649a | |
Seth Hillbrand | 2ae8f6337d | |
Seth Hillbrand | 97c5e0a835 | |
Wayne Stambaugh | c722ea7a0c | |
Jeff Young | 5c600e992a | |
Wayne Stambaugh | a055916f92 | |
Jeff Young | e3d5734f76 | |
Seth Hillbrand | 3d0915a33e | |
Seth Hillbrand | a67bfa6207 | |
Seth Hillbrand | a454adb3ba | |
John Beard | 5019fd0aab | |
Seth Hillbrand | 2c6d0ffe27 | |
Wayne Stambaugh | 0ff84865ca | |
jean-pierre charras | 36746a0941 | |
Seth Hillbrand | 22df4e301b | |
jean-pierre charras | ac0c7441b4 | |
Seth Hillbrand | 2196959539 | |
Seth Hillbrand | 06ac172c27 | |
Seth Hillbrand | e7c51a6a6c | |
Wayne Stambaugh | 079d6b2009 | |
jean-pierre charras | 8cbe5c2184 | |
Jeff Young | a7d7ab32c6 | |
Seth Hillbrand | 61715a8df5 | |
Maciej Suminski | a149960faa | |
Maciej Suminski | 650ff5e5fe | |
Maciej Suminski | 0c42d988f7 | |
Alexey Chernov | a84de7cccf | |
Maciej Suminski | e9b1552b16 | |
Joël Bertrand | 27b88be61f | |
Maciej Suminski | 280573e9af | |
Maciej Suminski | 14e42fec7e | |
jean-pierre charras | 7e8c5b9574 | |
jean-pierre charras | 500abd0ac4 | |
Seth Hillbrand | e29e7ff95d | |
Seth Hillbrand | fb580d3694 | |
Seth Hillbrand | b987126b7d | |
Seth Hillbrand | 3919345003 | |
Seth Hillbrand | 1df99c264f | |
Seth Hillbrand | 4d094da2fa | |
Seth Hillbrand | 2c5154c630 | |
Tomasz Wlostowski | f85dc57642 | |
Seth Hillbrand | 3da86dc24b | |
Seth Hillbrand | 5e9b4dd6a5 | |
Seth Hillbrand | 1f60d8fdbf | |
Seth Hillbrand | 7012226284 | |
Seth Hillbrand | 48bbde65b3 | |
Damian Wrobel | bdcae5f593 | |
jean-pierre charras | b7b125d83c | |
Seth Hillbrand | 9eec296b0a | |
Seth Hillbrand | ec81f3267f | |
qu1ck | f0e9e3b9d5 | |
Seth Hillbrand | ee12fe6eff | |
Seth Hillbrand | d6b95236a4 | |
Seth Hillbrand | fbe677e46e | |
Seth Hillbrand | f84bd0d836 | |
Seth Hillbrand | 25b6604fc5 | |
Ronnie Gaensli | fbd6654f9a | |
Seth Hillbrand | b8ae4e0195 | |
Seth Hillbrand | 9527034e0f | |
Seth Hillbrand | 6754aa8a74 | |
Seth Hillbrand | 0c659eda78 | |
Seth Hillbrand | 20ea486378 | |
Seth Hillbrand | 0c94b3239d | |
Seth Hillbrand | d8e276bc4f | |
Seth Hillbrand | b7a321d143 | |
Seth Hillbrand | f6d9c3a733 | |
jean-pierre charras | 7ed07cae70 | |
Wayne Stambaugh | 8bb0fabcba | |
jean-pierre charras | da4d9ee392 | |
jean-pierre charras | a4ddbff321 | |
Jeff Young | 3c87ab94a2 | |
Jeff Young | e424f29bbb | |
Jeff Young | 3587789ae2 | |
Jeff Young | 8cb389d95c | |
jean-pierre charras | 0f78fe5a5a | |
jean-pierre charras | 333ba4b9a2 | |
Jeff Young | 7e2e39ce30 | |
Wayne Stambaugh | b167c41d1b | |
jean-pierre charras | dc022dcdae | |
jean-pierre charras | e2c6422838 | |
Ronnie Gaensli | 182b8a32df | |
jean-pierre charras | 831978293f | |
John Beard | 64f46448ea | |
Maciej Suminski | ca1f50a023 | |
Maciej Suminski | 626f5ac45a | |
Jeff Young | a45a8e8797 | |
jean-pierre charras | c7d39d22db | |
jean-pierre charras | b764bb1d6d | |
jean-pierre charras | 64eaaa4f58 | |
Seth Hillbrand | 0e946dad1a | |
Seth Hillbrand | 1c2f06106d | |
Seth Hillbrand | edbf34c2b2 | |
Jeff Young | 26cbdbf103 | |
Jeff Young | f163d9ff2a | |
Jeff Young | 9230189f62 | |
Ronnie Gaensli | 9d241ba812 | |
jean-pierre charras | 57c3e98f8c | |
jean-pierre charras | 349d1562af | |
jean-pierre charras | d81bcee10d | |
Seth Hillbrand | 016c02a42d | |
Jeff Young | 80e7a83fb0 | |
jean-pierre charras | d2aa976017 | |
John Beard | 9476b53533 | |
jean-pierre charras | 5e19ed29b8 | |
John Beard | aa340e6b85 | |
John Beard | 9a80ebf387 | |
John Beard | df1fa37fd8 | |
John Beard | 370a412f49 | |
Maciej Suminski | d63c1a2118 | |
Maciej Suminski | 35576adb73 | |
Maciej Suminski | 4ff426275f | |
John Beard | 7dc9f99165 | |
Maciej Suminski | 30da1a3b02 | |
Wayne Stambaugh | 3dcf04fdb8 | |
jean-pierre charras | 6fbc7bb4ce | |
jean-pierre charras | 3af2026061 | |
Maciej Suminski | 6bd8cb9b8f | |
Wayne Stambaugh | b23b48b9a7 |
|
@ -2,6 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015-2016 Cirilo Bernardo <cirilo.bernardo@gmail.com>
|
||||
* Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -34,7 +35,13 @@
|
|||
#include <wx/log.h>
|
||||
#include <wx/stdpaths.h>
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#if BOOST_VERSION >= 106800
|
||||
#include <boost/uuid/detail/sha1.hpp>
|
||||
#else
|
||||
#include <boost/uuid/sha1.hpp>
|
||||
#endif
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/ext.hpp>
|
||||
|
@ -52,6 +59,7 @@
|
|||
|
||||
static wxCriticalSection lock3D_cache;
|
||||
|
||||
|
||||
static bool isSHA1Same( const unsigned char* shaA, const unsigned char* shaB )
|
||||
{
|
||||
for( int i = 0; i < 20; ++i )
|
||||
|
@ -61,6 +69,7 @@ static bool isSHA1Same( const unsigned char* shaA, const unsigned char* shaB )
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
static bool checkTag( const char* aTag, void* aPluginMgrPtr )
|
||||
{
|
||||
if( NULL == aTag || NULL == aPluginMgrPtr )
|
||||
|
@ -71,6 +80,7 @@ static bool checkTag( const char* aTag, void* aPluginMgrPtr )
|
|||
return pp->CheckTag( aTag );
|
||||
}
|
||||
|
||||
|
||||
static const wxString sha1ToWXString( const unsigned char* aSHA1Sum )
|
||||
{
|
||||
unsigned char uc;
|
||||
|
@ -151,14 +161,8 @@ void S3D_CACHE_ENTRY::SetSHA1( const unsigned char* aSHA1Sum )
|
|||
{
|
||||
if( NULL == aSHA1Sum )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
do {
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * [BUG] NULL passed for aSHA1Sum";
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n", ostr.str().c_str() );
|
||||
} while( 0 );
|
||||
#endif
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] NULL passed for aSHA1Sum",
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -186,6 +190,7 @@ S3D_CACHE::S3D_CACHE()
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
S3D_CACHE::~S3D_CACHE()
|
||||
{
|
||||
FlushCache();
|
||||
|
@ -210,8 +215,8 @@ SCENEGRAPH* S3D_CACHE::load( const wxString& aModelFile, S3D_CACHE_ENTRY** aCach
|
|||
if( full3Dpath.empty() )
|
||||
{
|
||||
// the model cannot be found; we cannot proceed
|
||||
wxLogTrace( MASK_3D_CACHE, " * [3D model] could not find model '%s'\n",
|
||||
aModelFile.GetData() );
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [3D model] could not find model '%s'\n",
|
||||
__FILE__, __FUNCTION__, __LINE__, aModelFile );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -294,15 +299,8 @@ SCENEGRAPH* S3D_CACHE::checkCache( const wxString& aFileName, S3D_CACHE_ENTRY**
|
|||
if( m_CacheMap.insert( std::pair< wxString, S3D_CACHE_ENTRY* >
|
||||
( aFileName, ep ) ).second == false )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
do {
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * [BUG] duplicate entry in map file; key = '";
|
||||
ostr << aFileName.ToUTF8() << "'";
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n", ostr.str().c_str() );
|
||||
} while( 0 );
|
||||
#endif
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, aFileName );
|
||||
|
||||
m_CacheList.pop_back();
|
||||
delete ep;
|
||||
|
@ -325,15 +323,8 @@ SCENEGRAPH* S3D_CACHE::checkCache( const wxString& aFileName, S3D_CACHE_ENTRY**
|
|||
if( m_CacheMap.insert( std::pair< wxString, S3D_CACHE_ENTRY* >
|
||||
( aFileName, ep ) ).second == false )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
do {
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * [BUG] duplicate entry in map file; key = '";
|
||||
ostr << aFileName.ToUTF8() << "'";
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n", ostr.str().c_str() );
|
||||
} while( 0 );
|
||||
#endif
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, aFileName );
|
||||
|
||||
m_CacheList.pop_back();
|
||||
delete ep;
|
||||
|
@ -364,28 +355,16 @@ bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char* aSHA1Sum )
|
|||
{
|
||||
if( aFileName.empty() )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
do {
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * [BUG] empty filename";
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n", ostr.str().c_str() );
|
||||
} while( 0 );
|
||||
#endif
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] empty filename",
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if( NULL == aSHA1Sum )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
do {
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * [BUG] NULL pointer passed for aMD5Sum";
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n", ostr.str().c_str() );
|
||||
} while( 0 );
|
||||
#endif
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n * [BUG] NULL pointer passed for aMD5Sum",
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -434,17 +413,16 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
|||
|
||||
if( bname.empty() )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
wxLogTrace( MASK_3D_CACHE, " * [3D model] cannot load cached model; no file hash available\n" );
|
||||
#endif
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
" * [3D model] cannot load cached model; no file hash available" );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_CacheDir.empty() )
|
||||
{
|
||||
wxString errmsg = "cannot load cached model; config directory unknown";
|
||||
wxLogTrace( MASK_3D_CACHE, " * [3D model] %s\n", errmsg.GetData() );
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
" * [3D model] cannot load cached model; config directory unknown" );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -454,8 +432,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
|||
if( !wxFileName::FileExists( fname ) )
|
||||
{
|
||||
wxString errmsg = "cannot open file";
|
||||
wxLogTrace( MASK_3D_CACHE, " * [3D model] %s '%s'\n",
|
||||
errmsg.GetData(), fname.GetData() );
|
||||
wxLogTrace( MASK_3D_CACHE, " * [3D model] %s '%s'", errmsg.GetData(), fname.GetData() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -475,28 +452,16 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
|||
{
|
||||
if( NULL == aCacheItem )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
do {
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * NULL passed for aCacheItem";
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n", ostr.str().c_str() );
|
||||
} while( 0 );
|
||||
#endif
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * NULL passed for aCacheItem",
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if( NULL == aCacheItem->sceneData )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
do {
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * aCacheItem has no valid scene data";
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n", ostr.str().c_str() );
|
||||
} while( 0 );
|
||||
#endif
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * aCacheItem has no valid scene data",
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -505,17 +470,16 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
|||
|
||||
if( bname.empty() )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
wxLogTrace( MASK_3D_CACHE, " * [3D model] cannot load cached model; no file hash available\n" );
|
||||
#endif
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
" * [3D model] cannot load cached model; no file hash available" );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_CacheDir.empty() )
|
||||
{
|
||||
wxString errmsg = "cannot load cached model; config directory unknown";
|
||||
wxLogTrace( MASK_3D_CACHE, " * [3D model] %s\n", errmsg.GetData() );
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
" * [3D model] cannot load cached model; config directory unknown" );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -526,9 +490,8 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
|||
{
|
||||
if( !wxFileName::FileExists( fname ) )
|
||||
{
|
||||
wxString errmsg = _( "path exists but is not a regular file" );
|
||||
wxLogTrace( MASK_3D_CACHE, " * [3D model] %s '%s'\n", errmsg.GetData(),
|
||||
fname.ToUTF8() );
|
||||
wxLogTrace( MASK_3D_CACHE, " * [3D model] path exists but is not a regular file '%s'",
|
||||
fname );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -559,14 +522,9 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
|
|||
|
||||
if( !cfgdir.DirExists() )
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = _( "failed to create 3D configuration directory" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n";
|
||||
errmsg = _( "config directory" );
|
||||
ostr << " * " << errmsg.ToUTF8() << " '";
|
||||
ostr << cfgdir.GetPath().ToUTF8() << "'";
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
"%s:%s:%d\n * failed to create 3D configuration directory '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, cfgdir.GetPath() );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -577,15 +535,10 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
|
|||
// inform the file resolver of the config directory
|
||||
if( !m_FNResolver->Set3DConfigDir( m_ConfigDir ) )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
do {
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * could not set 3D Config Directory on filename resolver\n";
|
||||
ostr << " * config directory: '" << m_ConfigDir.ToUTF8() << "'";
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n", ostr.str().c_str() );
|
||||
} while( 0 );
|
||||
#endif
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
"%s:%s:%d\n * could not set 3D Config Directory on filename resolver\n"
|
||||
" * config directory: '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, m_ConfigDir );
|
||||
}
|
||||
|
||||
// 3D cache data must go to a user's cache directory;
|
||||
|
@ -597,20 +550,20 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
|
|||
// 3. MSWin: AppData\Local\kicad\3d
|
||||
wxString cacheDir;
|
||||
|
||||
#if defined(_WIN32)
|
||||
#if defined(_WIN32)
|
||||
wxStandardPaths::Get().UseAppInfo( wxStandardPaths::AppInfo_None );
|
||||
cacheDir = wxStandardPaths::Get().GetUserLocalDataDir();
|
||||
cacheDir.append( "\\kicad\\3d" );
|
||||
#elif defined(__APPLE)
|
||||
#elif defined(__APPLE)
|
||||
cacheDir = "${HOME}/Library/Caches/kicad/3d";
|
||||
#else // assume Linux
|
||||
#else // assume Linux
|
||||
cacheDir = ExpandEnvVarSubstitutions( "${XDG_CACHE_HOME}" );
|
||||
|
||||
if( cacheDir.empty() || cacheDir == "${XDG_CACHE_HOME}" )
|
||||
cacheDir = "${HOME}/.cache";
|
||||
|
||||
cacheDir.append( "/kicad/3d" );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
cacheDir = ExpandEnvVarSubstitutions( cacheDir );
|
||||
cfgdir.Assign( cacheDir, "" );
|
||||
|
@ -621,14 +574,8 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
|
|||
|
||||
if( !cfgdir.DirExists() )
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "failed to create 3D cache directory";
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n";
|
||||
errmsg = "cache directory";
|
||||
ostr << " * " << errmsg.ToUTF8() << " '";
|
||||
ostr << cfgdir.GetPath().ToUTF8() << "'";
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * failed to create 3D cache directory '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, cfgdir.GetPath() );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -681,11 +628,8 @@ wxString S3D_CACHE::Get3DConfigDir( bool createDefault )
|
|||
|
||||
if( !cfgpath.DirExists() )
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
wxString errmsg = "failed to create 3D configuration directory";
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * " << errmsg.ToUTF8();
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * failed to create 3D configuration directory '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, cfgpath.GetPath() );
|
||||
|
||||
return wxT( "" );
|
||||
}
|
||||
|
@ -788,14 +732,9 @@ S3DMODEL* S3D_CACHE::GetModel( const wxString& aModelFileName )
|
|||
|
||||
if( !cp )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
do {
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * [BUG] model loaded with no associated S3D_CACHE_ENTRY";
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n", ostr.str().c_str() );
|
||||
} while( 0 );
|
||||
#endif
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
"%s:%s:%d\n * [BUG] model loaded with no associated S3D_CACHE_ENTRY",
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "../3d_rendering/3d_render_raytracing/accelerators/ccontainer2d.h"
|
||||
#include "../3d_rendering/3d_render_raytracing/shapes3D/ccylinder.h"
|
||||
#include "../3d_rendering/3d_render_raytracing/shapes3D/clayeritem.h"
|
||||
#include <openmp_mutex.h>
|
||||
|
||||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <class_pad.h>
|
||||
|
@ -418,27 +418,24 @@ void CINFO3D_VISU::createNewPadWithClearance( const D_PAD* aPad,
|
|||
*aPad ) );
|
||||
|
||||
// Add the PAD contours
|
||||
// !TODO: check the corners because it cannot add
|
||||
// roundsegments that are in the same start and end position
|
||||
aDstContainer->Add( new CROUNDSEGMENT2D( corners3DU[0],
|
||||
corners3DU[1],
|
||||
aClearanceValue.x * 2.0f * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
|
||||
aDstContainer->Add( new CROUNDSEGMENT2D( corners3DU[1],
|
||||
corners3DU[2],
|
||||
aClearanceValue.x * 2.0f * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
|
||||
aDstContainer->Add( new CROUNDSEGMENT2D( corners3DU[2],
|
||||
corners3DU[3],
|
||||
aClearanceValue.x * 2.0f * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
|
||||
aDstContainer->Add( new CROUNDSEGMENT2D( corners3DU[3],
|
||||
corners3DU[0],
|
||||
aClearanceValue.x * 2.0f * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
// Round segments cannot have 0-length elements, so we approximate them
|
||||
// as a small circle
|
||||
for( int i = 1; i <= 4; i++ )
|
||||
{
|
||||
if( Is_segment_a_circle( corners3DU[i - 1], corners3DU[i & 3] ) )
|
||||
{
|
||||
aDstContainer->Add( new CFILLEDCIRCLE2D( corners3DU[i - 1],
|
||||
aClearanceValue.x * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
aDstContainer->Add( new CROUNDSEGMENT2D( corners3DU[i - 1],
|
||||
corners3DU[i & 3],
|
||||
aClearanceValue.x * 2.0f * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -473,27 +470,24 @@ void CINFO3D_VISU::createNewPadWithClearance( const D_PAD* aPad,
|
|||
*aPad ) );
|
||||
|
||||
// Add the PAD contours
|
||||
// !TODO: check the corners because it cannot add
|
||||
// roundsegments that are in the same start and end position
|
||||
aDstContainer->Add( new CROUNDSEGMENT2D( corners3DU[0],
|
||||
corners3DU[1],
|
||||
rounding_radius * 2.0f * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
|
||||
aDstContainer->Add( new CROUNDSEGMENT2D( corners3DU[1],
|
||||
corners3DU[2],
|
||||
rounding_radius * 2.0f * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
|
||||
aDstContainer->Add( new CROUNDSEGMENT2D( corners3DU[2],
|
||||
corners3DU[3],
|
||||
rounding_radius * 2.0f * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
|
||||
aDstContainer->Add( new CROUNDSEGMENT2D( corners3DU[3],
|
||||
corners3DU[0],
|
||||
rounding_radius * 2.0f * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
// Round segments cannot have 0-length elements, so we approximate them
|
||||
// as a small circle
|
||||
for( int i = 1; i <= 4; i++ )
|
||||
{
|
||||
if( Is_segment_a_circle( corners3DU[i - 1], corners3DU[i & 3] ) )
|
||||
{
|
||||
aDstContainer->Add( new CFILLEDCIRCLE2D( corners3DU[i - 1],
|
||||
rounding_radius * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
aDstContainer->Add( new CROUNDSEGMENT2D( corners3DU[i - 1],
|
||||
corners3DU[i & 3],
|
||||
rounding_radius * 2.0f * m_biuTo3Dunits,
|
||||
*aPad ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -506,10 +500,6 @@ void CINFO3D_VISU::createNewPadWithClearance( const D_PAD* aPad,
|
|||
if( aClearanceValue.x )
|
||||
polyList.Inflate( aClearanceValue.x, 32 );
|
||||
|
||||
// This convert the poly in outline and holes
|
||||
polyList.Simplify( SHAPE_POLY_SET::PM_FAST );
|
||||
polyList.Simplify( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
|
||||
|
||||
// Add the PAD polygon
|
||||
Convert_shape_line_polygon_to_triangles( polyList, *aDstContainer, m_biuTo3Dunits, *aPad );
|
||||
|
||||
|
@ -762,8 +752,9 @@ void CINFO3D_VISU::AddShapeWithClearanceToContainer( const DRAWSEGMENT* aDrawSeg
|
|||
PCB_LAYER_ID aLayerId,
|
||||
int aClearanceValue )
|
||||
{
|
||||
// The full width of the lines to create:
|
||||
const int linewidth = aDrawSegment->GetWidth() + (2 * aClearanceValue);
|
||||
// The full width of the lines to create
|
||||
// The extra 1 protects the inner/outer radius values from degeneracy
|
||||
const int linewidth = aDrawSegment->GetWidth() + (2 * aClearanceValue) + 1;
|
||||
|
||||
switch( aDrawSegment->GetShape() )
|
||||
{
|
||||
|
@ -829,11 +820,8 @@ void CINFO3D_VISU::AddShapeWithClearanceToContainer( const DRAWSEGMENT* aDrawSeg
|
|||
|
||||
aDrawSegment->TransformShapeWithClearanceToPolygon( polyList, aClearanceValue,
|
||||
segcountforcircle, correctionFactor );
|
||||
// This convert the poly in outline and holes
|
||||
// Note: This two sequencial calls are need in order to get
|
||||
// the triangulation function to work properly.
|
||||
|
||||
polyList.Simplify( SHAPE_POLY_SET::PM_FAST );
|
||||
polyList.Simplify( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
|
||||
|
||||
if( polyList.IsEmpty() ) // Just for caution
|
||||
break;
|
||||
|
@ -860,24 +848,14 @@ void CINFO3D_VISU::AddSolidAreasShapesToContainer( const ZONE_CONTAINER* aZoneCo
|
|||
PCB_LAYER_ID aLayerId )
|
||||
{
|
||||
// Copy the polys list because we have to simplify it
|
||||
SHAPE_POLY_SET polyList = SHAPE_POLY_SET(aZoneContainer->GetFilledPolysList());
|
||||
SHAPE_POLY_SET polyList = SHAPE_POLY_SET( aZoneContainer->GetFilledPolysList(), true );
|
||||
|
||||
// This convert the poly in outline and holes
|
||||
|
||||
// Note: This two sequencial calls are need in order to get
|
||||
// the triangulation function to work properly.
|
||||
polyList.Simplify( SHAPE_POLY_SET::PM_FAST );
|
||||
polyList.Simplify( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
|
||||
|
||||
if( polyList.IsEmpty() )
|
||||
return;
|
||||
|
||||
Convert_shape_line_polygon_to_triangles( polyList,
|
||||
*aDstContainer,
|
||||
m_biuTo3Dunits,
|
||||
*aZoneContainer );
|
||||
|
||||
|
||||
// add filled areas outlines, which are drawn with thick lines segments
|
||||
// /////////////////////////////////////////////////////////////////////////
|
||||
for( int i = 0; i < polyList.OutlineCount(); ++i )
|
||||
|
@ -895,10 +873,11 @@ void CINFO3D_VISU::AddSolidAreasShapesToContainer( const ZONE_CONTAINER* aZoneCo
|
|||
|
||||
if( Is_segment_a_circle( start3DU, end3DU ) )
|
||||
{
|
||||
aDstContainer->Add( new CFILLEDCIRCLE2D( start3DU,
|
||||
(aZoneContainer->GetMinThickness() / 2) *
|
||||
m_biuTo3Dunits,
|
||||
*aZoneContainer ) );
|
||||
float radius = (aZoneContainer->GetMinThickness() / 2) * m_biuTo3Dunits;
|
||||
|
||||
if( radius > 0.0 ) // degenerated circles crash 3D viewer
|
||||
aDstContainer->Add( new CFILLEDCIRCLE2D( start3DU, radius ,
|
||||
*aZoneContainer ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -924,11 +903,12 @@ void CINFO3D_VISU::AddSolidAreasShapesToContainer( const ZONE_CONTAINER* aZoneCo
|
|||
|
||||
if( Is_segment_a_circle( start3DU, end3DU ) )
|
||||
{
|
||||
aDstContainer->Add(
|
||||
new CFILLEDCIRCLE2D( start3DU,
|
||||
(aZoneContainer->GetMinThickness() / 2) *
|
||||
m_biuTo3Dunits,
|
||||
*aZoneContainer ) );
|
||||
float radius = (aZoneContainer->GetMinThickness() / 2) * m_biuTo3Dunits;
|
||||
|
||||
if( radius > 0.0 ) // degenerated circles crash 3D viewer
|
||||
aDstContainer->Add(
|
||||
new CFILLEDCIRCLE2D( start3DU, radius,
|
||||
*aZoneContainer ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "../3d_rendering/3d_render_raytracing/accelerators/ccontainer2d.h"
|
||||
#include "../3d_rendering/3d_render_raytracing/shapes3D/ccylinder.h"
|
||||
#include "../3d_rendering/3d_render_raytracing/shapes3D/clayeritem.h"
|
||||
#include <openmp_mutex.h>
|
||||
|
||||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <class_pad.h>
|
||||
|
@ -52,6 +52,9 @@
|
|||
#include <trigo.h>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <thread>
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
|
||||
#include <profile.h>
|
||||
|
||||
|
@ -788,36 +791,43 @@ void CINFO3D_VISU::createLayers( REPORTER *aStatusTextReporter )
|
|||
|
||||
// Add zones objects
|
||||
// /////////////////////////////////////////////////////////////////////
|
||||
for( unsigned int lIdx = 0; lIdx < layer_id.size(); ++lIdx )
|
||||
std::atomic<size_t> nextZone( 0 );
|
||||
std::atomic<size_t> threadsFinished( 0 );
|
||||
|
||||
size_t parallelThreadCount = std::max<size_t>( std::thread::hardware_concurrency(), 2 );
|
||||
for( size_t ii = 0; ii < parallelThreadCount; ++ii )
|
||||
{
|
||||
const PCB_LAYER_ID curr_layer_id = layer_id[lIdx];
|
||||
|
||||
if( aStatusTextReporter )
|
||||
aStatusTextReporter->Report( wxString::Format( _( "Create zones of layer %s" ),
|
||||
LSET::Name( curr_layer_id ) ) );
|
||||
|
||||
wxASSERT( m_layers_container2D.find( curr_layer_id ) != m_layers_container2D.end() );
|
||||
|
||||
CBVHCONTAINER2D *layerContainer = m_layers_container2D[curr_layer_id];
|
||||
|
||||
// ADD COPPER ZONES
|
||||
for( int ii = 0; ii < m_board->GetAreaCount(); ++ii )
|
||||
std::thread t = std::thread( [&]()
|
||||
{
|
||||
const ZONE_CONTAINER* zone = m_board->GetArea( ii );
|
||||
const PCB_LAYER_ID zonelayer = zone->GetLayer();
|
||||
|
||||
if( zonelayer == curr_layer_id )
|
||||
for( size_t areaId = nextZone.fetch_add( 1 );
|
||||
areaId < static_cast<size_t>( m_board->GetAreaCount() );
|
||||
areaId = nextZone.fetch_add( 1 ) )
|
||||
{
|
||||
AddSolidAreasShapesToContainer( zone,
|
||||
layerContainer,
|
||||
curr_layer_id );
|
||||
const ZONE_CONTAINER* zone = m_board->GetArea( areaId );
|
||||
|
||||
if( zone == nullptr )
|
||||
break;
|
||||
|
||||
auto layerContainer = m_layers_container2D.find( zone->GetLayer() );
|
||||
|
||||
if( layerContainer != m_layers_container2D.end() )
|
||||
AddSolidAreasShapesToContainer( zone, layerContainer->second,
|
||||
zone->GetLayer() );
|
||||
}
|
||||
}
|
||||
|
||||
threadsFinished++;
|
||||
} );
|
||||
|
||||
t.detach();
|
||||
}
|
||||
|
||||
while( threadsFinished < parallelThreadCount )
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
|
||||
|
||||
}
|
||||
|
||||
#ifdef PRINT_STATISTICS_3D_VIEWER
|
||||
printf( "T13: %.3f ms\n", (float)( GetRunningMicroSecs() - start_Time ) / 1e3 );
|
||||
printf( "fill zones T13: %.3f ms\n", (float)( GetRunningMicroSecs() - start_Time ) / 1e3 );
|
||||
start_Time = GetRunningMicroSecs();
|
||||
#endif
|
||||
|
||||
|
@ -825,29 +835,18 @@ void CINFO3D_VISU::createLayers( REPORTER *aStatusTextReporter )
|
|||
GetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS ) &&
|
||||
(m_render_engine == RENDER_ENGINE_OPENGL_LEGACY) )
|
||||
{
|
||||
// Add zones poly contourns
|
||||
// /////////////////////////////////////////////////////////////////////
|
||||
for( unsigned int lIdx = 0; lIdx < layer_id.size(); ++lIdx )
|
||||
// ADD COPPER ZONES
|
||||
for( int ii = 0; ii < m_board->GetAreaCount(); ++ii )
|
||||
{
|
||||
const PCB_LAYER_ID curr_layer_id = layer_id[lIdx];
|
||||
const ZONE_CONTAINER* zone = m_board->GetArea( ii );
|
||||
|
||||
wxASSERT( m_layers_poly.find( curr_layer_id ) != m_layers_poly.end() );
|
||||
if( zone == nullptr )
|
||||
break;
|
||||
|
||||
SHAPE_POLY_SET *layerPoly = m_layers_poly[curr_layer_id];
|
||||
auto layerContainer = m_layers_poly.find( zone->GetLayer() );
|
||||
|
||||
// ADD COPPER ZONES
|
||||
for( int ii = 0; ii < m_board->GetAreaCount(); ++ii )
|
||||
{
|
||||
const ZONE_CONTAINER* zone = m_board->GetArea( ii );
|
||||
const LAYER_NUM zonelayer = zone->GetLayer();
|
||||
|
||||
if( zonelayer == curr_layer_id )
|
||||
{
|
||||
zone->TransformSolidAreasShapesToPolygonSet( *layerPoly,
|
||||
segcountforcircle,
|
||||
correctionFactor );
|
||||
}
|
||||
}
|
||||
if( layerContainer != m_layers_poly.end() )
|
||||
zone->TransformSolidAreasShapesToPolygonSet( *layerContainer->second, segcountforcircle, correctionFactor );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -865,22 +864,35 @@ void CINFO3D_VISU::createLayers( REPORTER *aStatusTextReporter )
|
|||
if( GetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS ) &&
|
||||
(m_render_engine == RENDER_ENGINE_OPENGL_LEGACY) )
|
||||
{
|
||||
const int nLayers = layer_id.size();
|
||||
std::atomic<size_t> nextItem( 0 );
|
||||
std::atomic<size_t> threadsFinished( 0 );
|
||||
|
||||
#pragma omp parallel for
|
||||
for( signed int lIdx = 0; lIdx < nLayers; ++lIdx )
|
||||
size_t parallelThreadCount = std::min<size_t>(
|
||||
std::max<size_t>( std::thread::hardware_concurrency(), 2 ),
|
||||
layer_id.size() );
|
||||
for( size_t ii = 0; ii < parallelThreadCount; ++ii )
|
||||
{
|
||||
const PCB_LAYER_ID curr_layer_id = layer_id[lIdx];
|
||||
std::thread t = std::thread( [&nextItem, &threadsFinished, &layer_id, this]()
|
||||
{
|
||||
for( size_t i = nextItem.fetch_add( 1 );
|
||||
i < layer_id.size();
|
||||
i = nextItem.fetch_add( 1 ) )
|
||||
{
|
||||
auto layerPoly = m_layers_poly.find( layer_id[i] );
|
||||
|
||||
wxASSERT( m_layers_poly.find( curr_layer_id ) != m_layers_poly.end() );
|
||||
if( layerPoly != m_layers_poly.end() )
|
||||
// This will make a union of all added contours
|
||||
layerPoly->second->Simplify( SHAPE_POLY_SET::PM_FAST );
|
||||
}
|
||||
|
||||
SHAPE_POLY_SET *layerPoly = m_layers_poly[curr_layer_id];
|
||||
threadsFinished++;
|
||||
} );
|
||||
|
||||
wxASSERT( layerPoly != NULL );
|
||||
|
||||
// This will make a union of all added contourns
|
||||
layerPoly->Simplify( SHAPE_POLY_SET::PM_FAST );
|
||||
t.detach();
|
||||
}
|
||||
|
||||
while( threadsFinished < parallelThreadCount )
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
|
||||
}
|
||||
|
||||
#ifdef PRINT_STATISTICS_3D_VIEWER
|
||||
|
|
|
@ -1052,7 +1052,7 @@ bool EDA_3D_CANVAS::SetView3D( int aKeycode )
|
|||
m_settings.CameraGet().SetInterpolateMode( INTERPOLATION_BEZIER );
|
||||
m_settings.CameraGet().SetT0_and_T1_current_T();
|
||||
m_settings.CameraGet().Reset_T1();
|
||||
m_settings.CameraGet().RotateX_T1( glm::radians( -180.0f ) );
|
||||
m_settings.CameraGet().RotateY_T1( glm::radians( 180.0f ) );
|
||||
request_start_moving_camera(
|
||||
glm::min( glm::max( m_settings.CameraGet().ZoomGet(), 0.5f ), 1.125f ) );
|
||||
return true;
|
||||
|
|
|
@ -369,7 +369,8 @@ void C3D_RENDER_OGL_LEGACY::reload( REPORTER *aStatusTextReporter )
|
|||
// /////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CCONTAINER2D boardContainer;
|
||||
Convert_shape_line_polygon_to_triangles( m_settings.GetBoardPoly(),
|
||||
SHAPE_POLY_SET tmpBoard = m_settings.GetBoardPoly();
|
||||
Convert_shape_line_polygon_to_triangles( tmpBoard,
|
||||
boardContainer,
|
||||
m_settings.BiuTo3Dunits(),
|
||||
(const BOARD_ITEM &)*m_settings.GetBoard() );
|
||||
|
@ -614,11 +615,9 @@ void C3D_RENDER_OGL_LEGACY::reload( REPORTER *aStatusTextReporter )
|
|||
{
|
||||
const SHAPE_POLY_SET *polyList = map_poly.at( layer_id );
|
||||
|
||||
layerTriangles->AddToMiddleContourns( *polyList,
|
||||
layer_z_bot,
|
||||
layer_z_top,
|
||||
m_settings.BiuTo3Dunits(),
|
||||
false );
|
||||
if( polyList->OutlineCount() > 0 )
|
||||
layerTriangles->AddToMiddleContourns( *polyList, layer_z_bot, layer_z_top,
|
||||
m_settings.BiuTo3Dunits(), false );
|
||||
}
|
||||
|
||||
// Create display list
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
|
||||
#include "clayer_triangles.h"
|
||||
#include <wx/debug.h> // For the wxASSERT
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
|
||||
|
||||
CLAYER_TRIANGLE_CONTAINER::CLAYER_TRIANGLE_CONTAINER( unsigned int aNrReservedTriangles,
|
||||
|
@ -219,8 +222,8 @@ void CLAYER_TRIANGLES::AddToMiddleContourns( const std::vector< SFVEC2F > &aCont
|
|||
const SFVEC2F &v0 = aContournPoints[i + 0];
|
||||
const SFVEC2F &v1 = aContournPoints[i + 1];
|
||||
|
||||
#pragma omp critical
|
||||
{
|
||||
std::lock_guard<std::mutex> lock( m_middle_layer_lock );
|
||||
m_layer_middle_contourns_quads->AddQuad( SFVEC3F( v0.x, v0.y, zTop ),
|
||||
SFVEC3F( v1.x, v1.y, zTop ),
|
||||
SFVEC3F( v1.x, v1.y, zBot ),
|
||||
|
@ -279,8 +282,6 @@ void CLAYER_TRIANGLES::AddToMiddleContourns( const SHAPE_POLY_SET &aPolySet,
|
|||
double aBiuTo3Du,
|
||||
bool aInvertFaceDirection )
|
||||
{
|
||||
wxASSERT( aPolySet.OutlineCount() > 0 );
|
||||
|
||||
if( aPolySet.OutlineCount() == 0 )
|
||||
return;
|
||||
|
||||
|
@ -305,21 +306,41 @@ void CLAYER_TRIANGLES::AddToMiddleContourns( const SHAPE_POLY_SET &aPolySet,
|
|||
m_layer_middle_contourns_quads->Reserve_More( nrContournPointsToReserve * 2,
|
||||
true );
|
||||
|
||||
#pragma omp parallel for
|
||||
for( signed int i = 0; i < aPolySet.OutlineCount(); ++i )
|
||||
std::atomic<int> nextItem( 0 );
|
||||
std::atomic<size_t> threadsFinished( 0 );
|
||||
|
||||
size_t parallelThreadCount = std::min<size_t>(
|
||||
std::max<size_t>( std::thread::hardware_concurrency(), 2 ),
|
||||
static_cast<size_t>( aPolySet.OutlineCount() ) );
|
||||
for( size_t ii = 0; ii < parallelThreadCount; ++ii )
|
||||
{
|
||||
// Add outline
|
||||
const SHAPE_LINE_CHAIN& pathOutline = aPolySet.COutline( i );
|
||||
|
||||
AddToMiddleContourns( pathOutline, zBot, zTop, aBiuTo3Du, aInvertFaceDirection );
|
||||
|
||||
// Add holes for this outline
|
||||
for( int h = 0; h < aPolySet.HoleCount( i ); ++h )
|
||||
std::thread t = std::thread( [&]()
|
||||
{
|
||||
const SHAPE_LINE_CHAIN &hole = aPolySet.CHole( i, h );
|
||||
AddToMiddleContourns( hole, zBot, zTop, aBiuTo3Du, aInvertFaceDirection );
|
||||
}
|
||||
for( int i = nextItem.fetch_add( 1 );
|
||||
i < aPolySet.OutlineCount();
|
||||
i = nextItem.fetch_add( 1 ) )
|
||||
{
|
||||
// Add outline
|
||||
const SHAPE_LINE_CHAIN& pathOutline = aPolySet.COutline( i );
|
||||
|
||||
AddToMiddleContourns( pathOutline, zBot, zTop, aBiuTo3Du, aInvertFaceDirection );
|
||||
|
||||
// Add holes for this outline
|
||||
for( int h = 0; h < aPolySet.HoleCount( i ); ++h )
|
||||
{
|
||||
const SHAPE_LINE_CHAIN &hole = aPolySet.CHole( i, h );
|
||||
AddToMiddleContourns( hole, zBot, zTop, aBiuTo3Du, aInvertFaceDirection );
|
||||
}
|
||||
}
|
||||
|
||||
threadsFinished++;
|
||||
} );
|
||||
|
||||
t.detach();
|
||||
}
|
||||
|
||||
while( threadsFinished < parallelThreadCount )
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <geometry/shape_line_chain.h>
|
||||
#include <geometry/shape_poly_set.h>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
|
||||
|
||||
typedef std::vector< SFVEC3F > SFVEC3F_VECTOR;
|
||||
|
@ -174,6 +175,8 @@ public:
|
|||
float zTop,
|
||||
bool aInvertFaceDirection );
|
||||
|
||||
std::mutex m_middle_layer_lock;
|
||||
|
||||
CLAYER_TRIANGLE_CONTAINER *m_layer_top_segment_ends;
|
||||
CLAYER_TRIANGLE_CONTAINER *m_layer_top_triangles;
|
||||
CLAYER_TRIANGLE_CONTAINER *m_layer_middle_contourns_quads;
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "ccontainer2d.h"
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
#include <boost/range/algorithm/partition.hpp>
|
||||
#include <boost/range/algorithm/nth_element.hpp>
|
||||
#include <wx/debug.h>
|
||||
|
@ -46,6 +47,7 @@ CGENERICCONTAINER2D::CGENERICCONTAINER2D( OBJECT2D_TYPE aObjType )
|
|||
|
||||
void CGENERICCONTAINER2D::Clear()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock( m_lock );
|
||||
m_bbox.Reset();
|
||||
|
||||
for( LIST_OBJECT2D::iterator ii = m_objects.begin();
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "../shapes2D/cobject2d.h"
|
||||
#include <list>
|
||||
#include <mutex>
|
||||
|
||||
typedef std::list<COBJECT2D *> LIST_OBJECT2D;
|
||||
typedef std::list<const COBJECT2D *> CONST_LIST_OBJECT2D;
|
||||
|
@ -52,6 +53,7 @@ public:
|
|||
{
|
||||
if( aObject ) // Only add if it is a valid pointer
|
||||
{
|
||||
std::lock_guard<std::mutex> lock( m_lock );
|
||||
m_objects.push_back( aObject );
|
||||
m_bbox.Union( aObject->GetBBox() );
|
||||
}
|
||||
|
@ -70,6 +72,7 @@ public:
|
|||
CONST_LIST_OBJECT2D &aOutList ) const = 0;
|
||||
|
||||
private:
|
||||
std::mutex m_lock;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -918,7 +918,6 @@ void C3D_RENDER_RAYTRACING::reload( REPORTER *aStatusTextReporter )
|
|||
}
|
||||
m_accelerator = 0;
|
||||
|
||||
//m_accelerator = new CGRID( m_object_container );
|
||||
m_accelerator = new CBVH_PBRT( m_object_container );
|
||||
|
||||
#ifdef PRINT_STATISTICS_3D_VIEWER
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -131,7 +131,7 @@ private:
|
|||
unsigned long int m_stats_start_rendering_time;
|
||||
|
||||
/// Save the number of blocks progress of the render
|
||||
long m_nrBlocksRenderProgress;
|
||||
size_t m_nrBlocksRenderProgress;
|
||||
|
||||
CPOSTSHADER_SSAO m_postshader_ssao;
|
||||
|
||||
|
@ -165,7 +165,7 @@ private:
|
|||
std::vector< SFVEC2UI > m_blockPositions;
|
||||
|
||||
/// this flags if a position was already processed (cleared each new render)
|
||||
std::vector< bool > m_blockPositionsWasProcessed;
|
||||
std::vector< int > m_blockPositionsWasProcessed;
|
||||
|
||||
/// this encodes the Morton code positions (on fast preview mode)
|
||||
std::vector< SFVEC2UI > m_blockPositionsFast;
|
||||
|
|
|
@ -50,9 +50,9 @@ void RAY::Init( const SFVEC3F& o, const SFVEC3F& d )
|
|||
// Amy Williams Steve Barrus R. Keith Morley Peter Shirley
|
||||
// University of Utah
|
||||
// http://people.csail.mit.edu/amy/papers/box-jgt.pdf
|
||||
m_dirIsNeg[0] = m_Dir.x <= 0.0f;
|
||||
m_dirIsNeg[1] = m_Dir.y <= 0.0f;
|
||||
m_dirIsNeg[2] = m_Dir.z <= 0.0f;
|
||||
m_dirIsNeg[0] = m_Dir.x < 0.0f;
|
||||
m_dirIsNeg[1] = m_Dir.y < 0.0f;
|
||||
m_dirIsNeg[2] = m_Dir.z < 0.0f;
|
||||
|
||||
|
||||
// ray slope
|
||||
|
|
|
@ -35,9 +35,9 @@
|
|||
|
||||
#include <wx/glcanvas.h> // CALLBACK definition, needed on Windows
|
||||
// alse needed on OSX to define __DARWIN__
|
||||
|
||||
#include <geometry/polygon_triangulation.h>
|
||||
#include "../../../3d_fastmath.h"
|
||||
#include <poly2tri/poly2tri.h>
|
||||
|
||||
|
||||
|
||||
CTRIANGLE2D::CTRIANGLE2D ( const SFVEC2F &aV1,
|
||||
|
@ -126,172 +126,28 @@ bool CTRIANGLE2D::IsPointInside( const SFVEC2F &aPoint ) const
|
|||
const float c = 1.0f - a - b;
|
||||
|
||||
return 0.0f <= c && c <= 1.0f;
|
||||
/*
|
||||
return 0.0f <= a && a <= 1.0f &&
|
||||
0.0f <= b && b <= 1.0f &&
|
||||
0.0f <= c && c <= 1.0f;*/
|
||||
}
|
||||
|
||||
|
||||
template <class C> void FreeClear( C & cntr )
|
||||
{
|
||||
for( typename C::iterator it = cntr.begin();
|
||||
it != cntr.end();
|
||||
++it )
|
||||
{
|
||||
delete * it;
|
||||
}
|
||||
|
||||
cntr.clear();
|
||||
}
|
||||
|
||||
// Note: Please check edgeshrink.cpp in order to learn the EdgeShrink propose
|
||||
|
||||
#define APPLY_EDGE_SHRINK
|
||||
|
||||
#ifdef APPLY_EDGE_SHRINK
|
||||
extern void EdgeShrink( std::vector<SFVEC2I64> &aPath );
|
||||
|
||||
#define POLY_SCALE_FACT 256
|
||||
#define POLY_SCALE_FACT_INVERSE (1.0 / (double)(POLY_SCALE_FACT))
|
||||
#endif
|
||||
|
||||
void Convert_shape_line_polygon_to_triangles( const SHAPE_POLY_SET &aPolyList,
|
||||
void Convert_shape_line_polygon_to_triangles( SHAPE_POLY_SET &aPolyList,
|
||||
CGENERICCONTAINER2D &aDstContainer,
|
||||
float aBiuTo3DunitsScale ,
|
||||
const BOARD_ITEM &aBoardItem )
|
||||
{
|
||||
unsigned int nOutlines = aPolyList.OutlineCount();
|
||||
|
||||
aPolyList.CacheTriangulation();
|
||||
const double conver_d = (double)aBiuTo3DunitsScale;
|
||||
|
||||
for( unsigned int idx = 0; idx < nOutlines; ++idx )
|
||||
for( unsigned int i = 0; i < aPolyList.TriangulatedPolyCount(); i++ )
|
||||
{
|
||||
const SHAPE_LINE_CHAIN &outlinePath = aPolyList.COutline( idx );
|
||||
auto triPoly = aPolyList.TriangulatedPolygon( i );
|
||||
|
||||
wxASSERT( outlinePath.PointCount() >= 3 );
|
||||
|
||||
std::vector<SFVEC2I64> scaledOutline;
|
||||
scaledOutline.resize( outlinePath.PointCount() );
|
||||
|
||||
// printf("\nidx: %u\n", idx);
|
||||
|
||||
// Apply a scale to the points
|
||||
for( unsigned int i = 0;
|
||||
i < (unsigned int)outlinePath.PointCount();
|
||||
++i )
|
||||
for( size_t i = 0; i < triPoly->GetTriangleCount(); i++ )
|
||||
{
|
||||
const VECTOR2I& a = outlinePath.CPoint( i );
|
||||
|
||||
#ifdef APPLY_EDGE_SHRINK
|
||||
scaledOutline[i] = SFVEC2I64( (glm::int64)a.x * POLY_SCALE_FACT,
|
||||
(glm::int64)a.y * POLY_SCALE_FACT );
|
||||
#else
|
||||
scaledOutline[i] = SFVEC2I64( (glm::int64)a.x,
|
||||
(glm::int64)a.y );
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef APPLY_EDGE_SHRINK
|
||||
// Apply a modification to the points
|
||||
EdgeShrink( scaledOutline );
|
||||
#endif
|
||||
// Copy to a array of pointers
|
||||
std::vector<p2t::Point*> polyline;
|
||||
polyline.resize( outlinePath.PointCount() );
|
||||
|
||||
for( unsigned int i = 0;
|
||||
i < (unsigned int)scaledOutline.size();
|
||||
++i )
|
||||
{
|
||||
const SFVEC2I64 &a = scaledOutline[i];
|
||||
|
||||
//printf("%lu %lu\n", a.x, a.y);
|
||||
|
||||
polyline[i] = new p2t::Point( (double)a.x,
|
||||
(double)a.y );
|
||||
}
|
||||
|
||||
// Start creating the structured to be triangulated
|
||||
p2t::CDT* cdt = new p2t::CDT( polyline );
|
||||
|
||||
// Add holes for this outline
|
||||
unsigned int nHoles = aPolyList.HoleCount( idx );
|
||||
|
||||
std::vector< std::vector<p2t::Point*> > polylineHoles;
|
||||
|
||||
polylineHoles.resize( nHoles );
|
||||
|
||||
for( unsigned int idxHole = 0; idxHole < nHoles; ++idxHole )
|
||||
{
|
||||
const SHAPE_LINE_CHAIN &outlineHoles = aPolyList.CHole( idx,
|
||||
idxHole );
|
||||
|
||||
wxASSERT( outlineHoles.PointCount() >= 3 );
|
||||
|
||||
std::vector<SFVEC2I64> scaledHole;
|
||||
scaledHole.resize( outlineHoles.PointCount() );
|
||||
|
||||
// Apply a scale to the points
|
||||
for( unsigned int i = 0;
|
||||
i < (unsigned int)outlineHoles.PointCount();
|
||||
++i )
|
||||
{
|
||||
const VECTOR2I &h = outlineHoles.CPoint( i );
|
||||
#ifdef APPLY_EDGE_SHRINK
|
||||
scaledHole[i] = SFVEC2I64( (glm::int64)h.x * POLY_SCALE_FACT,
|
||||
(glm::int64)h.y * POLY_SCALE_FACT );
|
||||
#else
|
||||
scaledHole[i] = SFVEC2I64( (glm::int64)h.x,
|
||||
(glm::int64)h.y );
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef APPLY_EDGE_SHRINK
|
||||
// Apply a modification to the points
|
||||
EdgeShrink( scaledHole );
|
||||
#endif
|
||||
|
||||
// Resize and reserve space
|
||||
polylineHoles[idxHole].resize( outlineHoles.PointCount() );
|
||||
|
||||
for( unsigned int i = 0;
|
||||
i < (unsigned int)outlineHoles.PointCount();
|
||||
++i )
|
||||
{
|
||||
const SFVEC2I64 &h = scaledHole[i];
|
||||
|
||||
polylineHoles[idxHole][i] = new p2t::Point( h.x, h.y );
|
||||
}
|
||||
|
||||
cdt->AddHole( polylineHoles[idxHole] );
|
||||
}
|
||||
|
||||
// Triangulate
|
||||
cdt->Triangulate();
|
||||
|
||||
// Hint: if you find any crashes on the triangulation poly2tri library,
|
||||
// you can use the following site to debug the points and it will mark
|
||||
// the errors in the polygon:
|
||||
// http://r3mi.github.io/poly2tri.js/
|
||||
|
||||
|
||||
// Get and add triangles
|
||||
std::vector<p2t::Triangle*> triangles;
|
||||
triangles = cdt->GetTriangles();
|
||||
|
||||
#ifdef APPLY_EDGE_SHRINK
|
||||
const double conver_d = (double)aBiuTo3DunitsScale *
|
||||
POLY_SCALE_FACT_INVERSE;
|
||||
#else
|
||||
const double conver_d = (double)aBiuTo3DunitsScale;
|
||||
#endif
|
||||
for( unsigned int i = 0; i < triangles.size(); ++i )
|
||||
{
|
||||
p2t::Triangle& t = *triangles[i];
|
||||
|
||||
p2t::Point& a = *t.GetPoint( 0 );
|
||||
p2t::Point& b = *t.GetPoint( 1 );
|
||||
p2t::Point& c = *t.GetPoint( 2 );
|
||||
VECTOR2I a;
|
||||
VECTOR2I b;
|
||||
VECTOR2I c;
|
||||
triPoly->GetTriangle( i, a, b, c );
|
||||
|
||||
aDstContainer.Add( new CTRIANGLE2D( SFVEC2F( a.x * conver_d,
|
||||
-a.y * conver_d ),
|
||||
|
@ -302,15 +158,5 @@ void Convert_shape_line_polygon_to_triangles( const SHAPE_POLY_SET &aPolyList,
|
|||
aBoardItem ) );
|
||||
}
|
||||
|
||||
// Delete created data
|
||||
delete cdt;
|
||||
|
||||
// Free points
|
||||
FreeClear(polyline);
|
||||
|
||||
for( unsigned int idxHole = 0; idxHole < nHoles; ++idxHole )
|
||||
{
|
||||
FreeClear( polylineHoles[idxHole] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
void Convert_shape_line_polygon_to_triangles( const SHAPE_POLY_SET &aPolyList,
|
||||
void Convert_shape_line_polygon_to_triangles( SHAPE_POLY_SET &aPolyList,
|
||||
CGENERICCONTAINER2D &aDstContainer,
|
||||
float aBiuTo3DunitsScale,
|
||||
const BOARD_ITEM &aBoardItem );
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file edgeshrink.cpp
|
||||
* @brief The edgeShrink function was found in the project clip2tri by the:
|
||||
* Bitfighter project (http://bitfighter.org)
|
||||
* https://github.com/raptor/clip2tri
|
||||
* https://github.com/raptor/clip2tri/blob/f62a734d22733814b8a970ed8a68a4d94c24fa5f/clip2tri/clip2tri.cpp#L150
|
||||
*/
|
||||
|
||||
#include <plugins/3dapi/xv3d_types.h>
|
||||
#include <vector>
|
||||
|
||||
// clip2tri is Licenced under:
|
||||
|
||||
// The MIT License (MIT)
|
||||
|
||||
// Copyright (c) 2014 Bitfighter developers
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
|
||||
// Shrink large polygons by reducing each coordinate by 1 in the
|
||||
// general direction of the last point as we wind around
|
||||
//
|
||||
// This normally wouldn't work in every case, but our upscaled-by-1000 polygons
|
||||
// have little chance to create new duplicate points with this method.
|
||||
//
|
||||
// For information on why this was needed, see:
|
||||
//
|
||||
// https://github.com/greenm01/poly2tri/issues/90
|
||||
//
|
||||
|
||||
#define S_INC 1
|
||||
|
||||
void EdgeShrink( std::vector<SFVEC2I64> &aPath )
|
||||
{
|
||||
unsigned int prev = aPath.size() - 1;
|
||||
|
||||
for( unsigned int i = 0; i < aPath.size(); i++ )
|
||||
{
|
||||
// Adjust coordinate by 1 depending on the direction
|
||||
(aPath[i].x - aPath[prev].x) > 0 ? aPath[i].x -= S_INC :
|
||||
aPath[i].x += S_INC;
|
||||
|
||||
(aPath[i].y - aPath[prev].y) > 0 ? aPath[i].y -= S_INC :
|
||||
aPath[i].y += S_INC;
|
||||
|
||||
prev = i;
|
||||
}
|
||||
}
|
|
@ -271,7 +271,7 @@ SFVEC3F CBBOX::Offset( const SFVEC3F &p ) const
|
|||
// https://github.com/mmp/pbrt-v2/blob/master/src/core/geometry.cpp#L68
|
||||
// /////////////////////////////////////////////////////////////////////////
|
||||
#if 0
|
||||
bool CBBOX::Intersect( const RAY &aRay, float *aOutHitt0, float *aOutHitt1 )
|
||||
bool CBBOX::Intersect( const RAY &aRay, float *aOutHitt0, float *aOutHitt1 ) const
|
||||
{
|
||||
float t0 = 0.0f;
|
||||
float t1 = FLT_MAX;
|
||||
|
|
|
@ -31,6 +31,10 @@
|
|||
#include "buffers_debug.h"
|
||||
#include <string.h> // For memcpy
|
||||
|
||||
#include <atomic>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
#ifndef CLAMP
|
||||
#define CLAMP(n, min, max) {if( n < min ) n=min; else if( n > max ) n = max;}
|
||||
#endif
|
||||
|
@ -469,34 +473,51 @@ void CIMAGE::EfxFilter( CIMAGE *aInImg, E_FILTER aFilterType )
|
|||
aInImg->m_wraping = WRAP_CLAMP;
|
||||
m_wraping = WRAP_CLAMP;
|
||||
|
||||
#pragma omp parallel for
|
||||
for( int iy = 0; iy < (int)m_height; iy++)
|
||||
std::atomic<size_t> nextRow( 0 );
|
||||
std::atomic<size_t> threadsFinished( 0 );
|
||||
|
||||
size_t parallelThreadCount = std::max<size_t>( std::thread::hardware_concurrency(), 2 );
|
||||
|
||||
for( size_t ii = 0; ii < parallelThreadCount; ++ii )
|
||||
{
|
||||
for( int ix = 0; ix < (int)m_width; ix++ )
|
||||
std::thread t = std::thread( [&]()
|
||||
{
|
||||
int v = 0;
|
||||
|
||||
for( int sy = 0; sy < 5; sy++ )
|
||||
for( size_t iy = nextRow.fetch_add( 1 );
|
||||
iy < m_height;
|
||||
iy = nextRow.fetch_add( 1 ) )
|
||||
{
|
||||
for( int sx = 0; sx < 5; sx++ )
|
||||
for( size_t ix = 0; ix < m_width; ix++ )
|
||||
{
|
||||
int factor = filter.kernel[sx][sy];
|
||||
unsigned char pixelv = aInImg->Getpixel( ix + sx - 2,
|
||||
iy + sy - 2 );
|
||||
int v = 0;
|
||||
|
||||
v += pixelv * factor;
|
||||
for( size_t sy = 0; sy < 5; sy++ )
|
||||
{
|
||||
for( size_t sx = 0; sx < 5; sx++ )
|
||||
{
|
||||
int factor = filter.kernel[sx][sy];
|
||||
unsigned char pixelv = aInImg->Getpixel( ix + sx - 2,
|
||||
iy + sy - 2 );
|
||||
|
||||
v += pixelv * factor;
|
||||
}
|
||||
}
|
||||
|
||||
v /= filter.div;
|
||||
v += filter.offset;
|
||||
CLAMP(v, 0, 255);
|
||||
//TODO: This needs to write to a separate buffer
|
||||
m_pixels[ix + iy * m_width] = v;
|
||||
}
|
||||
}
|
||||
|
||||
v /= filter.div;
|
||||
threadsFinished++;
|
||||
} );
|
||||
|
||||
v += filter.offset;
|
||||
|
||||
CLAMP(v, 0, 255);
|
||||
|
||||
m_pixels[ix + iy * m_width] = v;
|
||||
}
|
||||
t.detach();
|
||||
}
|
||||
|
||||
while( threadsFinished < parallelThreadCount )
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jul 2 2017)
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_3D_view_option_base.h"
|
||||
|
@ -134,7 +134,7 @@ DIALOG_3D_VIEW_OPTIONS_BASE::DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWi
|
|||
bSizeLeft->Add( fgSizer3DVisibility, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerUpper->Add( bSizeLeft, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
bSizerUpper->Add( bSizeLeft, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticlineVertical = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
|
||||
bSizerUpper->Add( m_staticlineVertical, 0, wxEXPAND | wxALL, 5 );
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="13" />
|
||||
<FileVersion major="1" minor="14" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
|
@ -14,6 +14,7 @@
|
|||
<property name="file">dialog_3D_view_option_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_3D_view_option_base</property>
|
||||
<property name="namespace"></property>
|
||||
|
@ -54,13 +55,20 @@
|
|||
<property name="window_style"></property>
|
||||
<event name="OnActivate"></event>
|
||||
<event name="OnActivateApp"></event>
|
||||
<event name="OnAuiFindManager"></event>
|
||||
<event name="OnAuiPaneActivated"></event>
|
||||
<event name="OnAuiPaneButton"></event>
|
||||
<event name="OnAuiPaneClose"></event>
|
||||
<event name="OnAuiPaneMaximize"></event>
|
||||
<event name="OnAuiPaneRestore"></event>
|
||||
<event name="OnAuiRender"></event>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnClose"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -75,17 +83,23 @@
|
|||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMaximize"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnMove"></event>
|
||||
<event name="OnMoveEnd"></event>
|
||||
<event name="OnMoveStart"></event>
|
||||
<event name="OnMoving"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnShow"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
|
@ -104,7 +118,7 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -144,6 +158,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Render options:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -169,7 +184,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -276,7 +298,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -363,7 +392,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox">OnCheckRealisticMode</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -455,7 +491,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -542,7 +585,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -634,7 +684,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -721,7 +778,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -813,7 +877,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -900,7 +971,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -992,7 +1070,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1079,7 +1164,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -1168,6 +1260,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">3D model visibility:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -1193,7 +1286,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1300,7 +1400,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1387,7 +1494,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -1479,7 +1593,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1566,7 +1687,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -1658,7 +1786,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1745,7 +1880,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -1831,7 +1973,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1907,6 +2056,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Board layers:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -1932,7 +2082,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2039,7 +2196,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2126,7 +2290,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -2218,7 +2389,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2305,7 +2483,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -2397,7 +2582,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2484,7 +2676,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -2576,7 +2775,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2663,7 +2869,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -2734,6 +2947,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">User layers (not shown in realistic mode):</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -2759,7 +2973,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2866,7 +3087,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2953,7 +3181,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -3045,7 +3280,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -3132,7 +3374,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -3222,7 +3471,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jul 2 2017)
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_3D_VIEW_OPTION_BASE_H__
|
||||
|
@ -11,8 +11,6 @@
|
|||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
class DIALOG_SHIM;
|
||||
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
|
|
|
@ -40,11 +40,6 @@ set(3D-VIEWER_SRCS
|
|||
${DIR_DLG}/dlg_select_3dmodel.cpp
|
||||
${DIR_DLG}/panel_prev_3d_base.cpp
|
||||
${DIR_DLG}/panel_prev_model.cpp
|
||||
../polygon/poly2tri/common/shapes.cc
|
||||
../polygon/poly2tri/sweep/advancing_front.cc
|
||||
../polygon/poly2tri/sweep/cdt.cc
|
||||
../polygon/poly2tri/sweep/sweep.cc
|
||||
../polygon/poly2tri/sweep/sweep_context.cc
|
||||
3d_canvas/cinfo3d_visu.cpp
|
||||
3d_canvas/create_layer_items.cpp
|
||||
3d_canvas/create_3Dgraphic_brd_items.cpp
|
||||
|
@ -79,7 +74,6 @@ set(3D-VIEWER_SRCS
|
|||
${DIR_RAY_2D}/cring2d.cpp
|
||||
${DIR_RAY_2D}/croundsegment2d.cpp
|
||||
${DIR_RAY_2D}/ctriangle2d.cpp
|
||||
${DIR_RAY_2D}/edgeshrink.cpp
|
||||
${DIR_RAY_3D}/cbbox.cpp
|
||||
${DIR_RAY_3D}/cbbox_ray.cpp
|
||||
${DIR_RAY_3D}/ccylinder.cpp
|
||||
|
|
|
@ -1,81 +0,0 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @file openmp_mutex.h
|
||||
* @brief a mutex for openmp got from the website:
|
||||
* http://bisqwit.iki.fi/story/howto/openmp/
|
||||
* by Joel Yliluoma <bisqwit@iki.fi>
|
||||
*/
|
||||
|
||||
#ifndef _OPENMP_MUTEX_H
|
||||
#define _OPENMP_MUTEX_H
|
||||
|
||||
#ifdef _OPENMP
|
||||
|
||||
# include <omp.h>
|
||||
|
||||
struct MutexType
|
||||
{
|
||||
MutexType() { omp_init_lock( &lock ); }
|
||||
~MutexType() { omp_destroy_lock( &lock ); }
|
||||
void Lock() { omp_set_lock( &lock ); }
|
||||
void Unlock() { omp_unset_lock( &lock ); }
|
||||
|
||||
MutexType( const MutexType& ) { omp_init_lock( &lock ); }
|
||||
MutexType& operator= ( const MutexType& ) { return *this; }
|
||||
public:
|
||||
omp_lock_t lock;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
/// A dummy mutex that doesn't actually exclude anything,
|
||||
/// but as there is no parallelism either, no worries.
|
||||
struct MutexType
|
||||
{
|
||||
void Lock() {}
|
||||
void Unlock() {}
|
||||
};
|
||||
#endif
|
||||
|
||||
/// An exception-safe scoped lock-keeper.
|
||||
struct ScopedLock
|
||||
{
|
||||
explicit ScopedLock( MutexType& m ) : mut( m ), locked( true ) { mut.Lock(); }
|
||||
~ScopedLock() { Unlock(); }
|
||||
void Unlock() { if( !locked ) return; locked = false; mut.Unlock(); }
|
||||
void LockAgain() { if( locked ) return; mut.Lock(); locked = true; }
|
||||
|
||||
private:
|
||||
MutexType& mut;
|
||||
bool locked;
|
||||
|
||||
private: // prevent copying the scoped lock.
|
||||
void operator=(const ScopedLock&);
|
||||
ScopedLock(const ScopedLock&);
|
||||
};
|
||||
|
||||
#endif // _OPENMP_MUTEX_H
|
|
@ -30,8 +30,6 @@ if(POLICY CMP0025)
|
|||
cmake_policy(SET CMP0025 NEW) # CMake 3.0
|
||||
endif()
|
||||
|
||||
project( kicad )
|
||||
|
||||
# Default to CMAKE_BUILD_TYPE = Release unless overridden on command line
|
||||
# http://www.cmake.org/pipermail/cmake/2008-September/023808.html
|
||||
if( DEFINED CMAKE_BUILD_TYPE )
|
||||
|
@ -40,11 +38,20 @@ else()
|
|||
set( CMAKE_BUILD_TYPE Release CACHE STRING "Set to either \"Release\" or \"Debug\"" )
|
||||
endif()
|
||||
|
||||
project( kicad )
|
||||
|
||||
include( GNUInstallDirs )
|
||||
|
||||
# Path to local CMake modules.
|
||||
set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules )
|
||||
|
||||
# On Windows, binaries created by link option -g3 are very large (more than 1Gb for pcbnew,
|
||||
# and more than 3Gb for the full kicad suite)
|
||||
# This option create binaries using link option -g1 that create much smaller files, but
|
||||
# there are less info in debug (but the file names and line numbers are available)
|
||||
option( BUILD_SMALL_DEBUG_FILES "In debug build: create smaller binaries." OFF )
|
||||
|
||||
|
||||
#
|
||||
# KiCad build options should be added below.
|
||||
#
|
||||
|
@ -72,8 +79,8 @@ option( KICAD_SCRIPTING_WXPYTHON
|
|||
ON )
|
||||
|
||||
option( KICAD_SCRIPTING_ACTION_MENU
|
||||
"Build a tools menu with registred python plugins: actions plugins (default OFF)."
|
||||
)
|
||||
"Build a tools menu with registered python plugins: actions plugins (default ON)."
|
||||
ON )
|
||||
|
||||
option( KICAD_USE_OCE
|
||||
"Build tools and plugins related to OpenCascade Community Edition (default ON)"
|
||||
|
@ -267,6 +274,10 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
|||
set( TO_LINKER -XLinker )
|
||||
else()
|
||||
set( TO_LINKER -Wl )
|
||||
# Set 32-bit flag for GCC to prevent excess precision
|
||||
if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
|
||||
set( CMAKE_CXX_FLAGS "-ffloat-store ${CMAKE_CXX_FLAGS}" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Establish -Wall early, so specialized relaxations of this may come
|
||||
|
@ -274,8 +285,18 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
|||
set( CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}" )
|
||||
set( CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}" )
|
||||
|
||||
set( CMAKE_C_FLAGS_DEBUG "-g3 -ggdb3 -DDEBUG" )
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "-g3 -ggdb3 -DDEBUG -Wno-deprecated-declarations" )
|
||||
# Link flags in Debug: -g1 and -ggdb1 or -g1 and -ggdb3 can be used.
|
||||
# Level 1 produces minimal information, enough for making basic backtraces.
|
||||
# This includes descriptions of functions and external variables, and line number tables,
|
||||
# but no information about local variables.
|
||||
# Level 3 includes full information, but binaries are much larger.
|
||||
if( BUILD_SMALL_DEBUG_FILES )
|
||||
set( CMAKE_C_FLAGS_DEBUG "-g1 -ggdb1 -DDEBUG" )
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "-g1 -ggdb1 -DDEBUG -Wno-deprecated-declarations" )
|
||||
else()
|
||||
set( CMAKE_C_FLAGS_DEBUG "-g3 -ggdb3 -DDEBUG" )
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "-g3 -ggdb3 -DDEBUG -Wno-deprecated-declarations" )
|
||||
endif()
|
||||
|
||||
if( MINGW )
|
||||
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" )
|
||||
|
@ -526,24 +547,6 @@ include( ExternalProject )
|
|||
#================================================
|
||||
include( CheckFindPackageResult )
|
||||
|
||||
#
|
||||
# Find OpenMP support, optional
|
||||
#
|
||||
|
||||
find_package( OpenMP )
|
||||
|
||||
if( OPENMP_FOUND )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" )
|
||||
add_definitions( -DUSE_OPENMP )
|
||||
|
||||
# MinGW does not include the OpenMP link library and FindOpenMP.cmake does not
|
||||
# set it either. Not sure this is the most elegant solution but it works.
|
||||
if( MINGW )
|
||||
set( OPENMP_LIBRARIES gomp )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#
|
||||
# Find wxWidgets library, required
|
||||
#
|
||||
|
@ -579,7 +582,7 @@ endif()
|
|||
#
|
||||
# Find OpenGL library, required
|
||||
#
|
||||
set( OpenGL_GL_PREFERENCE "GLVND" ) # CMake 3.11+ setting; see 'cmake --help-policy CMP0072'
|
||||
set( OpenGL_GL_PREFERENCE "LEGACY" ) # CMake 3.11+ setting; see 'cmake --help-policy CMP0072'
|
||||
find_package( OpenGL REQUIRED )
|
||||
|
||||
#
|
||||
|
@ -912,6 +915,7 @@ if( UNIX AND NOT APPLE )
|
|||
endif()
|
||||
|
||||
#include( CTest )
|
||||
enable_testing()
|
||||
|
||||
if( UNIX AND NOT APPLE )
|
||||
|
||||
|
|
|
@ -12,6 +12,15 @@ find_library( NGSPICE_LIBRARY ngspice
|
|||
PATH_SUFFIXES src/.libs lib
|
||||
)
|
||||
|
||||
if( WIN32 AND MSYS )
|
||||
# NGSPICE_LIBRARY points to libngspice.dll.a on Windows,
|
||||
# but the goal is to find out the DLL name.
|
||||
find_library( NGSPICE_DLL NAMES libngspice-0.dll libngspice-1.dll )
|
||||
else()
|
||||
set( NGSPICE_DLL "${NGSPICE_LIBRARY}" )
|
||||
endif()
|
||||
|
||||
|
||||
include( FindPackageHandleStandardArgs )
|
||||
|
||||
if( ${NGSPICE_INCLUDE_DIR} STREQUAL "NGSPICE_INCLUDE_DIR-NOTFOUND" OR ${NGSPICE_LIBRARY} STREQUAL "NGSPICE_LIBRARY-NOTFOUND" )
|
||||
|
@ -28,12 +37,10 @@ if( ${NGSPICE_INCLUDE_DIR} STREQUAL "NGSPICE_INCLUDE_DIR-NOTFOUND" OR ${NGSPICE_
|
|||
endif()
|
||||
|
||||
find_package_handle_standard_args( ngspice
|
||||
REQUIRED_VARS
|
||||
NGSPICE_INCLUDE_DIR
|
||||
NGSPICE_LIBRARY
|
||||
)
|
||||
REQUIRED_VARS NGSPICE_INCLUDE_DIR NGSPICE_LIBRARY NGSPICE_DLL )
|
||||
|
||||
mark_as_advanced(
|
||||
NGSPICE_INCLUDE_DIR
|
||||
NGSPICE_LIBRARY
|
||||
NGSPICE_DLL
|
||||
)
|
||||
|
|
|
@ -35,4 +35,4 @@
|
|||
# be set after each version tag is added to the git repo. This will
|
||||
# give developers a reasonable idea where which branch was used to build
|
||||
# KiCad.
|
||||
set( KICAD_VERSION "5.0.0" )
|
||||
set( KICAD_VERSION "5.0.2-unknown" )
|
||||
|
|
|
@ -72,4 +72,7 @@
|
|||
#define KIFACE_SUFFIX "@KIFACE_SUFFIX@"
|
||||
#define KIFACE_PREFIX "@KIFACE_PREFIX@"
|
||||
|
||||
/// Allows scripts install directory to be referenced by the program code.
|
||||
#define PYTHON_DEST "@PYTHON_DEST@"
|
||||
|
||||
#endif // CONFIG_H_
|
||||
|
|
|
@ -0,0 +1,661 @@
|
|||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
@ -0,0 +1,13 @@
|
|||
The majority of KiCad's source code is developed and distributed under the terms
|
||||
of the GPLv3 or later. However, It does include some third-party code licensed
|
||||
under AGPLv3 or later.
|
||||
|
||||
Both licenses are compatible, but a combined works as is will be governed under
|
||||
the terms of the AGPLv3 (or later). This includes any binary distribution of the
|
||||
KiCad EDA suite by the KiCad project or any third party, e.g. Linux distributor.
|
||||
|
||||
You are free to use the *sources* under the terms of their respective licenses.
|
||||
|
||||
Licensed under AGPLv3 (or later):
|
||||
- TTL [https://www.sintef.no/projectweb/geometry-toolkits/ttl/], sources in include/ttl/*
|
||||
Licensed under GPLv3 (or later):
|
|
@ -32,6 +32,8 @@
|
|||
<true/>
|
||||
<key>LSRequiresCarbon</key>
|
||||
<true/>
|
||||
<key>NSRequiresAquaSystemAppearance</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -119,12 +119,12 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
|
|||
brightSizer->Add( sbSizerInfo, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_buttonLoad = new wxButton( m_panelRight, wxID_ANY, _("Load Bitmap"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
brightSizer->Add( m_buttonLoad, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
brightSizer->Add( m_buttonLoad, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_buttonExport = new wxButton( m_panelRight, wxID_ANY, _("Export"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_buttonExport->SetToolTip( _("Create a library file for Eeschema\nThis library contains only one component: logo") );
|
||||
|
||||
brightSizer->Add( m_buttonExport, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
brightSizer->Add( m_buttonExport, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
wxString m_radioBoxFormatChoices[] = { _("Eeschema (.lib file)"), _("Pcbnew (.kicad_mod file)"), _("Postscript (.ps file)"), _("Logo for title block (.kicad_wks file)") };
|
||||
int m_radioBoxFormatNChoices = sizeof( m_radioBoxFormatChoices ) / sizeof( wxString );
|
||||
|
@ -142,7 +142,7 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
|
|||
m_sliderThreshold = new wxSlider( sbSizer2->GetStaticBox(), wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
|
||||
m_sliderThreshold->SetToolTip( _("Adjust the level to convert the greyscale picture to a black and white picture.") );
|
||||
|
||||
sbSizer2->Add( m_sliderThreshold, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
sbSizer2->Add( m_sliderThreshold, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkNegative = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Negative"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizer2->Add( m_checkNegative, 0, wxBOTTOM|wxTOP, 10 );
|
||||
|
@ -153,7 +153,7 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
|
|||
wxString m_radio_PCBLayerChoices[] = { _("Front silk screen"), _("Front solder mask"), _("User layer Eco1"), _("User layer Eco2") };
|
||||
int m_radio_PCBLayerNChoices = sizeof( m_radio_PCBLayerChoices ) / sizeof( wxString );
|
||||
m_radio_PCBLayer = new wxRadioBox( m_panelRight, wxID_ANY, _("Board Layer for Outline:"), wxDefaultPosition, wxDefaultSize, m_radio_PCBLayerNChoices, m_radio_PCBLayerChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_radio_PCBLayer->SetSelection( 3 );
|
||||
m_radio_PCBLayer->SetSelection( 0 );
|
||||
m_radio_PCBLayer->SetToolTip( _("Choose the board layer to place the outline.\nThe 2 invisible fields reference and value are always placed on the silk screen layer.") );
|
||||
|
||||
brightSizer->Add( m_radio_PCBLayer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
|
|
@ -1813,7 +1813,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1901,7 +1901,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -2175,7 +2175,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxSlider" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -2421,7 +2421,7 @@
|
|||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">3</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxRA_SPECIFY_COLS</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
|
|
@ -305,8 +305,7 @@ set( BMAPS_MID
|
|||
label2glabel
|
||||
label2text
|
||||
label
|
||||
lang_catalan
|
||||
lang_chinese
|
||||
lang_ca
|
||||
lang_bg
|
||||
lang_cs
|
||||
lang_def
|
||||
|
@ -327,6 +326,7 @@ set( BMAPS_MID
|
|||
lang_sk
|
||||
lang_sl
|
||||
lang_lt
|
||||
lang_zh
|
||||
language
|
||||
layers_manager
|
||||
leave_sheet
|
||||
|
|
|
@ -25,6 +25,6 @@ static const unsigned char png[] = {
|
|||
0x2b, 0xeb, 0x17, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
|
||||
};
|
||||
|
||||
const BITMAP_OPAQUE lang_chinese_xpm[1] = {{ png, sizeof( png ), "lang_chinese_xpm" }};
|
||||
const BITMAP_OPAQUE lang_zh_xpm[1] = {{ png, sizeof( png ), "lang_zh_xpm" }};
|
||||
|
||||
//EOF
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
@ -13,7 +13,7 @@
|
|||
version="1.1"
|
||||
id="svg2"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="lang_chinese.svg">
|
||||
sodipodi:docname="lang_zh.svg">
|
||||
<metadata
|
||||
id="metadata21">
|
||||
<rdf:RDF>
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
@ -19,6 +19,7 @@ include_directories(
|
|||
${INC_AFTER}
|
||||
${OCE_INCLUDE_DIRS}
|
||||
${OCC_INCLUDE_DIR}
|
||||
${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2014-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014-2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -58,7 +58,27 @@ EDA_UNITS_T g_UserUnit;
|
|||
COLOR4D g_GhostColor;
|
||||
|
||||
|
||||
std::atomic<unsigned int> LOCALE_IO::m_c_count(0);
|
||||
#if defined( _WIN32 ) && defined( DEBUG )
|
||||
// a wxAssertHandler_t function to filter wxWidgets alert messages when reading/writing a file
|
||||
// when switching the locale to LC_NUMERIC, "C"
|
||||
// It is used in class LOCALE_IO to hide a useless (in kicad) wxWidgets alert message
|
||||
void KiAssertFilter( const wxString &file, int line,
|
||||
const wxString &func, const wxString &cond,
|
||||
const wxString &msg)
|
||||
{
|
||||
if( !msg.Contains( "Decimal separator mismatch" ) )
|
||||
wxTheApp->OnAssertFailure( file, line, func, cond, msg );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
std::atomic<unsigned int> LOCALE_IO::m_c_count( 0 );
|
||||
|
||||
|
||||
// Note on Windows, setlocale( LC_NUMERIC, "C" ) works fine to read/write
|
||||
// files with floating point numbers, but generates a overzealous wx alert
|
||||
// in some cases (reading a bitmap for instance)
|
||||
// So we disable alerts during the time a file is read or written
|
||||
|
||||
LOCALE_IO::LOCALE_IO()
|
||||
{
|
||||
|
@ -66,9 +86,13 @@ LOCALE_IO::LOCALE_IO()
|
|||
if( m_c_count++ == 0 )
|
||||
{
|
||||
// Store the user locale name, to restore this locale later, in dtor
|
||||
m_user_locale = setlocale( LC_ALL, 0 );
|
||||
m_user_locale = setlocale( LC_NUMERIC, nullptr );
|
||||
#if defined( _WIN32 ) && defined( DEBUG )
|
||||
// Disable wxWidgets alerts
|
||||
wxSetAssertHandler( KiAssertFilter );
|
||||
#endif
|
||||
// Switch the locale to C locale, to read/write files with fp numbers
|
||||
setlocale( LC_ALL, "C" );
|
||||
setlocale( LC_NUMERIC, "C" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +103,11 @@ LOCALE_IO::~LOCALE_IO()
|
|||
if( --m_c_count == 0 )
|
||||
{
|
||||
// revert to the user locale
|
||||
setlocale( LC_ALL, m_user_locale.c_str() );
|
||||
setlocale( LC_NUMERIC, m_user_locale.c_str() );
|
||||
#if defined( _WIN32 ) && defined( DEBUG )
|
||||
// Enaable wxWidgets alerts
|
||||
wxSetDefaultAssertHandler();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -72,13 +72,17 @@ void KIDIALOG::ForceShowAgain()
|
|||
|
||||
bool KIDIALOG::Show( bool aShow )
|
||||
{
|
||||
// Check if this dialog should be shown to the user
|
||||
auto it = doNotShowAgainDlgs.find( m_hash );
|
||||
// We should check the do-not-show-again setting only when the dialog is displayed
|
||||
if( aShow )
|
||||
{
|
||||
// Check if this dialog should be shown to the user
|
||||
auto it = doNotShowAgainDlgs.find( m_hash );
|
||||
|
||||
if( it != doNotShowAgainDlgs.end() )
|
||||
return it->second;
|
||||
if( it != doNotShowAgainDlgs.end() )
|
||||
return it->second;
|
||||
}
|
||||
|
||||
bool ret = wxRichMessageDialog::Show();
|
||||
bool ret = wxRichMessageDialog::Show( aShow );
|
||||
|
||||
// Has the user asked not to show the dialog again
|
||||
if( IsCheckBoxChecked() )
|
||||
|
@ -233,7 +237,7 @@ void DisplayInfoMessage( wxWindow* aParent, const wxString& aMessage, const wxSt
|
|||
bool IsOK( wxWindow* aParent, const wxString& aMessage )
|
||||
{
|
||||
wxMessageDialog dlg( aParent, aMessage, _( "Confirmation" ),
|
||||
wxYES_NO | wxCENTRE | wxICON_QUESTION );
|
||||
wxYES_NO | wxCENTRE | wxICON_QUESTION | wxSTAY_ON_TOP );
|
||||
|
||||
return dlg.ShowModal() == wxID_YES;
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
|||
<< HtmlNewline( 4 )
|
||||
<< _( "The complete KiCad EDA Suite is released under the" ) << HtmlNewline( 2 )
|
||||
<< HtmlHyperlink( "http://www.gnu.org/licenses",
|
||||
_( "GNU General Public License (GPL) version 3 or any later version" ) )
|
||||
_( "GNU Affero General Public License (AGPL) version 3 or any later version" ) )
|
||||
<< "</div>";
|
||||
|
||||
aInfo.SetLicense( license );
|
||||
|
@ -369,6 +369,11 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
|||
wxEmptyString,
|
||||
"Bulgarian (BG)",
|
||||
aInfo.CreateKiBitmap( lang_bg_xpm ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Liu Guang",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)",
|
||||
aInfo.CreateKiBitmap( lang_zh_xpm ) ) );
|
||||
|
||||
// Maintainer who helper in translations, but not in a specific translation
|
||||
#define OTHERS_IN_TRANSLATION _( "Others" )
|
||||
|
|
|
@ -255,13 +255,18 @@ static void fixOSXCancelButtonIssue( wxWindow *aWindow )
|
|||
// copying the text if a button with wxID_CANCEL is used in a
|
||||
// wxStdDialogButtonSizer created by wxFormBuilder: the label is &Cancel, and
|
||||
// this accelerator key has priority over the standard copy accelerator.
|
||||
// Note: problem also exists in other languages; for instance cmd+a closes
|
||||
// dialogs in German because the button is &Abbrechen.
|
||||
wxButton* button = dynamic_cast<wxButton*>( wxWindow::FindWindowById( wxID_CANCEL, aWindow ) );
|
||||
|
||||
if( button )
|
||||
{
|
||||
static const wxString placeholder = wxT( "{amp}" );
|
||||
|
||||
wxString buttonLabel = button->GetLabel();
|
||||
buttonLabel.Replace( wxT( "&C" ), wxT( "C" ) );
|
||||
buttonLabel.Replace( wxT( "&c" ), wxT( "c" ) );
|
||||
buttonLabel.Replace( wxT( "&&" ), placeholder );
|
||||
buttonLabel.Replace( wxT( "&" ), wxEmptyString );
|
||||
buttonLabel.Replace( placeholder, wxT( "&" ) );
|
||||
button->SetLabel( buttonLabel );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ bool DIALOG_ENV_VAR_CONFIG::GetPathAtIndex( unsigned int aIndex, wxString& aEnvV
|
|||
|
||||
void DIALOG_ENV_VAR_CONFIG::OnAddButton( wxCommandEvent& event )
|
||||
{
|
||||
DIALOG_ENV_VAR_SINGLE dlg( nullptr, wxEmptyString, wxEmptyString );
|
||||
DIALOG_ENV_VAR_SINGLE dlg( this, wxEmptyString, wxEmptyString );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
{
|
||||
|
@ -230,7 +230,7 @@ void DIALOG_ENV_VAR_CONFIG::EditSelectedEntry()
|
|||
|
||||
if( GetPathAtIndex( m_pathIndex, envName, envPath ) )
|
||||
{
|
||||
auto dlg = new DIALOG_ENV_VAR_SINGLE( nullptr, envName, envPath );
|
||||
auto dlg = new DIALOG_ENV_VAR_SINGLE( this, envName, envPath );
|
||||
|
||||
if( IsEnvVarImmutable( envName ) )
|
||||
{
|
||||
|
@ -432,7 +432,7 @@ void DIALOG_ENV_VAR_SINGLE::OnSelectPath( wxCommandEvent& event )
|
|||
wxString title = _( "Select Path for Environment Variable" );
|
||||
wxString path; // Currently the first opened path is not initialized
|
||||
|
||||
wxDirDialog dlg( nullptr, title, path, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
|
||||
wxDirDialog dlg( this, title, path, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
m_envVarPath->SetValue( dlg.GetPath() );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Nov 22 2017)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -43,15 +43,14 @@ HOTKEYS_EDITOR_DIALOG_BASE::HOTKEYS_EDITOR_DIALOG_BASE( wxWindow* parent, wxWind
|
|||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||
m_sdbSizer->Realize();
|
||||
|
||||
b_buttonsSizer->Add( m_sdbSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
b_buttonsSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_mainSizer->Add( b_buttonsSizer, 0, wxALIGN_RIGHT|wxEXPAND, 5 );
|
||||
m_mainSizer->Add( b_buttonsSizer, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( m_mainSizer );
|
||||
this->Layout();
|
||||
m_mainSizer->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
m_resetButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HOTKEYS_EDITOR_DIALOG_BASE::ResetClicked ), NULL, this );
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<property name="file">dialog_hotkeys_editor_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_hotkeys_editor_base</property>
|
||||
<property name="namespace"></property>
|
||||
|
@ -44,7 +45,7 @@
|
|||
<property name="minimum_size"></property>
|
||||
<property name="name">HOTKEYS_EDITOR_DIALOG_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="size">513,445</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||
<property name="title">Hotkeys Editor</property>
|
||||
|
@ -88,7 +89,7 @@
|
|||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_mainSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
|
@ -256,11 +257,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_RIGHT|wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">b_buttonsSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
|
@ -453,7 +454,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="0">
|
||||
<property name="Apply">0</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Nov 22 2017)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -50,7 +50,7 @@ class HOTKEYS_EDITOR_DIALOG_BASE : public DIALOG_SHIM
|
|||
|
||||
public:
|
||||
|
||||
HOTKEYS_EDITOR_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Hotkeys Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
HOTKEYS_EDITOR_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Hotkeys Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 513,445 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~HOTKEYS_EDITOR_DIALOG_BASE();
|
||||
|
||||
};
|
||||
|
|
|
@ -1395,6 +1395,7 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
|
|||
wxLogTrace( kicadTraceKeyEvent, "EDA_DRAW_PANEL::OnKeyEvent %s", dump( event ) );
|
||||
|
||||
localkey = event.GetKeyCode();
|
||||
bool keyWasHandled = false;
|
||||
|
||||
switch( localkey )
|
||||
{
|
||||
|
@ -1408,6 +1409,8 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
|
|||
EndMouseCapture();
|
||||
else
|
||||
EndMouseCapture( ID_NO_TOOL_SELECTED, m_defaultCursor, wxEmptyString );
|
||||
|
||||
keyWasHandled = true; // The key is captured: the key event must not be skipped
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1446,8 +1449,8 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
|
|||
|
||||
GetParent()->SetMousePosition( pos );
|
||||
|
||||
if( !GetParent()->GeneralControl( &DC, pos, localkey ) )
|
||||
event.Skip();
|
||||
if( !GetParent()->GeneralControl( &DC, pos, localkey ) && !keyWasHandled )
|
||||
event.Skip(); // Skip this event only when the key was not handled
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -147,6 +147,12 @@ void EDA_DRAW_PANEL_GAL::SetFocus()
|
|||
|
||||
void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) )
|
||||
{
|
||||
m_viewControls->UpdateScrollbars();
|
||||
|
||||
// Drawing to a zero-width or zero-height GAL is fraught with peril.
|
||||
if( GetClientRect().IsEmpty() )
|
||||
return;
|
||||
|
||||
m_pendingRefresh = false;
|
||||
|
||||
if( m_drawing )
|
||||
|
@ -161,8 +167,6 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) )
|
|||
m_drawing = true;
|
||||
KIGFX::RENDER_SETTINGS* settings = static_cast<KIGFX::RENDER_SETTINGS*>( m_painter->GetSettings() );
|
||||
|
||||
m_viewControls->UpdateScrollbars();
|
||||
|
||||
try
|
||||
{
|
||||
m_view->UpdateItems();
|
||||
|
|
|
@ -56,17 +56,16 @@ FOOTPRINT_INFO* FOOTPRINT_LIST::GetModuleInfo( const wxString& aFootprintName )
|
|||
if( aFootprintName.IsEmpty() )
|
||||
return NULL;
|
||||
|
||||
LIB_ID fpid;
|
||||
|
||||
wxCHECK_MSG( fpid.Parse( aFootprintName, LIB_ID::ID_PCB ) < 0, NULL,
|
||||
wxString::Format( wxT( "\"%s\" is not a valid LIB_ID." ), aFootprintName ) );
|
||||
|
||||
wxString libNickname = fpid.GetLibNickname();
|
||||
wxString footprintName = fpid.GetLibItemName();
|
||||
|
||||
for( auto& fp : m_list )
|
||||
{
|
||||
LIB_ID fpid;
|
||||
|
||||
wxCHECK_MSG( fpid.Parse( aFootprintName ) < 0, NULL,
|
||||
wxString::Format(
|
||||
wxT( "\"%s\" is not a valid LIB_ID." ), GetChars( aFootprintName ) ) );
|
||||
|
||||
wxString libNickname = fpid.GetLibNickname();
|
||||
wxString footprintName = fpid.GetLibItemName();
|
||||
|
||||
if( libNickname == fp->GetNickname() && footprintName == fp->GetFootprintName() )
|
||||
return &*fp;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <gal/cairo/cairo_compositor.h>
|
||||
#include <gal/definitions.h>
|
||||
#include <geometry/shape_poly_set.h>
|
||||
#include <bitmap_base.h>
|
||||
|
||||
#include <limits>
|
||||
|
||||
|
@ -347,6 +348,61 @@ void CAIRO_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aControl
|
|||
}
|
||||
|
||||
|
||||
void CAIRO_GAL::DrawBitmap( const BITMAP_BASE& aBitmap )
|
||||
{
|
||||
int ppi = aBitmap.GetPPI();
|
||||
double worldIU_per_mm = 1/(worldUnitLength/2.54)/1000;
|
||||
double pix_size_iu = worldIU_per_mm * ( 25.4 / ppi );
|
||||
int w = aBitmap.GetSizePixels().x;
|
||||
int h = aBitmap.GetSizePixels().y;
|
||||
|
||||
cairo_save( currentContext );
|
||||
|
||||
// Set the pixel scaling factor:
|
||||
cairo_scale( currentContext, pix_size_iu, pix_size_iu );
|
||||
// The position of the bitmap is the bitmap center.
|
||||
// move the draw origin to the top left bitmap corner:
|
||||
cairo_translate( currentContext, -w/2, -h/2 );
|
||||
|
||||
cairo_new_path( currentContext );
|
||||
cairo_surface_t *image;
|
||||
image = cairo_image_surface_create( CAIRO_FORMAT_RGB24, w, h );
|
||||
cairo_surface_flush( image );
|
||||
|
||||
unsigned char* pix_buffer = cairo_image_surface_get_data( image );
|
||||
// The pixel buffer of the initial bitmap:
|
||||
auto bm_pix_buffer = (( BITMAP_BASE&)aBitmap).GetImageData();
|
||||
|
||||
// Copy the source bitmap to the cairo bitmap buffer.
|
||||
// In cairo bitmap buffer, a RGB24 bitmap is a RGB pixel packed into a uint_32
|
||||
// 24 low bits only are used.
|
||||
for( int row = 0; row < h; row++ )
|
||||
{
|
||||
for( int col = 0; col < w; col++ )
|
||||
{
|
||||
// Build the RGB24 pixel:
|
||||
uint32_t pixel = bm_pix_buffer->GetRed( col, row ) << 16;
|
||||
pixel += bm_pix_buffer->GetGreen( col, row ) << 8;
|
||||
pixel += bm_pix_buffer->GetBlue( col, row );
|
||||
|
||||
// Write the pixel to the cairo image buffer:
|
||||
uint32_t* pix_ptr = (uint32_t*) pix_buffer;
|
||||
*pix_ptr = pixel;
|
||||
pix_buffer += 4;
|
||||
}
|
||||
}
|
||||
|
||||
cairo_surface_mark_dirty( image );
|
||||
cairo_set_source_surface( currentContext, image, 0, 0 );
|
||||
cairo_paint( currentContext );
|
||||
cairo_surface_destroy( image );
|
||||
|
||||
isElementAdded = true;
|
||||
|
||||
cairo_restore( currentContext );
|
||||
}
|
||||
|
||||
|
||||
void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight )
|
||||
{
|
||||
screenSize = VECTOR2I( aWidth, aHeight );
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <gl_context_mgr.h>
|
||||
#include <geometry/shape_poly_set.h>
|
||||
#include <text_utils.h>
|
||||
#include <bitmap_base.h>
|
||||
|
||||
#include <macros.h>
|
||||
|
||||
|
@ -63,6 +64,101 @@ GLuint OPENGL_GAL::fontTexture = 0;
|
|||
bool OPENGL_GAL::isBitmapFontLoaded = false;
|
||||
SHADER* OPENGL_GAL::shader = NULL;
|
||||
|
||||
namespace KIGFX {
|
||||
class GL_BITMAP_CACHE
|
||||
{
|
||||
public:
|
||||
GL_BITMAP_CACHE()
|
||||
{
|
||||
}
|
||||
|
||||
~GL_BITMAP_CACHE();
|
||||
|
||||
GLuint RequestBitmap( const BITMAP_BASE* aBitmap );
|
||||
|
||||
private:
|
||||
|
||||
struct CACHED_BITMAP
|
||||
{
|
||||
GLuint id;
|
||||
int w, h;
|
||||
};
|
||||
|
||||
GLuint cacheBitmap( const BITMAP_BASE* aBitmap );
|
||||
|
||||
std::map<const BITMAP_BASE*, CACHED_BITMAP> m_bitmaps;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
GL_BITMAP_CACHE::~GL_BITMAP_CACHE()
|
||||
{
|
||||
for ( auto b = m_bitmaps.begin(); b != m_bitmaps.end(); ++b )
|
||||
{
|
||||
glDeleteTextures( 1, &b->second.id );
|
||||
}
|
||||
}
|
||||
|
||||
GLuint GL_BITMAP_CACHE::RequestBitmap( const BITMAP_BASE* aBitmap )
|
||||
{
|
||||
auto it = m_bitmaps.find( aBitmap) ;
|
||||
|
||||
if ( it != m_bitmaps.end() )
|
||||
{
|
||||
return it->second.id;
|
||||
}
|
||||
else
|
||||
{
|
||||
return cacheBitmap( aBitmap );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GLuint GL_BITMAP_CACHE::cacheBitmap( const BITMAP_BASE* aBitmap )
|
||||
{
|
||||
CACHED_BITMAP bmp;
|
||||
|
||||
bmp.w = aBitmap->GetSizePixels().x;
|
||||
bmp.h = aBitmap->GetSizePixels().y;
|
||||
|
||||
// There are draw issues (incorrect rendering) with some w values.
|
||||
// It happens when the w value is not a multiple of 4
|
||||
// so we use only a sub image with a modified width
|
||||
bmp.w -= bmp.w % 4;
|
||||
|
||||
GLuint textureID;
|
||||
glGenTextures(1, &textureID);
|
||||
|
||||
uint8_t *buf = new uint8_t [ bmp.w * bmp.h * 3];
|
||||
auto imgData = const_cast<BITMAP_BASE*>( aBitmap )->GetImageData();
|
||||
|
||||
for( int y = 0; y < bmp.h; y++ )
|
||||
{
|
||||
for( int x = 0; x < bmp.w; x++ )
|
||||
{
|
||||
uint8_t *p = buf + ( bmp.w * y + x ) * 3;
|
||||
|
||||
p[0] = imgData->GetRed( x, y );
|
||||
p[1] = imgData->GetGreen( x, y );
|
||||
p[2] = imgData->GetBlue( x, y );
|
||||
}
|
||||
}
|
||||
|
||||
glBindTexture( GL_TEXTURE_2D, textureID );
|
||||
|
||||
glTexImage2D( GL_TEXTURE_2D, 0,GL_RGB, bmp.w, bmp.h, 0, GL_RGB, GL_UNSIGNED_BYTE, buf );
|
||||
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
|
||||
|
||||
delete [] buf;
|
||||
|
||||
bmp.id = textureID;
|
||||
|
||||
m_bitmaps[ aBitmap ] = bmp;
|
||||
|
||||
return textureID;
|
||||
}
|
||||
|
||||
OPENGL_GAL::OPENGL_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
|
||||
wxEvtHandler* aMouseListener, wxEvtHandler* aPaintListener,
|
||||
|
@ -102,6 +198,8 @@ OPENGL_GAL::OPENGL_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
|
|||
|
||||
++instanceCounter;
|
||||
|
||||
bitmapCache.reset( new GL_BITMAP_CACHE );
|
||||
|
||||
compositor = new OPENGL_COMPOSITOR;
|
||||
compositor->SetAntialiasingMode( options.gl_antialiasing_mode );
|
||||
|
||||
|
@ -222,7 +320,7 @@ bool OPENGL_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
|
|||
|
||||
void OPENGL_GAL::BeginDrawing()
|
||||
{
|
||||
if( !IsShownOnScreen() )
|
||||
if( !IsShownOnScreen() || GetClientRect().IsEmpty() )
|
||||
return;
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
|
@ -393,7 +491,7 @@ void OPENGL_GAL::EndDrawing()
|
|||
|
||||
void OPENGL_GAL::BeginUpdate()
|
||||
{
|
||||
if( !IsShownOnScreen() )
|
||||
if( !IsShownOnScreen() || GetClientRect().IsEmpty() )
|
||||
return;
|
||||
|
||||
if( !isInitialized )
|
||||
|
@ -809,10 +907,10 @@ void OPENGL_GAL::drawTriangulatedPolyset( const SHAPE_POLY_SET& aPolySet )
|
|||
{
|
||||
auto triPoly = aPolySet.TriangulatedPolygon( j );
|
||||
|
||||
for( int i = 0; i < triPoly->GetTriangleCount(); i++ )
|
||||
for( size_t i = 0; i < triPoly->GetTriangleCount(); i++ )
|
||||
{
|
||||
VECTOR2I a, b, c;
|
||||
triPoly->GetTriangle( i ,a,b,c);
|
||||
triPoly->GetTriangle( i, a, b, c );
|
||||
currentManager->Vertex( a.x, a.y, layerDepth );
|
||||
currentManager->Vertex( b.x, b.y, layerDepth );
|
||||
currentManager->Vertex( c.x, c.y, layerDepth );
|
||||
|
@ -899,6 +997,55 @@ void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aContro
|
|||
}
|
||||
|
||||
|
||||
void OPENGL_GAL::DrawBitmap( const BITMAP_BASE& aBitmap )
|
||||
{
|
||||
int ppi = aBitmap.GetPPI();
|
||||
double worldIU_per_mm = 1.0 / ( worldUnitLength / 2.54 )/ 1000;
|
||||
double pix_size_iu = worldIU_per_mm * ( 25.4 / ppi );
|
||||
|
||||
double w = aBitmap.GetSizePixels().x * pix_size_iu;
|
||||
double h = aBitmap.GetSizePixels().y * pix_size_iu;
|
||||
|
||||
auto xform = currentManager->GetTransformation();
|
||||
|
||||
glm::vec4 v0 = xform * glm::vec4( -w/2, -h/2, 0.0, 0.0 );
|
||||
glm::vec4 v1 = xform * glm::vec4( w/2, h/2, 0.0, 0.0 );
|
||||
glm::vec4 trans = xform[3];
|
||||
|
||||
auto id = bitmapCache->RequestBitmap( &aBitmap );
|
||||
|
||||
auto oldTarget = GetTarget();
|
||||
|
||||
glPushMatrix();
|
||||
glTranslated( trans.x, trans.y, trans.z );
|
||||
|
||||
SetTarget( TARGET_NONCACHED );
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glActiveTexture( GL_TEXTURE0 );
|
||||
glBindTexture( GL_TEXTURE_2D, id );
|
||||
|
||||
glBegin( GL_QUADS );
|
||||
glColor4f(1.0, 1.0, 1.0, 1.0);
|
||||
glTexCoord2f(0.0, 0.0);
|
||||
glVertex3f( v0.x, v0.y, layerDepth );
|
||||
glColor4f(1.0, 1.0, 1.0, 1.0);
|
||||
glTexCoord2f(1.0, 0.0);
|
||||
glVertex3f( v1.x, v0.y, layerDepth );
|
||||
glColor4f(1.0, 1.0, 1.0, 1.0);
|
||||
glTexCoord2f(1.0, 1.0);
|
||||
glVertex3f( v1.x, v1.y, layerDepth );
|
||||
glColor4f(1.0, 1.0, 1.0, 1.0);
|
||||
glTexCoord2f(0.0, 1.0);
|
||||
glVertex3f( v0.x, v1.y, layerDepth );
|
||||
glEnd();
|
||||
|
||||
SetTarget( oldTarget );
|
||||
glBindTexture( GL_TEXTURE_2D, 0 );
|
||||
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
void OPENGL_GAL::BitmapText( const wxString& aText, const VECTOR2D& aPosition,
|
||||
double aRotationAngle )
|
||||
{
|
||||
|
@ -1288,19 +1435,22 @@ void OPENGL_GAL::EndGroup()
|
|||
|
||||
void OPENGL_GAL::DrawGroup( int aGroupNumber )
|
||||
{
|
||||
cachedManager->DrawItem( *groups[aGroupNumber] );
|
||||
if( groups[aGroupNumber] )
|
||||
cachedManager->DrawItem( *groups[aGroupNumber] );
|
||||
}
|
||||
|
||||
|
||||
void OPENGL_GAL::ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor )
|
||||
{
|
||||
cachedManager->ChangeItemColor( *groups[aGroupNumber], aNewColor );
|
||||
if( groups[aGroupNumber] )
|
||||
cachedManager->ChangeItemColor( *groups[aGroupNumber], aNewColor );
|
||||
}
|
||||
|
||||
|
||||
void OPENGL_GAL::ChangeGroupDepth( int aGroupNumber, int aDepth )
|
||||
{
|
||||
cachedManager->ChangeItemDepth( *groups[aGroupNumber], aDepth );
|
||||
if( groups[aGroupNumber] )
|
||||
cachedManager->ChangeItemDepth( *groups[aGroupNumber], aDepth );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1313,6 +1463,8 @@ void OPENGL_GAL::DeleteGroup( int aGroupNumber )
|
|||
|
||||
void OPENGL_GAL::ClearCache()
|
||||
{
|
||||
bitmapCache.reset( new GL_BITMAP_CACHE );
|
||||
|
||||
groups.clear();
|
||||
|
||||
if( isInitialized )
|
||||
|
@ -1614,9 +1766,11 @@ int OPENGL_GAL::drawBitmapChar( unsigned long aChar )
|
|||
}
|
||||
|
||||
const FONT_GLYPH_TYPE* glyph = LookupGlyph( aChar );
|
||||
wxASSERT( glyph );
|
||||
|
||||
if( !glyph )
|
||||
if( !glyph ) // Replace any non existing char shape by '?'
|
||||
glyph = LookupGlyph( '?' );
|
||||
|
||||
if( !glyph ) // Should not occur
|
||||
return 0;
|
||||
|
||||
const float X = glyph->atlas_x + font_information.smooth_pixels;
|
||||
|
@ -1707,9 +1861,12 @@ std::pair<VECTOR2D, float> OPENGL_GAL::computeBitmapTextSize( const UTF8& aText
|
|||
unsigned int c = *chIt;
|
||||
|
||||
const FONT_GLYPH_TYPE* glyph = LookupGlyph( c );
|
||||
wxASSERT( c == ' ' || glyph ); // space is not in the atlas
|
||||
// Debug: show not coded char in the atlas
|
||||
// Be carefull before allowing the assert: it usually crash kicad
|
||||
// when the assert is made during a paint event.
|
||||
//wxASSERT( c == ' ' || glyph ); // space is not in the atlas, so not found
|
||||
|
||||
// a few chars
|
||||
// a few chars are strange in font
|
||||
if( !glyph || // Not coded in font
|
||||
c == '-' || c == '_' ) // Strange size of these 2 chars
|
||||
{
|
||||
|
|
|
@ -32,6 +32,80 @@
|
|||
#include <gbr_metadata.h>
|
||||
|
||||
|
||||
wxString GbrMakeProjectGUIDfromString( wxString& aText )
|
||||
{
|
||||
/* Gerber GUID format should be RFC4122 Version 1 or 4.
|
||||
* See en.wikipedia.org/wiki/Universally_unique_identifier
|
||||
* The format is:
|
||||
* xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
|
||||
* with
|
||||
* x = hexDigit lower/upper case
|
||||
* and
|
||||
* M = '1' or '4' (UUID version: 1 (basic) or 4 (random)) (we use 4: UUID random)
|
||||
* and
|
||||
* N = '8' or '9' or 'A|a' or 'B|b' : UUID variant 1: 2 MSB bits have meaning) (we use N = 9)
|
||||
* N = 1000 or 1001 or 1010 or 1011 : 10xx means Variant 1 (Variant2: 110x and 111x are reserved)
|
||||
*/
|
||||
|
||||
wxString guid;
|
||||
|
||||
// Build a 32 digits GUID from the board name:
|
||||
// guid has 32 digits, so add chars in name to be sure we can build a 32 digits guid
|
||||
// (i.e. from a 16 char string name)
|
||||
// In fact only 30 digits are used, and 2 UID id
|
||||
wxString bname = aText;
|
||||
int cnt = 16 - bname.Len();
|
||||
|
||||
if( cnt > 0 )
|
||||
bname.Append( 'X', cnt );
|
||||
|
||||
int chr_idx = 0;
|
||||
|
||||
// Output the 8 first hex digits:
|
||||
for( unsigned ii = 0; ii < 4; ii++ )
|
||||
{
|
||||
int cc = int( bname[chr_idx++] ) & 0xFF;
|
||||
guid << wxString::Format( "%2.2x", cc );
|
||||
}
|
||||
|
||||
// Output the 4 next hex digits:
|
||||
guid << '-';
|
||||
|
||||
for( unsigned ii = 0; ii < 2; ii++ )
|
||||
{
|
||||
int cc = int( bname[chr_idx++] ) & 0xFF;
|
||||
guid << wxString::Format( "%2.2x", cc );
|
||||
}
|
||||
|
||||
// Output the 4 next hex digits (UUID version and 3 digits):
|
||||
guid << "-4"; // first digit: UUID version 4 (M = 4)
|
||||
{
|
||||
int cc = int( bname[chr_idx++] ) << 4 & 0xFF0;
|
||||
cc += int( bname[chr_idx] ) >> 4 & 0x0F;
|
||||
guid << wxString::Format( "%3.3x", cc );
|
||||
}
|
||||
|
||||
// Output the 4 next hex digits (UUID variant and 3 digits):
|
||||
guid << "-9"; // first digit: UUID variant 1 (N = 9)
|
||||
{
|
||||
int cc = (int( bname[chr_idx++] ) & 0x0F) << 8;
|
||||
cc += int( bname[chr_idx++] ) & 0xFF;
|
||||
guid << wxString::Format( "%3.3x", cc );
|
||||
}
|
||||
|
||||
// Output the 12 last hex digits:
|
||||
guid << '-';
|
||||
|
||||
for( unsigned ii = 0; ii < 6; ii++ )
|
||||
{
|
||||
int cc = int( bname[chr_idx++] ) & 0xFF;
|
||||
guid << wxString::Format( "%2.2x", cc );
|
||||
}
|
||||
|
||||
return guid;
|
||||
}
|
||||
|
||||
|
||||
std::string GBR_APERTURE_METADATA::FormatAttribute( GBR_APERTURE_ATTRIB aAttribute,
|
||||
bool aUseX1StructuredComment )
|
||||
{
|
||||
|
|
|
@ -27,6 +27,25 @@
|
|||
#include <common.h>
|
||||
#include <geometry/shape_line_chain.h>
|
||||
#include <geometry/shape_circle.h>
|
||||
#include "clipper.hpp"
|
||||
|
||||
|
||||
ClipperLib::Path SHAPE_LINE_CHAIN::convertToClipper( bool aRequiredOrientation ) const
|
||||
{
|
||||
ClipperLib::Path c_path;
|
||||
|
||||
for( int i = 0; i < PointCount(); i++ )
|
||||
{
|
||||
const VECTOR2I& vertex = CPoint( i );
|
||||
c_path.push_back( ClipperLib::IntPoint( vertex.x, vertex.y ) );
|
||||
}
|
||||
|
||||
if( Orientation( c_path ) != aRequiredOrientation )
|
||||
ReversePath( c_path );
|
||||
|
||||
return c_path;
|
||||
}
|
||||
|
||||
|
||||
bool SHAPE_LINE_CHAIN::Collide( const VECTOR2I& aP, int aClearance ) const
|
||||
{
|
||||
|
|
|
@ -42,8 +42,7 @@
|
|||
#include <geometry/shape.h>
|
||||
#include <geometry/shape_line_chain.h>
|
||||
#include <geometry/shape_poly_set.h>
|
||||
|
||||
#include "poly2tri/poly2tri.h"
|
||||
#include <geometry/polygon_triangulation.h>
|
||||
|
||||
using namespace ClipperLib;
|
||||
|
||||
|
@ -53,9 +52,18 @@ SHAPE_POLY_SET::SHAPE_POLY_SET() :
|
|||
}
|
||||
|
||||
|
||||
SHAPE_POLY_SET::SHAPE_POLY_SET( const SHAPE_POLY_SET& aOther ) :
|
||||
SHAPE_POLY_SET::SHAPE_POLY_SET( const SHAPE_POLY_SET& aOther, bool aDeepCopy ) :
|
||||
SHAPE( SH_POLY_SET ), m_polys( aOther.m_polys )
|
||||
{
|
||||
if( aOther.IsTriangulationUpToDate() )
|
||||
{
|
||||
for( unsigned i = 0; i < aOther.TriangulatedPolyCount(); i++ )
|
||||
m_triangulatedPolys.push_back(
|
||||
std::make_unique<TRIANGULATED_POLYGON>( *aOther.TriangulatedPolygon( i ) ) );
|
||||
|
||||
m_hash = aOther.GetHash();
|
||||
m_triangulationValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -456,62 +464,10 @@ int SHAPE_POLY_SET::AddHole( const SHAPE_LINE_CHAIN& aHole, int aOutline )
|
|||
}
|
||||
|
||||
|
||||
const Path SHAPE_POLY_SET::convertToClipper( const SHAPE_LINE_CHAIN& aPath,
|
||||
bool aRequiredOrientation )
|
||||
{
|
||||
Path c_path;
|
||||
|
||||
for( int i = 0; i < aPath.PointCount(); i++ )
|
||||
{
|
||||
const VECTOR2I& vertex = aPath.CPoint( i );
|
||||
c_path.push_back( IntPoint( vertex.x, vertex.y ) );
|
||||
}
|
||||
|
||||
if( Orientation( c_path ) != aRequiredOrientation )
|
||||
ReversePath( c_path );
|
||||
|
||||
return c_path;
|
||||
}
|
||||
|
||||
|
||||
const SHAPE_LINE_CHAIN SHAPE_POLY_SET::convertFromClipper( const Path& aPath )
|
||||
{
|
||||
SHAPE_LINE_CHAIN lc;
|
||||
|
||||
for( unsigned int i = 0; i < aPath.size(); i++ )
|
||||
lc.Append( aPath[i].X, aPath[i].Y );
|
||||
|
||||
lc.SetClosed( true );
|
||||
|
||||
return lc;
|
||||
}
|
||||
|
||||
|
||||
void SHAPE_POLY_SET::booleanOp( ClipperLib::ClipType aType, const SHAPE_POLY_SET& aOtherShape,
|
||||
POLYGON_MODE aFastMode )
|
||||
{
|
||||
Clipper c;
|
||||
|
||||
if( aFastMode == PM_STRICTLY_SIMPLE )
|
||||
c.StrictlySimple( true );
|
||||
|
||||
for( const POLYGON& poly : m_polys )
|
||||
{
|
||||
for( unsigned int i = 0; i < poly.size(); i++ )
|
||||
c.AddPath( convertToClipper( poly[i], i > 0 ? false : true ), ptSubject, true );
|
||||
}
|
||||
|
||||
for( const POLYGON& poly : aOtherShape.m_polys )
|
||||
{
|
||||
for( unsigned int i = 0; i < poly.size(); i++ )
|
||||
c.AddPath( convertToClipper( poly[i], i > 0 ? false : true ), ptClip, true );
|
||||
}
|
||||
|
||||
PolyTree solution;
|
||||
|
||||
c.Execute( aType, solution, pftNonZero, pftNonZero );
|
||||
|
||||
importTree( &solution );
|
||||
booleanOp( aType, *this, aOtherShape, aFastMode );
|
||||
}
|
||||
|
||||
|
||||
|
@ -522,19 +478,18 @@ void SHAPE_POLY_SET::booleanOp( ClipperLib::ClipType aType,
|
|||
{
|
||||
Clipper c;
|
||||
|
||||
if( aFastMode == PM_STRICTLY_SIMPLE )
|
||||
c.StrictlySimple( true );
|
||||
c.StrictlySimple( aFastMode == PM_STRICTLY_SIMPLE );
|
||||
|
||||
for( const POLYGON& poly : aShape.m_polys )
|
||||
for( auto poly : aShape.m_polys )
|
||||
{
|
||||
for( unsigned int i = 0; i < poly.size(); i++ )
|
||||
c.AddPath( convertToClipper( poly[i], i > 0 ? false : true ), ptSubject, true );
|
||||
for( size_t i = 0 ; i < poly.size(); i++ )
|
||||
c.AddPath( poly[i].convertToClipper( i == 0 ), ptSubject, true );
|
||||
}
|
||||
|
||||
for( const POLYGON& poly : aOtherShape.m_polys )
|
||||
for( auto poly : aOtherShape.m_polys )
|
||||
{
|
||||
for( unsigned int i = 0; i < poly.size(); i++ )
|
||||
c.AddPath( convertToClipper( poly[i], i > 0 ? false : true ), ptClip, true );
|
||||
for( size_t i = 0; i < poly.size(); i++ )
|
||||
c.AddPath( poly[i].convertToClipper( i == 0 ), ptClip, true );
|
||||
}
|
||||
|
||||
PolyTree solution;
|
||||
|
@ -599,9 +554,8 @@ void SHAPE_POLY_SET::Inflate( int aFactor, int aCircleSegmentsCount )
|
|||
|
||||
for( const POLYGON& poly : m_polys )
|
||||
{
|
||||
for( unsigned int i = 0; i < poly.size(); i++ )
|
||||
c.AddPath( convertToClipper( poly[i], i > 0 ? false : true ), jtRound,
|
||||
etClosedPolygon );
|
||||
for( size_t i = 0; i < poly.size(); i++ )
|
||||
c.AddPath( poly[i].convertToClipper( i == 0 ), jtRound, etClosedPolygon );
|
||||
}
|
||||
|
||||
PolyTree solution;
|
||||
|
@ -644,10 +598,10 @@ void SHAPE_POLY_SET::importTree( PolyTree* tree )
|
|||
{
|
||||
POLYGON paths;
|
||||
paths.reserve( n->Childs.size() + 1 );
|
||||
paths.push_back( convertFromClipper( n->Contour ) );
|
||||
paths.push_back( n->Contour );
|
||||
|
||||
for( unsigned int i = 0; i < n->Childs.size(); i++ )
|
||||
paths.push_back( convertFromClipper( n->Childs[i]->Contour ) );
|
||||
paths.push_back( n->Childs[i]->Contour );
|
||||
|
||||
m_polys.push_back( paths );
|
||||
}
|
||||
|
@ -1862,164 +1816,6 @@ SHAPE_POLY_SET &SHAPE_POLY_SET::operator=( const SHAPE_POLY_SET& aOther )
|
|||
return *this;
|
||||
}
|
||||
|
||||
|
||||
class SHAPE_POLY_SET::TRIANGULATION_CONTEXT
|
||||
{
|
||||
public:
|
||||
|
||||
TRIANGULATION_CONTEXT( TRIANGULATED_POLYGON* aResultPoly ) :
|
||||
m_triPoly( aResultPoly )
|
||||
{
|
||||
}
|
||||
|
||||
void AddOutline( const SHAPE_LINE_CHAIN& outl, bool aIsHole = false )
|
||||
{
|
||||
m_points.reserve( outl.PointCount() );
|
||||
m_points.clear();
|
||||
|
||||
for( int i = 0; i < outl.PointCount(); i++ )
|
||||
{
|
||||
m_points.push_back( addPoint( outl.CPoint( i ) ) );
|
||||
}
|
||||
|
||||
if ( aIsHole )
|
||||
m_cdt->AddHole( m_points );
|
||||
else
|
||||
m_cdt.reset( new p2t::CDT( m_points ) );
|
||||
}
|
||||
|
||||
void Triangulate()
|
||||
{
|
||||
m_cdt->Triangulate();
|
||||
|
||||
m_triPoly->AllocateTriangles( m_cdt->GetTriangles().size() );
|
||||
|
||||
int i = 0;
|
||||
|
||||
for( auto tri : m_cdt->GetTriangles() )
|
||||
{
|
||||
TRIANGULATED_POLYGON::TRI t;
|
||||
|
||||
t.a = tri->GetPoint( 0 )->id;
|
||||
t.b = tri->GetPoint( 1 )->id;
|
||||
t.c = tri->GetPoint( 2 )->id;
|
||||
|
||||
m_triPoly->SetTriangle(i, t);
|
||||
i++;
|
||||
}
|
||||
|
||||
for( auto p : m_uniquePoints )
|
||||
delete p;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
class comparePoints
|
||||
{
|
||||
public:
|
||||
bool operator()( p2t::Point* a, p2t::Point* b ) const
|
||||
{
|
||||
if (a->x < b->x)
|
||||
return true;
|
||||
|
||||
if( a->x == b->x )
|
||||
return ( a->y > b->y );
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
p2t::Point* addPoint( const VECTOR2I& aP )
|
||||
{
|
||||
p2t::Point check( aP.x, aP.y );
|
||||
auto it = m_uniquePoints.find( &check );
|
||||
|
||||
if( it != m_uniquePoints.end() )
|
||||
{
|
||||
return *it;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto lastId = m_triPoly->GetVertexCount();
|
||||
auto p = new p2t::Point( aP.x, aP.y, lastId );
|
||||
m_triPoly->AddVertex( aP );
|
||||
m_uniquePoints.insert ( p );
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
typedef std::set<p2t::Point*, comparePoints> P2T_SET;
|
||||
typedef std::vector<p2t::Point*> P2T_VEC;
|
||||
|
||||
P2T_VEC m_points;
|
||||
P2T_SET m_uniquePoints;
|
||||
TRIANGULATED_POLYGON *m_triPoly;
|
||||
std::unique_ptr<p2t::CDT> m_cdt;
|
||||
};
|
||||
|
||||
SHAPE_POLY_SET::TRIANGULATED_POLYGON::~TRIANGULATED_POLYGON()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
||||
void SHAPE_POLY_SET::TRIANGULATED_POLYGON::Clear()
|
||||
{
|
||||
if( m_vertices )
|
||||
delete[] m_vertices;
|
||||
|
||||
if( m_triangles )
|
||||
delete[] m_triangles;
|
||||
}
|
||||
|
||||
|
||||
void SHAPE_POLY_SET::TRIANGULATED_POLYGON::AllocateVertices( int aSize )
|
||||
{
|
||||
m_vertices = new VECTOR2I[aSize];
|
||||
}
|
||||
|
||||
|
||||
void SHAPE_POLY_SET::TRIANGULATED_POLYGON::AllocateTriangles( int aSize )
|
||||
{
|
||||
m_triangles = new TRI[aSize];
|
||||
m_triangleCount = aSize;
|
||||
}
|
||||
|
||||
|
||||
static int totalVertexCount( const SHAPE_POLY_SET::POLYGON& aPoly )
|
||||
{
|
||||
int cnt = 0;
|
||||
|
||||
for( const auto& outl : aPoly )
|
||||
{
|
||||
cnt += outl.PointCount();
|
||||
}
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
||||
|
||||
void SHAPE_POLY_SET::triangulateSingle( const POLYGON& aPoly,
|
||||
SHAPE_POLY_SET::TRIANGULATED_POLYGON& aResult )
|
||||
{
|
||||
if( aPoly.size() == 0 )
|
||||
return;
|
||||
|
||||
TRIANGULATION_CONTEXT ctx ( &aResult );
|
||||
|
||||
aResult.AllocateVertices( totalVertexCount( aPoly ) );
|
||||
ctx.AddOutline( aPoly[0], false );
|
||||
|
||||
for( unsigned i = 1; i < aPoly.size(); i++ )
|
||||
{
|
||||
ctx.AddOutline( aPoly[i], true ); // add holes
|
||||
}
|
||||
|
||||
ctx.Triangulate();
|
||||
}
|
||||
|
||||
|
||||
MD5_HASH SHAPE_POLY_SET::GetHash() const
|
||||
{
|
||||
if( !m_hash.IsValid() )
|
||||
|
@ -2067,22 +1863,17 @@ void SHAPE_POLY_SET::CacheTriangulation()
|
|||
|
||||
SHAPE_POLY_SET tmpSet = *this;
|
||||
|
||||
if( !tmpSet.HasHoles() )
|
||||
tmpSet.Unfracture( PM_FAST );
|
||||
if( tmpSet.HasHoles() )
|
||||
tmpSet.Fracture( PM_FAST );
|
||||
|
||||
m_triangulatedPolys.clear();
|
||||
|
||||
if( tmpSet.HasTouchingHoles() )
|
||||
{
|
||||
// temporary workaround for overlapping hole vertices that poly2tri doesn't handle
|
||||
m_triangulationValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
for( int i = 0; i < tmpSet.OutlineCount(); i++ )
|
||||
{
|
||||
m_triangulatedPolys.push_back( std::make_unique<TRIANGULATED_POLYGON>() );
|
||||
triangulateSingle( tmpSet.Polygon( i ), *m_triangulatedPolys.back() );
|
||||
PolygonTriangulation tess( *m_triangulatedPolys.back() );
|
||||
|
||||
tess.TesselatePolygon( tmpSet.Polygon( i ).front() );
|
||||
}
|
||||
|
||||
m_triangulationValid = true;
|
||||
|
@ -2134,20 +1925,20 @@ bool SHAPE_POLY_SET::HasTouchingHoles() const
|
|||
|
||||
bool SHAPE_POLY_SET::hasTouchingHoles( const POLYGON& aPoly ) const
|
||||
{
|
||||
std::vector< VECTOR2I > pts;
|
||||
std::set< long long > ptHashes;
|
||||
|
||||
for( const auto& lc : aPoly )
|
||||
{
|
||||
for( int i = 0; i < lc.PointCount(); i++ )
|
||||
for( const VECTOR2I& pt : lc.CPoints() )
|
||||
{
|
||||
const auto p = lc.CPoint( i );
|
||||
const long long ptHash = (long long) pt.x << 32 | pt.y;
|
||||
|
||||
if( std::find( pts.begin(), pts.end(), p ) != pts.end() )
|
||||
if( ptHashes.count( ptHash ) > 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
pts.push_back( p );
|
||||
ptHashes.insert( ptHash );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -358,7 +358,7 @@ bool OpenPDF( const wxString& file )
|
|||
}
|
||||
else
|
||||
{
|
||||
if( wxLaunchDefaultApplication( file ) )
|
||||
if( wxLaunchDefaultApplication( filename ) )
|
||||
return true;
|
||||
|
||||
// If launching the system default PDF viewer fails, fall through with empty command
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, j-p.charras at wanadoo.fr
|
||||
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2010-2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -94,6 +94,7 @@ struct hotkey_name_descr
|
|||
* "Space","Ctrl+Space","Alt+Space" or
|
||||
* "Alt+A","Ctrl+F1", ...
|
||||
*/
|
||||
#define KEY_NON_FOUND -1
|
||||
static struct hotkey_name_descr hotkeyNameList[] =
|
||||
{
|
||||
{ wxT( "F1" ), WXK_F1 },
|
||||
|
@ -112,7 +113,7 @@ static struct hotkey_name_descr hotkeyNameList[] =
|
|||
{ wxT( "Esc" ), WXK_ESCAPE },
|
||||
{ wxT( "Del" ), WXK_DELETE },
|
||||
{ wxT( "Tab" ), WXK_TAB },
|
||||
{ wxT( "BkSp" ), WXK_BACK },
|
||||
{ wxT( "Back" ), WXK_BACK },
|
||||
{ wxT( "Ins" ), WXK_INSERT },
|
||||
|
||||
{ wxT( "Home" ), WXK_HOME },
|
||||
|
@ -129,8 +130,10 @@ static struct hotkey_name_descr hotkeyNameList[] =
|
|||
|
||||
{ wxT( "Space" ), WXK_SPACE },
|
||||
|
||||
{ wxT( "<unassigned>" ), 0 },
|
||||
|
||||
// Do not change this line: end of list
|
||||
{ wxT( "" ), 0 }
|
||||
{ wxT( "" ), KEY_NON_FOUND }
|
||||
};
|
||||
|
||||
// name of modifier keys.
|
||||
|
@ -169,9 +172,6 @@ wxString KeyNameFromKeyCode( int aKeycode, bool* aIsFound )
|
|||
bool found = false;
|
||||
|
||||
// Assume keycode of 0 is "unassigned"
|
||||
if( aKeycode == 0 )
|
||||
return wxT( "<unassigned>");
|
||||
|
||||
if( (aKeycode & GR_KB_CTRL) != 0 )
|
||||
modifier << MODIFIER_CTRL;
|
||||
|
||||
|
@ -192,7 +192,7 @@ wxString KeyNameFromKeyCode( int aKeycode, bool* aIsFound )
|
|||
{
|
||||
for( ii = 0; ; ii++ )
|
||||
{
|
||||
if( hotkeyNameList[ii].m_KeyCode == 0 ) // End of list
|
||||
if( hotkeyNameList[ii].m_KeyCode == KEY_NON_FOUND ) // End of list
|
||||
{
|
||||
keyname = wxT( "<unknown>" );
|
||||
break;
|
||||
|
@ -377,7 +377,7 @@ wxString KeyNameFromCommandId( EDA_HOTKEY** aList, int aCommandId )
|
|||
*/
|
||||
int KeyCodeFromKeyName( const wxString& keyname )
|
||||
{
|
||||
int ii, keycode = 0;
|
||||
int ii, keycode = KEY_NON_FOUND;
|
||||
|
||||
// Search for modifiers: Ctrl+ Alt+ and Shift+
|
||||
// Note: on Mac OSX, the Cmd key is equiv here to Ctrl
|
||||
|
@ -425,7 +425,7 @@ int KeyCodeFromKeyName( const wxString& keyname )
|
|||
return keycode;
|
||||
}
|
||||
|
||||
for( ii = 0; hotkeyNameList[ii].m_KeyCode != 0; ii++ )
|
||||
for( ii = 0; hotkeyNameList[ii].m_KeyCode != KEY_NON_FOUND; ii++ )
|
||||
{
|
||||
if( key.CmpNoCase( hotkeyNameList[ii].m_Name ) == 0 )
|
||||
{
|
||||
|
@ -734,7 +734,11 @@ void ParseHotkeyConfig( const wxString& data,
|
|||
|
||||
if( hk_decr->m_InfoMsg == fctname )
|
||||
{
|
||||
hk_decr->m_KeyCode = KeyCodeFromKeyName( keyname );
|
||||
int keycode = KeyCodeFromKeyName( keyname );
|
||||
|
||||
if( keycode != KEY_NON_FOUND ) // means the key name is found in list or unassigned
|
||||
hk_decr->m_KeyCode = keycode;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ void LIB_ID::clear()
|
|||
}
|
||||
|
||||
|
||||
int LIB_ID::Parse( const UTF8& aId )
|
||||
int LIB_ID::Parse( const UTF8& aId, LIB_ID_TYPE aType, bool aFix )
|
||||
{
|
||||
clear();
|
||||
|
||||
|
@ -127,7 +127,7 @@ int LIB_ID::Parse( const UTF8& aId )
|
|||
const char* rev = EndsWithRev( buffer, buffer+aId.length(), '/' );
|
||||
size_t revNdx;
|
||||
size_t partNdx;
|
||||
int offset;
|
||||
int offset = -1;
|
||||
|
||||
//=====<revision>=========================================
|
||||
// in a LIB_ID like discret:R3/rev4
|
||||
|
@ -150,9 +150,7 @@ int LIB_ID::Parse( const UTF8& aId )
|
|||
offset = SetLibNickname( aId.substr( 0, partNdx ) );
|
||||
|
||||
if( offset > -1 )
|
||||
{
|
||||
return offset;
|
||||
}
|
||||
|
||||
++partNdx; // skip ':'
|
||||
}
|
||||
|
@ -165,48 +163,24 @@ int LIB_ID::Parse( const UTF8& aId )
|
|||
if( partNdx >= revNdx )
|
||||
return partNdx; // Error: no library item name.
|
||||
|
||||
UTF8 fpname = aId.substr( partNdx, revNdx-partNdx );
|
||||
|
||||
// Be sure the item name is valid.
|
||||
// Some chars can be found in legacy files converted files from other EDA tools.
|
||||
std::string fpname = aId.substr( partNdx, revNdx-partNdx );
|
||||
ReplaceIllegalFileNameChars( &fpname, '_' );
|
||||
SetLibItemName( UTF8( fpname ) );
|
||||
if( aFix )
|
||||
fpname = FixIllegalChars( fpname, aType, false );
|
||||
else
|
||||
offset = HasIllegalChars( fpname, aType );
|
||||
|
||||
if( offset > -1 )
|
||||
return offset;
|
||||
|
||||
SetLibItemName( fpname );
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
LIB_ID::LIB_ID( const UTF8& aId )
|
||||
{
|
||||
int offset = Parse( aId );
|
||||
|
||||
if( offset != -1 )
|
||||
{
|
||||
THROW_PARSE_ERROR( _( "Illegal character found in LIB_ID string" ),
|
||||
wxString::FromUTF8( aId.c_str() ),
|
||||
aId.c_str(),
|
||||
0,
|
||||
offset );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LIB_ID::LIB_ID( const wxString& aId )
|
||||
{
|
||||
UTF8 id = aId;
|
||||
|
||||
int offset = Parse( id );
|
||||
|
||||
if( offset != -1 )
|
||||
{
|
||||
THROW_PARSE_ERROR( _( "Illegal character found in LIB_ID string" ),
|
||||
aId,
|
||||
id.c_str(),
|
||||
0,
|
||||
offset );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LIB_ID::LIB_ID( const wxString& aLibName, const wxString& aLibItemName,
|
||||
const wxString& aRevision ) :
|
||||
nickname( aLibName ),
|
||||
|
@ -359,15 +333,19 @@ int LIB_ID::compare( const LIB_ID& aLibId ) const
|
|||
}
|
||||
|
||||
|
||||
bool LIB_ID::HasIllegalChars( const UTF8& aLibItemName, LIB_ID_TYPE aType )
|
||||
int LIB_ID::HasIllegalChars( const UTF8& aLibItemName, LIB_ID_TYPE aType )
|
||||
{
|
||||
int offset = 0;
|
||||
|
||||
for( auto ch : aLibItemName )
|
||||
{
|
||||
if( !isLegalChar( ch, aType ) )
|
||||
return true;
|
||||
return offset;
|
||||
else
|
||||
++offset;
|
||||
}
|
||||
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -390,20 +368,23 @@ UTF8 LIB_ID::FixIllegalChars( const UTF8& aLibItemName, LIB_ID_TYPE aType, bool
|
|||
|
||||
bool LIB_ID::isLegalChar( unsigned aUniChar, LIB_ID_TYPE aType )
|
||||
{
|
||||
bool const colon_allowed = ( aType == ID_ALIAS );
|
||||
bool const space_allowed = ( aType != ID_SCH );
|
||||
bool const space_allowed = ( aType == ID_PCB );
|
||||
bool const illegal_filename_chars_allowed = ( aType == ID_SCH );
|
||||
|
||||
if( aUniChar < ' ' )
|
||||
return false;
|
||||
|
||||
switch( aUniChar )
|
||||
{
|
||||
case ':':
|
||||
case '/':
|
||||
case '\\':
|
||||
return false;
|
||||
|
||||
case ':':
|
||||
return colon_allowed;
|
||||
case '\\':
|
||||
case '<':
|
||||
case '>':
|
||||
case '"':
|
||||
return illegal_filename_chars_allowed;
|
||||
|
||||
case ' ':
|
||||
return space_allowed;
|
||||
|
|
|
@ -53,15 +53,7 @@ ORIGIN_VIEWITEM* ORIGIN_VIEWITEM::Clone() const
|
|||
const BOX2I ORIGIN_VIEWITEM::ViewBBox() const
|
||||
{
|
||||
BOX2I bbox;
|
||||
|
||||
// The origin item doesn't have a fixed size. It is constant on the screen but
|
||||
// changes the effective BBox size based on the zoom level.
|
||||
// But we can't simply set it to the maximum size as this causes a splitting degeneracy
|
||||
// when compiling for Debian i386. By modestly adjusting the bbox, we avoid the degeneracy
|
||||
// while keeping the origin visible at all zoom levels
|
||||
bbox.SetSize( VECTOR2I( INT_MAX - 2, INT_MAX - 2 ) );
|
||||
bbox.SetOrigin( VECTOR2I( INT_MIN / 2 + 1, INT_MIN / 2 + 1 ) );
|
||||
|
||||
bbox.SetMaximum();
|
||||
return bbox;
|
||||
}
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ static LANGUAGE_DESCR s_Languages[] =
|
|||
{
|
||||
wxLANGUAGE_CHINESE_SIMPLIFIED,
|
||||
ID_LANGUAGE_CHINESE_SIMPLIFIED,
|
||||
lang_chinese_xpm,
|
||||
lang_zh_xpm,
|
||||
_( "Chinese simplified" )
|
||||
},
|
||||
|
||||
|
@ -831,7 +831,7 @@ bool PGM_BASE::SetLanguage( bool first_time )
|
|||
if( result != dtst )
|
||||
// string to double encode/decode does not work! Bug detected:
|
||||
// Disable floating point localization:
|
||||
setlocale( LC_ALL, "C" );
|
||||
setlocale( LC_NUMERIC, "C" );
|
||||
|
||||
if( !m_locale->IsLoaded( dictionaryName ) )
|
||||
m_locale->AddCatalog( dictionaryName );
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -203,8 +203,12 @@ bool GERBER_PLOTTER::StartPlot()
|
|||
m_gerberUnitInch ? "inch" : "mm" );
|
||||
|
||||
wxString Title = creator + wxT( " " ) + GetBuildVersion();
|
||||
// In gerber files, ASCII7 chars only are allowed.
|
||||
// So use a ISO date format (using a space as separator between date and time),
|
||||
// not a localized date format
|
||||
wxDateTime date = wxDateTime::Now();
|
||||
fprintf( outputFile, "G04 Created by KiCad (%s) date %s*\n",
|
||||
TO_UTF8( Title ), TO_UTF8( DateAndTime() ) );
|
||||
TO_UTF8( Title ), TO_UTF8( date.FormatISOCombined( ' ') ) );
|
||||
|
||||
/* Mass parameter: unit = INCHES/MM */
|
||||
if( m_gerberUnitInch )
|
||||
|
@ -215,9 +219,6 @@ bool GERBER_PLOTTER::StartPlot()
|
|||
// Be sure the usual dark polarity is selected:
|
||||
fputs( "%LPD*%\n", outputFile );
|
||||
|
||||
// Specify linear interpol (G01):
|
||||
fputs( "G01*\n", outputFile );
|
||||
|
||||
fputs( "G04 APERTURE LIST*\n", outputFile );
|
||||
|
||||
return true;
|
||||
|
@ -484,7 +485,7 @@ void GERBER_PLOTTER::Arc( const wxPoint& aCenter, double aStAngle, double aEndAn
|
|||
DPOINT devEnd = userToDeviceCoordinates( end );
|
||||
DPOINT devCenter = userToDeviceCoordinates( aCenter ) - userToDeviceCoordinates( start );
|
||||
|
||||
fprintf( outputFile, "G75*\n" ); // Multiquadrant mode
|
||||
fprintf( outputFile, "G75*\n" ); // Multiquadrant (360 degrees) mode
|
||||
|
||||
if( aStAngle < aEndAngle )
|
||||
fprintf( outputFile, "G03" );
|
||||
|
@ -494,7 +495,8 @@ void GERBER_PLOTTER::Arc( const wxPoint& aCenter, double aStAngle, double aEndAn
|
|||
fprintf( outputFile, "X%dY%dI%dJ%dD01*\n",
|
||||
KiROUND( devEnd.x ), KiROUND( devEnd.y ),
|
||||
KiROUND( devCenter.x ), KiROUND( devCenter.y ) );
|
||||
fprintf( outputFile, "G01*\n" ); // Back to linear interp.
|
||||
|
||||
fprintf( outputFile, "G01*\n" ); // Back to linear interpol (perhaps useless here).
|
||||
}
|
||||
|
||||
|
||||
|
@ -519,6 +521,7 @@ void GERBER_PLOTTER:: PlotPoly( const std::vector< wxPoint >& aCornerList,
|
|||
fputs( "G36*\n", outputFile );
|
||||
|
||||
MoveTo( aCornerList[0] );
|
||||
fputs( "G01*\n", outputFile ); // Set linear interpolation.
|
||||
|
||||
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
|
||||
LineTo( aCornerList[ii] );
|
||||
|
|
|
@ -135,6 +135,13 @@ typedef long time_t;
|
|||
#include <geometry/shape.h>
|
||||
%include <geometry/shape.h>
|
||||
|
||||
// Contains VECTOR2I
|
||||
%include math.i
|
||||
|
||||
%ignore SHAPE_LINE_CHAIN::convertFromClipper;
|
||||
#include <geometry/shape_line_chain.h>
|
||||
%include <geometry/shape_line_chain.h>
|
||||
|
||||
#include <geometry/shape_poly_set.h>
|
||||
%include <geometry/shape_poly_set.h>
|
||||
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file math.i
|
||||
* @brief wrappers for math helper classes
|
||||
*/
|
||||
|
||||
%ignore VECTOR2<int>::ECOORD_MAX;
|
||||
%ignore VECTOR2<int>::ECOORD_MIN;
|
||||
|
||||
#include <math/vector2d.h>
|
||||
%include <math/vector2d.h>
|
||||
%template(VECTOR2I) VECTOR2<int>;
|
|
@ -399,6 +399,32 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
|||
key += 'A' - 1;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
if( mods & MD_ALT )
|
||||
{
|
||||
// OSX maps a bunch of commonly used extended-ASCII characters onto the keyboard
|
||||
// using the ALT key. Since we use ALT for some of our hotkeys, we need to map back
|
||||
// to the underlying keys. The kVK_ANSI_* values come from Apple and are said to be
|
||||
// hardware independant.
|
||||
switch( ke->GetRawKeyCode() )
|
||||
{
|
||||
case /* kVK_ANSI_1 */ 0x12: key = '1'; break;
|
||||
case /* kVK_ANSI_2 */ 0x13: key = '2'; break;
|
||||
case /* kVK_ANSI_3 */ 0x14: key = '3'; break;
|
||||
case /* kVK_ANSI_4 */ 0x15: key = '4'; break;
|
||||
case /* kVK_ANSI_6 */ 0x16: key = '6'; break;
|
||||
case /* kVK_ANSI_5 */ 0x17: key = '5'; break;
|
||||
case /* kVK_ANSI_Equal */ 0x18: key = '='; break;
|
||||
case /* kVK_ANSI_9 */ 0x19: key = '9'; break;
|
||||
case /* kVK_ANSI_7 */ 0x1A: key = '7'; break;
|
||||
case /* kVK_ANSI_Minus */ 0x1B: key = '-'; break;
|
||||
case /* kVK_ANSI_8 */ 0x1C: key = '8'; break;
|
||||
case /* kVK_ANSI_0 */ 0x1D: key = '0'; break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if( key == WXK_ESCAPE ) // ESC is the special key for canceling tools
|
||||
evt = TOOL_EVENT( TC_COMMAND, TA_CANCEL_TOOL );
|
||||
else
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
|
||||
#include <utf8.h>
|
||||
#include <ki_exception.h>
|
||||
#include <wx/strconv.h>
|
||||
#include <wx/buffer.h>
|
||||
#include <vector>
|
||||
|
||||
/* THROW_IO_ERROR needs this, but it includes this file, so until some
|
||||
factoring of THROW_IO_ERROR into a separate header, defer and use the asserts.
|
||||
|
@ -197,24 +200,21 @@ bool IsUTF8( const char* aString )
|
|||
}
|
||||
|
||||
|
||||
UTF8::UTF8( const wchar_t* txt ) :
|
||||
// size initial string safely large enough, then shrink to known size later.
|
||||
m_s( wcslen( txt ) * 4, 0 )
|
||||
UTF8::UTF8( const wchar_t* txt )
|
||||
{
|
||||
/*
|
||||
try
|
||||
{
|
||||
std::vector< char > temp( wcslen( txt ) * 4 + 1 );
|
||||
wxConvUTF8.WC2MB( temp.data(), txt, temp.size() );
|
||||
m_s.assign( temp.data() );
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
auto string = wxSafeConvertWX2MB( txt );
|
||||
m_s.assign( string );
|
||||
}
|
||||
|
||||
"this" string was sized to hold the worst case UTF8 encoded byte
|
||||
sequence, and was initialized with all nul bytes. Overwrite some of
|
||||
those nuls, then resize, shrinking down to actual size.
|
||||
|
||||
Use the wx 2.8 function, not new FromWChar(). It knows about wchar_t
|
||||
possibly being 16 bits wide on Windows and holding UTF16 input.
|
||||
|
||||
*/
|
||||
|
||||
int sz = wxConvUTF8.WC2MB( (char*) m_s.data(), txt, m_s.size() );
|
||||
|
||||
m_s.resize( sz );
|
||||
m_s.shrink_to_fit();
|
||||
}
|
||||
|
||||
|
||||
|
@ -224,6 +224,7 @@ UTF8& UTF8::operator+=( unsigned w_ch )
|
|||
m_s.operator+=( char( w_ch ) );
|
||||
else
|
||||
{
|
||||
//TODO: Remove wchar use. Replace with std::byte*
|
||||
wchar_t wide_chr[2]; // buffer to store wide chars (UTF16) read from aText
|
||||
wide_chr[1] = 0;
|
||||
wide_chr[0] = w_ch;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
using namespace KIGFX;
|
||||
|
||||
VIEW_GROUP::VIEW_GROUP( VIEW* aView ) :
|
||||
m_layer( LAYER_GP_OVERLAY )
|
||||
m_layer( LAYER_SELECT_OVERLAY )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -100,10 +100,10 @@ const BOX2I VIEW_GROUP::ViewBBox() const
|
|||
|
||||
void VIEW_GROUP::ViewDraw( int aLayer, VIEW* aView ) const
|
||||
{
|
||||
auto gal = aView->GetGAL();
|
||||
PAINTER* painter = aView->GetPainter();
|
||||
|
||||
const auto drawList = updateDrawList();
|
||||
KIGFX::GAL* gal = aView->GetGAL();
|
||||
PAINTER* painter = aView->GetPainter();
|
||||
bool isSelection = m_layer == LAYER_SELECT_OVERLAY;
|
||||
const auto drawList = updateDrawList();
|
||||
|
||||
std::unordered_map<int, std::vector<VIEW_ITEM*>> layer_item_map;
|
||||
|
||||
|
@ -140,7 +140,25 @@ void VIEW_GROUP::ViewDraw( int aLayer, VIEW* aView ) const
|
|||
|
||||
for( int i = 0; i < layers_count; i++ )
|
||||
{
|
||||
if( aView->IsLayerVisible( layers[i] ) )
|
||||
int layer = layers[i];
|
||||
bool draw = aView->IsLayerVisible( layer );
|
||||
|
||||
if( isSelection )
|
||||
{
|
||||
switch( layer )
|
||||
{
|
||||
case LAYER_PADS_TH:
|
||||
case LAYER_PADS_PLATEDHOLES:
|
||||
case LAYER_PAD_FR:
|
||||
case LAYER_PAD_BK:
|
||||
draw = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( draw )
|
||||
{
|
||||
gal->AdvanceDepth();
|
||||
|
||||
|
|
|
@ -253,6 +253,18 @@ WIDGET_HOTKEY_CLIENT_DATA* WIDGET_HOTKEY_LIST::GetSelHKClientData()
|
|||
}
|
||||
|
||||
|
||||
WIDGET_HOTKEY_CLIENT_DATA* WIDGET_HOTKEY_LIST::getExpectedHkClientData( wxTreeListItem aItem )
|
||||
{
|
||||
const auto hkdata = GetHKClientData( aItem );
|
||||
|
||||
// This probably means a hotkey-only action is being attempted on
|
||||
// a row that is not a hotkey (like a section heading)
|
||||
wxASSERT_MSG( hkdata != nullptr, "No hotkey data found for list item" );
|
||||
|
||||
return hkdata;
|
||||
}
|
||||
|
||||
|
||||
void WIDGET_HOTKEY_LIST::UpdateFromClientData()
|
||||
{
|
||||
for( wxTreeListItem i = GetFirstItem(); i.IsOk(); i = GetNextItem( i ) )
|
||||
|
@ -285,13 +297,10 @@ void WIDGET_HOTKEY_LIST::LoadSection( EDA_HOTKEY_CONFIG* aSection )
|
|||
|
||||
void WIDGET_HOTKEY_LIST::EditItem( wxTreeListItem aItem )
|
||||
{
|
||||
WIDGET_HOTKEY_CLIENT_DATA* hkdata = GetHKClientData( aItem );
|
||||
WIDGET_HOTKEY_CLIENT_DATA* hkdata = getExpectedHkClientData( aItem );
|
||||
|
||||
if( !hkdata )
|
||||
{
|
||||
// Activated item was not a hotkey row
|
||||
return;
|
||||
}
|
||||
|
||||
wxString name = GetItemText( aItem, 0 );
|
||||
wxString current_key = GetItemText( aItem, 1 );
|
||||
|
@ -299,7 +308,7 @@ void WIDGET_HOTKEY_LIST::EditItem( wxTreeListItem aItem )
|
|||
wxKeyEvent key_event = HK_PROMPT_DIALOG::PromptForKey( GetParent(), name, current_key );
|
||||
long key = MapKeypressToKeycode( key_event );
|
||||
|
||||
if( hkdata && key )
|
||||
if( key )
|
||||
{
|
||||
// See if this key code is handled in hotkeys names list
|
||||
bool exists;
|
||||
|
@ -327,7 +336,11 @@ void WIDGET_HOTKEY_LIST::EditItem( wxTreeListItem aItem )
|
|||
|
||||
void WIDGET_HOTKEY_LIST::ResetItem( wxTreeListItem aItem )
|
||||
{
|
||||
WIDGET_HOTKEY_CLIENT_DATA* hkdata = GetHKClientData( aItem );
|
||||
WIDGET_HOTKEY_CLIENT_DATA* hkdata = getExpectedHkClientData( aItem );
|
||||
|
||||
if( !hkdata )
|
||||
return;
|
||||
|
||||
EDA_HOTKEY* hk = &hkdata->GetHotkey();
|
||||
|
||||
for( size_t sec_index = 0; sec_index < m_sections.size(); ++sec_index )
|
||||
|
@ -356,9 +369,14 @@ void WIDGET_HOTKEY_LIST::ResetItem( wxTreeListItem aItem )
|
|||
|
||||
void WIDGET_HOTKEY_LIST::ResetItemToDefault( wxTreeListItem aItem )
|
||||
{
|
||||
WIDGET_HOTKEY_CLIENT_DATA* hkdata = GetHKClientData( aItem );
|
||||
WIDGET_HOTKEY_CLIENT_DATA* hkdata = getExpectedHkClientData( aItem );
|
||||
|
||||
if( !hkdata )
|
||||
return;
|
||||
|
||||
EDA_HOTKEY* hk = &hkdata->GetHotkey();
|
||||
hk->ResetKeyCodeToDefault();
|
||||
|
||||
UpdateFromClientData();
|
||||
}
|
||||
|
||||
|
@ -376,10 +394,17 @@ void WIDGET_HOTKEY_LIST::OnContextMenu( wxTreeListEvent& aEvent )
|
|||
|
||||
wxMenu menu;
|
||||
|
||||
menu.Append( ID_EDIT, _( "Edit..." ) );
|
||||
menu.Append( ID_RESET, _( "Undo Changes" ) );
|
||||
menu.Append( ID_DEFAULT, _( "Restore Default" ) );
|
||||
menu.Append( wxID_SEPARATOR );
|
||||
WIDGET_HOTKEY_CLIENT_DATA* hkdata = GetHKClientData( m_context_menu_item );
|
||||
|
||||
// Some actions only apply if the row is hotkey data
|
||||
if( hkdata )
|
||||
{
|
||||
menu.Append( ID_EDIT, _( "Edit..." ) );
|
||||
menu.Append( ID_RESET, _( "Undo Changes" ) );
|
||||
menu.Append( ID_DEFAULT, _( "Restore Default" ) );
|
||||
menu.Append( wxID_SEPARATOR );
|
||||
}
|
||||
|
||||
menu.Append( ID_RESET_ALL, _( "Undo All Changes" ) );
|
||||
menu.Append( ID_DEFAULT_ALL, _( "Restore All to Default" ) );
|
||||
|
||||
|
|
|
@ -68,40 +68,40 @@ static wxString FormatWildcardExt( const wxString& aWildcard )
|
|||
}
|
||||
|
||||
|
||||
const wxString SchematicSymbolFileExtension( "sym" );
|
||||
const wxString SchematicLibraryFileExtension( "lib" );
|
||||
const wxString SchematicBackupFileExtension( "bak" );
|
||||
const std::string SchematicSymbolFileExtension( "sym" );
|
||||
const std::string SchematicLibraryFileExtension( "lib" );
|
||||
const std::string SchematicBackupFileExtension( "bak" );
|
||||
|
||||
const wxString VrmlFileExtension( "wrl" );
|
||||
const std::string VrmlFileExtension( "wrl" );
|
||||
|
||||
const wxString ProjectFileExtension( "pro" );
|
||||
const wxString SchematicFileExtension( "sch" );
|
||||
const wxString NetlistFileExtension( "net" );
|
||||
const wxString ComponentFileExtension( "cmp" );
|
||||
const wxString GerberFileExtension( "gbr" );
|
||||
const wxString GerberJobFileExtension( "gbrjob" );
|
||||
const wxString HtmlFileExtension( wxT( "html" ) );
|
||||
const std::string ProjectFileExtension( "pro" );
|
||||
const std::string SchematicFileExtension( "sch" );
|
||||
const std::string NetlistFileExtension( "net" );
|
||||
const std::string ComponentFileExtension( "cmp" );
|
||||
const std::string GerberFileExtension( "gbr" );
|
||||
const std::string GerberJobFileExtension( "gbrjob" );
|
||||
const std::string HtmlFileExtension( "html" );
|
||||
|
||||
const wxString LegacyPcbFileExtension( "brd" );
|
||||
const wxString KiCadPcbFileExtension( "kicad_pcb" );
|
||||
const wxString PageLayoutDescrFileExtension( "kicad_wks" );
|
||||
const std::string LegacyPcbFileExtension( "brd" );
|
||||
const std::string KiCadPcbFileExtension( "kicad_pcb" );
|
||||
const std::string PageLayoutDescrFileExtension( "kicad_wks" );
|
||||
|
||||
const wxString PdfFileExtension( "pdf" );
|
||||
const wxString MacrosFileExtension( "mcr" );
|
||||
const wxString DrillFileExtension( "drl" );
|
||||
const wxString SVGFileExtension( "svg" );
|
||||
const wxString ReportFileExtension( "rpt" );
|
||||
const wxString FootprintPlaceFileExtension( "pos" );
|
||||
const wxString KiCadLib3DShapesPathExtension( "3dshapes" ); ///< 3D shapes default libpath
|
||||
const std::string PdfFileExtension( "pdf" );
|
||||
const std::string MacrosFileExtension( "mcr" );
|
||||
const std::string DrillFileExtension( "drl" );
|
||||
const std::string SVGFileExtension( "svg" );
|
||||
const std::string ReportFileExtension( "rpt" );
|
||||
const std::string FootprintPlaceFileExtension( "pos" );
|
||||
const std::string KiCadLib3DShapesPathExtension( "3dshapes" ); ///< 3D shapes default libpath
|
||||
|
||||
const wxString KiCadFootprintLibPathExtension( "pretty" ); ///< KICAD PLUGIN libpath
|
||||
const wxString LegacyFootprintLibPathExtension( "mod" );
|
||||
const wxString EagleFootprintLibPathExtension( "lbr" );
|
||||
const std::string KiCadFootprintLibPathExtension( "pretty" ); ///< KICAD PLUGIN libpath
|
||||
const std::string LegacyFootprintLibPathExtension( "mod" );
|
||||
const std::string EagleFootprintLibPathExtension( "lbr" );
|
||||
|
||||
const wxString KiCadFootprintFileExtension( "kicad_mod" );
|
||||
const wxString GedaPcbFootprintLibFileExtension( "fp" );
|
||||
const wxString SpecctraDsnFileExtension( "dsn" );
|
||||
const wxString IpcD356FileExtension( "d356" );
|
||||
const std::string KiCadFootprintFileExtension( "kicad_mod" );
|
||||
const std::string GedaPcbFootprintLibFileExtension( "fp" );
|
||||
const std::string SpecctraDsnFileExtension( "dsn" );
|
||||
const std::string IpcD356FileExtension( "d356" );
|
||||
|
||||
|
||||
const wxString AllFilesWildcard( _( "All files (*)|*" ) );
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include <worksheet_viewitem.h>
|
||||
#include <worksheet_shape_builder.h>
|
||||
#include <worksheet_dataitem.h>
|
||||
#include <gal/graphics_abstraction_layer.h>
|
||||
#include <painter.h>
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
|
@ -119,6 +120,7 @@ void WORKSHEET_VIEWITEM::ViewDraw( int aLayer, VIEW* aView ) const
|
|||
break;
|
||||
|
||||
case WS_DRAW_ITEM_BASE::wsg_bitmap:
|
||||
draw( static_cast<const WS_DRAW_ITEM_BITMAP*>( item ), gal );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -198,6 +200,25 @@ void WORKSHEET_VIEWITEM::draw( const WS_DRAW_ITEM_TEXT* aItem, GAL* aGal ) const
|
|||
}
|
||||
|
||||
|
||||
void WORKSHEET_VIEWITEM::draw( const WS_DRAW_ITEM_BITMAP* aItem, GAL* aGal ) const
|
||||
{
|
||||
aGal->Save();
|
||||
VECTOR2D position = aItem->GetPosition();
|
||||
aGal->Translate( position );
|
||||
WORKSHEET_DATAITEM_BITMAP* parent = static_cast<WORKSHEET_DATAITEM_BITMAP*>( aItem->GetParent() );
|
||||
|
||||
// When the image scale factor is not 1.0, we need to modify the actual scale
|
||||
// as the image scale factor is similar to a local zoom
|
||||
double img_scale = parent->m_ImageBitmap->GetScale();
|
||||
|
||||
if( img_scale != 1.0 )
|
||||
aGal->Scale( VECTOR2D( img_scale, img_scale ) );
|
||||
|
||||
aGal->DrawBitmap( *parent->m_ImageBitmap );
|
||||
aGal->Restore();
|
||||
}
|
||||
|
||||
|
||||
void WORKSHEET_VIEWITEM::drawBorder( GAL* aGal ) const
|
||||
{
|
||||
VECTOR2D origin = VECTOR2D( 0.0, 0.0 );
|
||||
|
|
|
@ -149,7 +149,6 @@ target_link_libraries( cvpcb_kiface
|
|||
gal
|
||||
${wxWidgets_LIBRARIES}
|
||||
${GDI_PLUS_LIBRARIES}
|
||||
${OPENMP_LIBRARIES} # used by 3d viewer
|
||||
)
|
||||
|
||||
if( BUILD_GITHUB_PLUGIN )
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
<true/>
|
||||
<key>LSRequiresCarbon</key>
|
||||
<true/>
|
||||
<key>NSRequiresAquaSystemAppearance</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Nov 22 2017)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -34,16 +34,16 @@ DIALOG_CONFIG_EQUFILES_BASE::DIALOG_CONFIG_EQUFILES_BASE( wxWindow* parent, wxWi
|
|||
bSizerButtons = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_buttonAddEqu = new wxButton( sbEquivChoiceSizer->GetStaticBox(), ID_ADD_EQU, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerButtons->Add( m_buttonAddEqu, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerButtons->Add( m_buttonAddEqu, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_buttonRemoveEqu = new wxButton( sbEquivChoiceSizer->GetStaticBox(), ID_REMOVE_EQU, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerButtons->Add( m_buttonRemoveEqu, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerButtons->Add( m_buttonRemoveEqu, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_buttonMoveUp = new wxButton( sbEquivChoiceSizer->GetStaticBox(), ID_EQU_UP, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerButtons->Add( m_buttonMoveUp, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerButtons->Add( m_buttonMoveUp, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_buttonMoveDown = new wxButton( sbEquivChoiceSizer->GetStaticBox(), ID_EQU_DOWN, _("Move Down"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerButtons->Add( m_buttonMoveDown, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerButtons->Add( m_buttonMoveDown, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_buttonEdit = new wxButton( sbEquivChoiceSizer->GetStaticBox(), wxID_ANY, _("Edit File"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerButtons->Add( m_buttonEdit, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<property name="file">dialog_config_equfiles_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_cvpcb_config_equfile_base</property>
|
||||
<property name="namespace"></property>
|
||||
|
@ -216,7 +217,7 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -304,7 +305,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -392,7 +393,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -480,7 +481,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Nov 22 2017)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
|
|
@ -87,6 +87,10 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, CVPCB_MAINFRA
|
|||
SetBoard( new BOARD() );
|
||||
SetScreen( new PCB_SCREEN( GetPageSizeIU() ) );
|
||||
|
||||
// Don't show the default board solder mask clearance. Only the
|
||||
// footprint or pad clearance setting should be shown if it is not 0.
|
||||
GetBoard()->GetDesignSettings().m_SolderMaskMargin = 0;
|
||||
|
||||
LoadSettings( config() );
|
||||
|
||||
// Initialize grid id to a default value if not found in config or incorrect:
|
||||
|
@ -430,7 +434,7 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName )
|
|||
{
|
||||
LIB_ID fpid;
|
||||
|
||||
if( fpid.Parse( aFootprintName ) >= 0 )
|
||||
if( fpid.Parse( aFootprintName, LIB_ID::ID_PCB ) >= 0 )
|
||||
{
|
||||
DisplayInfoMessage( this, wxString::Format( _( "Footprint ID \"%s\" is not valid." ),
|
||||
GetChars( aFootprintName ) ) );
|
||||
|
|
|
@ -99,9 +99,8 @@ void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName, int aIndex )
|
|||
|
||||
if( !aFootprintName.IsEmpty() )
|
||||
{
|
||||
wxCHECK_RET( fpid.Parse( aFootprintName ) < 0,
|
||||
wxString::Format( _( "\"%s\" is not a valid LIB_ID." ),
|
||||
GetChars( aFootprintName ) ) );
|
||||
wxCHECK_RET( fpid.Parse( aFootprintName, LIB_ID::ID_PCB ) < 0,
|
||||
wxString::Format( _( "\"%s\" is not a valid LIB_ID." ), aFootprintName ) );
|
||||
}
|
||||
|
||||
component->SetFPID( fpid );
|
||||
|
|
|
@ -7,6 +7,15 @@ add_definitions( -DEESCHEMA )
|
|||
|
||||
if( KICAD_SPICE )
|
||||
set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} )
|
||||
|
||||
# Find out the exact libngspice file name
|
||||
get_filename_component( NGSPICE_DLL_REALPATH "${NGSPICE_DLL}" REALPATH )
|
||||
get_filename_component( NGSPICE_DLL_FILE "${NGSPICE_DLL_REALPATH}" NAME )
|
||||
|
||||
set_property( SOURCE sim/ngspice.cpp
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
NGSPICE_DLL_FILE="${NGSPICE_DLL_FILE}"
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories( BEFORE ${INC_BEFORE} )
|
||||
|
@ -315,6 +324,13 @@ target_link_libraries( eeschema_kiface
|
|||
${wxWidgets_LIBRARIES}
|
||||
${GDI_PLUS_LIBRARIES}
|
||||
)
|
||||
|
||||
if( KICAD_SPICE )
|
||||
target_link_libraries( eeschema_kiface
|
||||
${NGSPICE_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
||||
set_target_properties( eeschema_kiface PROPERTIES
|
||||
# Decorate OUTPUT_NAME with PREFIX and SUFFIX, creating something like
|
||||
# _eeschema.so, _eeschema.dll, or _eeschema.kiface
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<key>CFBundleVersion</key> <string></string>
|
||||
<key>CSResourcesFileMapped</key> <true/>
|
||||
<key>LSRequiresCarbon</key> <true/>
|
||||
<key>NSRequiresAquaSystemAppearance</key> <true/>
|
||||
<key>NSHumanReadableCopyright</key> <string></string>
|
||||
<key>NSHighResolutionCapable</key> <string>True</string>
|
||||
</dict>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2009-2016 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2004-2016 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2004-2018 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -104,10 +104,7 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
|||
{
|
||||
BLOCK_SELECTOR* block = &GetScreen()->m_BlockLocate;
|
||||
|
||||
if( !m_canvas->IsMouseCaptured() )
|
||||
{
|
||||
DisplayError( this, wxT( "HandleBlockPLace() : m_mouseCaptureCallback = NULL" ) );
|
||||
}
|
||||
wxCHECK_RET( m_canvas->IsMouseCaptured(), "No block mouse capture callback is set" );
|
||||
|
||||
if( block->GetCount() == 0 )
|
||||
{
|
||||
|
@ -478,7 +475,12 @@ void SCH_EDIT_FRAME::PasteListOfItems( wxDC* DC )
|
|||
destFn.MakeAbsolute( Prj().GetProjectPath() );
|
||||
|
||||
// Make sure any sheets in the block to be pasted will not cause recursion in
|
||||
// the destination sheet.
|
||||
// the destination sheet. Moreover new sheets create new sheetpaths, and component
|
||||
// alternante references must be created and cleared
|
||||
bool hasSheetPasted = false;
|
||||
// Keep trace of existing sheet paths. Paste block can modify this list
|
||||
SCH_SHEET_LIST initial_sheetpathList( g_RootSheet );
|
||||
|
||||
for( i = 0; i < m_blockItems.GetCount(); i++ )
|
||||
{
|
||||
item = (SCH_ITEM*) m_blockItems.GetItem( i );
|
||||
|
@ -512,6 +514,7 @@ void SCH_EDIT_FRAME::PasteListOfItems( wxDC* DC )
|
|||
|
||||
sheet->SetName( wxString::Format( wxT( "sheet%8.8lX" ), (unsigned long)timeStamp ) );
|
||||
sheet->SetTimeStamp( timeStamp );
|
||||
hasSheetPasted = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -550,6 +553,14 @@ void SCH_EDIT_FRAME::PasteListOfItems( wxDC* DC )
|
|||
|
||||
MoveItemsInList( picklist, GetScreen()->m_BlockLocate.GetMoveVector() );
|
||||
|
||||
if( hasSheetPasted )
|
||||
{
|
||||
// We clear annotation of new sheet paths.
|
||||
// Annotation of new components added in current sheet is already cleared.
|
||||
SCH_SCREENS screensList( g_RootSheet );
|
||||
screensList.ClearAnnotationOfNewSheetPaths( initial_sheetpathList );
|
||||
}
|
||||
|
||||
// Clear flags for all items.
|
||||
GetScreen()->ClearDrawingState();
|
||||
|
||||
|
|
|
@ -332,6 +332,23 @@ void SCH_EDIT_FRAME::EndSegment()
|
|||
|
||||
// Correct and remove segments that need to be merged.
|
||||
SchematicCleanUp( true );
|
||||
|
||||
for( auto item = GetScreen()->GetDrawItems(); item; item = item->Next() )
|
||||
{
|
||||
if( item->Type() != SCH_COMPONENT_T )
|
||||
continue;
|
||||
|
||||
std::vector< wxPoint > pts;
|
||||
item->GetConnectionPoints( pts );
|
||||
|
||||
if( pts.size() > 2 )
|
||||
continue;
|
||||
|
||||
for( auto i = pts.begin(); i != pts.end(); i++ )
|
||||
for( auto j = i + 1; j != pts.end(); j++ )
|
||||
TrimWire( *i, *j, true );
|
||||
}
|
||||
|
||||
for( auto i : new_ends )
|
||||
{
|
||||
if( screen->IsJunctionNeeded( i, true ) )
|
||||
|
@ -486,10 +503,8 @@ bool SCH_EDIT_FRAME::TrimWire( const wxPoint& aStart, const wxPoint& aEnd, bool
|
|||
{
|
||||
next_item = item->Next();
|
||||
|
||||
// Don't remove wires that are already deleted, are currently being
|
||||
// dragged or are just created
|
||||
if( item->GetFlags() &
|
||||
( STRUCT_DELETED | IS_DRAGGED | IS_NEW | IS_MOVED | SKIP_STRUCT ) )
|
||||
// Don't remove wires that are already deleted or are currently being dragged
|
||||
if( item->GetFlags() & ( STRUCT_DELETED | IS_DRAGGED | IS_MOVED | SKIP_STRUCT ) )
|
||||
continue;
|
||||
|
||||
if( item->Type() != SCH_LINE_T || item->GetLayer() != LAYER_WIRE )
|
||||
|
@ -498,7 +513,16 @@ bool SCH_EDIT_FRAME::TrimWire( const wxPoint& aStart, const wxPoint& aEnd, bool
|
|||
line = (SCH_LINE*) item;
|
||||
if( !IsPointOnSegment( line->GetStartPoint(), line->GetEndPoint(), aStart ) ||
|
||||
!IsPointOnSegment( line->GetStartPoint(), line->GetEndPoint(), aEnd ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Don't remove entire wires
|
||||
if( ( line->GetStartPoint() == aStart && line->GetEndPoint() == aEnd )
|
||||
|| ( line->GetStartPoint() == aEnd && line->GetEndPoint() == aStart ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Step 1: break the segment on one end. return_line remains line if not broken.
|
||||
// Ensure that *line points to the segment containing aEnd
|
||||
|
@ -777,6 +801,7 @@ SCH_NO_CONNECT* SCH_EDIT_FRAME::AddNoConnect( const wxPoint& aPosition )
|
|||
SetRepeatItem( no_connect );
|
||||
GetScreen()->Append( no_connect );
|
||||
SchematicCleanUp();
|
||||
GetScreen()->TestDanglingEnds();
|
||||
OnModify();
|
||||
m_canvas->Refresh();
|
||||
SaveCopyInUndoList( no_connect, UR_NEW );
|
||||
|
|
|
@ -119,7 +119,7 @@ PART_LIB* LIB_ALIAS::GetLib()
|
|||
|
||||
void LIB_ALIAS::SetName( const wxString& aName )
|
||||
{
|
||||
name = LIB_ID::FixIllegalChars( aName, LIB_ID::ID_ALIAS );
|
||||
name = LIB_ID::FixIllegalChars( aName, LIB_ID::ID_SCH );
|
||||
}
|
||||
|
||||
|
||||
|
@ -287,8 +287,7 @@ void LIB_PART::SetName( const wxString& aName )
|
|||
else
|
||||
m_aliases[0]->SetName( aName );
|
||||
|
||||
// LIB_ALIAS validates the name, reuse it instead of validating the name again
|
||||
wxString validatedName( m_aliases[0]->GetName() );
|
||||
wxString validatedName = LIB_ID::FixIllegalChars( aName, LIB_ID::ID_SCH );
|
||||
m_libId.SetLibItemName( validatedName, false );
|
||||
|
||||
LIB_FIELD& valueField = GetValueField();
|
||||
|
|
|
@ -718,7 +718,7 @@ int SCH_REFERENCE_LIST::CheckAnnotation( REPORTER& aReporter )
|
|||
SCH_REFERENCE::SCH_REFERENCE( SCH_COMPONENT* aComponent, LIB_PART* aLibPart,
|
||||
SCH_SHEET_PATH& aSheetPath )
|
||||
{
|
||||
wxASSERT( aComponent != NULL && aLibPart != NULL );
|
||||
wxASSERT( aComponent != NULL );
|
||||
|
||||
m_RootCmp = aComponent;
|
||||
m_Entry = aLibPart;
|
||||
|
@ -815,47 +815,43 @@ void SCH_REFERENCE::Split()
|
|||
wxString SCH_REFERENCE_LIST::Shorthand( std::vector<SCH_REFERENCE> aList )
|
||||
{
|
||||
wxString retVal;
|
||||
|
||||
std::sort( aList.begin(), aList.end(),
|
||||
[]( const SCH_REFERENCE& lhs, const SCH_REFERENCE& rhs ) -> bool
|
||||
{
|
||||
wxString lhRef( lhs.GetRef() << lhs.GetRefNumber() );
|
||||
wxString rhRef( rhs.GetRef() << rhs.GetRefNumber() );
|
||||
return RefDesStringCompare( lhRef, rhRef ) < 0;
|
||||
} );
|
||||
|
||||
size_t i = 0;
|
||||
size_t i = 0;
|
||||
|
||||
while( i < aList.size() )
|
||||
{
|
||||
wxString ref = aList[ i ].GetRef();
|
||||
int numRef = aList[ i ].m_NumRef;
|
||||
|
||||
size_t j = i;
|
||||
size_t range = 1;
|
||||
|
||||
while( j + 1 < aList.size() && aList[ j + 1 ].GetRef() == ref )
|
||||
j = j + 1;
|
||||
while( i + range < aList.size()
|
||||
&& aList[ i + range ].GetRef() == ref
|
||||
&& aList[ i + range ].m_NumRef == numRef + range )
|
||||
{
|
||||
range++;
|
||||
}
|
||||
|
||||
if( !retVal.IsEmpty() )
|
||||
retVal << wxT( ", " );
|
||||
|
||||
if( j == i )
|
||||
if( range == 1 )
|
||||
{
|
||||
retVal << ref << aList[ i ].GetRefNumber();
|
||||
}
|
||||
else if( j == i + 1 )
|
||||
else if( range == 2 )
|
||||
{
|
||||
retVal << ref << aList[ i ].GetRefNumber();
|
||||
retVal << wxT( ", " );
|
||||
retVal << ref << aList[ j ].GetRefNumber();
|
||||
retVal << ref << aList[ i + 1 ].GetRefNumber();
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal << ref << aList[ i ].GetRefNumber();
|
||||
retVal << wxT( " - " );
|
||||
retVal << ref << aList[ j ].GetRefNumber();
|
||||
retVal << wxT( "-" );
|
||||
retVal << ref << aList[ i + ( range - 1 ) ].GetRefNumber();
|
||||
}
|
||||
|
||||
i = j + 1;
|
||||
i+= range;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2004-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -58,6 +58,7 @@
|
|||
* \li \c \$PART: \c "reference" \c \$PAD: \c "pin name" Put cursor on the component pin.
|
||||
* \li \c \$NET: \c "netname" Highlight a specified net
|
||||
* <p>
|
||||
* They are a keyword followed by a quoted string.
|
||||
* @param cmdline = received command from Pcbnew
|
||||
*/
|
||||
void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
||||
|
@ -132,24 +133,26 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
|||
|
||||
std::string FormatProbeItem( EDA_ITEM* aItem, SCH_COMPONENT* aPart )
|
||||
{
|
||||
// This is a keyword followed by a quoted string.
|
||||
|
||||
// Cross probing to Pcbnew if a pin or a component is found
|
||||
switch( aItem->Type() )
|
||||
{
|
||||
case SCH_FIELD_T:
|
||||
case LIB_FIELD_T:
|
||||
if( aPart )
|
||||
return StrPrintf( "$PART: %s",
|
||||
return StrPrintf( "$PART: \"%s\"",
|
||||
TO_UTF8( aPart->GetField( REFERENCE )->GetText() ) );
|
||||
break;
|
||||
|
||||
case SCH_COMPONENT_T:
|
||||
aPart = (SCH_COMPONENT*) aItem;
|
||||
return StrPrintf( "$PART: %s", TO_UTF8( aPart->GetField( REFERENCE )->GetText() ) );
|
||||
return StrPrintf( "$PART: \"%s\"", TO_UTF8( aPart->GetField( REFERENCE )->GetText() ) );
|
||||
|
||||
case SCH_SHEET_T:
|
||||
{
|
||||
SCH_SHEET* sheet = (SCH_SHEET*)aItem;
|
||||
return StrPrintf( "$SHEET: %8.8lX", (unsigned long) sheet->GetTimeStamp() );
|
||||
return StrPrintf( "$SHEET: \"%8.8lX\"", (unsigned long) sheet->GetTimeStamp() );
|
||||
}
|
||||
|
||||
case LIB_PIN_T:
|
||||
|
@ -161,12 +164,12 @@ std::string FormatProbeItem( EDA_ITEM* aItem, SCH_COMPONENT* aPart )
|
|||
|
||||
if( !pin->GetNumber().IsEmpty() )
|
||||
{
|
||||
return StrPrintf( "$PIN: %s $PART: %s", TO_UTF8( pin->GetNumber() ),
|
||||
return StrPrintf( "$PIN: \"%s\" $PART: \"%s\"", TO_UTF8( pin->GetNumber() ),
|
||||
TO_UTF8( aPart->GetField( REFERENCE )->GetText() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return StrPrintf( "$PART: %s", TO_UTF8( aPart->GetField( REFERENCE )->GetText() ) );
|
||||
return StrPrintf( "$PART: \"%s\"", TO_UTF8( aPart->GetField( REFERENCE )->GetText() ) );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -205,7 +208,9 @@ void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* aObjectToSync, SCH_COMPONENT
|
|||
|
||||
void SCH_EDIT_FRAME::SendCrossProbeNetName( const wxString& aNetName )
|
||||
{
|
||||
std::string packet = StrPrintf( "$NET: %s", TO_UTF8( aNetName ) );
|
||||
// The command is a keyword followed by a quoted string.
|
||||
|
||||
std::string packet = StrPrintf( "$NET: \"%s\"", TO_UTF8( aNetName ) );
|
||||
|
||||
if( packet.size() )
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -159,7 +159,7 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
|
|||
bButtonsSizer->Add( m_btnClose, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerDldOptions->Add( bButtonsSizer, 0, wxALIGN_RIGHT, 5 );
|
||||
bSizerDldOptions->Add( bButtonsSizer, 0, 0, 5 );
|
||||
|
||||
|
||||
bupperSizer->Add( bSizerDldOptions, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
|
|
@ -1418,7 +1418,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_RIGHT</property>
|
||||
<property name="flag"></property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size">160,-1</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
|
|
@ -43,8 +43,8 @@ Full documentation:</h1>
|
|||
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
||||
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><span style="font-weight: normal">The
|
||||
</span><i><b>Eeschema documentation</b></i> <span style="font-weight: normal">describes
|
||||
this </span><b>intermediate netlist and gives examples<br></b><span style="font-weight: normal">See
|
||||
also </span><i><b>https://answers.launchpad.net/kicad/+faq/2265</b></i></font></font></p>
|
||||
this </span><b>intermediate netlist and gives examples<br></b><span style="font-weight: normal">See </span>
|
||||
<i><b>http://docs.kicad-pcb.org/stable/en/eeschema.html#creating-customized-netlists-and-bom-files</b></i></font></font></p>
|
||||
<h1 class="western"><i>2 - </i>The intermediate Netlist File</h1>
|
||||
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt">BOM
|
||||
|
|
|
@ -301,7 +301,7 @@ void DIALOG_CHOOSE_COMPONENT::ShowFootprint( wxString const& aName )
|
|||
{
|
||||
LIB_ID lib_id;
|
||||
|
||||
if( lib_id.Parse( aName ) == -1 && lib_id.IsValid() )
|
||||
if( lib_id.Parse( aName, LIB_ID::ID_PCB ) == -1 && lib_id.IsValid() )
|
||||
{
|
||||
m_fp_view_ctrl->ClearStatus();
|
||||
m_fp_view_ctrl->CacheFootprint( lib_id );
|
||||
|
|
|
@ -258,7 +258,9 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnTestChipName( wxCommandEvent& event )
|
|||
wxString msg;
|
||||
wxString partname = chipnameTextCtrl->GetValue();
|
||||
|
||||
if( id.Parse( partname ) != -1 || !id.IsValid() )
|
||||
id.Parse( partname, LIB_ID::ID_SCH );
|
||||
|
||||
if( !id.IsValid() )
|
||||
{
|
||||
msg.Printf( _( "\"%s\" is not a valid library symbol identifier." ), partname );
|
||||
DisplayError( this, msg );
|
||||
|
@ -363,7 +365,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions()
|
|||
|
||||
tmp.Replace( wxT( " " ), wxT( "_" ) );
|
||||
|
||||
id.Parse( tmp );
|
||||
id.Parse( tmp, LIB_ID::ID_SCH );
|
||||
|
||||
// Save current flags which could be modified by next change settings
|
||||
STATUS_FLAGS flags = m_cmp->GetFlags();
|
||||
|
|
|
@ -358,7 +358,7 @@ bool DIALOG_EDIT_COMPONENTS_LIBID::validateLibIds()
|
|||
|
||||
// a new lib id is found. validate this new value
|
||||
LIB_ID id;
|
||||
id.Parse( new_libid );
|
||||
id.Parse( new_libid, LIB_ID::ID_SCH );
|
||||
|
||||
if( !id.IsValid() )
|
||||
{
|
||||
|
@ -430,7 +430,8 @@ void DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton( wxCommandEvent& event )
|
|||
wxString orphanLibid = m_grid->GetCellValue( m_OrphansRowIndexes[ii], COL_CURR_LIBID );
|
||||
int grid_row_idx = m_OrphansRowIndexes[ii]; //row index in m_grid for the current item
|
||||
|
||||
LIB_ID curr_libid( orphanLibid );
|
||||
LIB_ID curr_libid;
|
||||
curr_libid.Parse( orphanLibid, LIB_ID::ID_SCH, true );
|
||||
wxString symbName = curr_libid.GetLibItemName();
|
||||
// number of full LIB_ID candidates (because we search for a symbol name
|
||||
// inside all avaiable libraries, perhaps the same symbol name can be found
|
||||
|
@ -438,7 +439,7 @@ void DIALOG_EDIT_COMPONENTS_LIBID::onClickOrphansButton( wxCommandEvent& event )
|
|||
int libIdCandidateCount = 0;
|
||||
candidateSymbNames.Clear();
|
||||
|
||||
// now try to fin a candidate
|
||||
// now try to find a candidate
|
||||
for( auto &lib : libs )
|
||||
{
|
||||
aliasNames.Clear();
|
||||
|
@ -555,7 +556,7 @@ bool DIALOG_EDIT_COMPONENTS_LIBID::TransferDataFromWindow()
|
|||
// a new lib id is found and was already validated.
|
||||
// set this new value
|
||||
LIB_ID id;
|
||||
id.Parse( new_libid );
|
||||
id.Parse( new_libid, LIB_ID::ID_SCH, true );
|
||||
|
||||
for( CMP_CANDIDATE& cmp : m_components )
|
||||
{
|
||||
|
@ -592,7 +593,7 @@ void DIALOG_EDIT_COMPONENTS_LIBID::revertChanges()
|
|||
continue;
|
||||
|
||||
LIB_ID id;
|
||||
id.Parse( cmp.m_InitialLibId );
|
||||
id.Parse( cmp.m_InitialLibId, LIB_ID::ID_SCH, true );
|
||||
|
||||
if( cmp.m_Component->GetLibId() != id )
|
||||
{
|
||||
|
|
|
@ -174,13 +174,14 @@ void DIALOG_LABEL_EDITOR::InitDialog()
|
|||
{
|
||||
m_textLabel = m_textLabelMultiLine;
|
||||
m_textLabelSingleLine->Show( false );
|
||||
m_textControlSizer->AddGrowableRow( 0 );
|
||||
m_staticTextLabel->Show( false );
|
||||
multiLine = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_textLabel = m_textLabelSingleLine;
|
||||
m_textLabelMultiLine->Show( false );
|
||||
m_staticTextText->Show( false );
|
||||
wxTextValidator* validator = (wxTextValidator*) m_textLabel->GetValidator();
|
||||
|
||||
// Add invalid label characters to this list.
|
||||
|
|
|
@ -16,32 +16,33 @@ DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID
|
|||
wxBoxSizer* bMainSizer;
|
||||
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_textControlSizer = new wxFlexGridSizer( 2, 2, 3, 3 );
|
||||
m_textControlSizer = new wxFlexGridSizer( 3, 2, 3, 3 );
|
||||
m_textControlSizer->AddGrowableCol( 1 );
|
||||
m_textControlSizer->AddGrowableRow( 1 );
|
||||
m_textControlSizer->SetFlexibleDirection( wxBOTH );
|
||||
m_textControlSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticText1 = new wxStaticText( this, wxID_ANY, _("&Text:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText1->Wrap( -1 );
|
||||
m_staticText1->SetToolTip( _("Enter the text to be used within the schematic") );
|
||||
m_staticTextLabel = new wxStaticText( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextLabel->Wrap( -1 );
|
||||
m_staticTextLabel->SetToolTip( _("Enter the text to be used within the schematic") );
|
||||
|
||||
m_textControlSizer->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
|
||||
|
||||
wxBoxSizer* bSizeText;
|
||||
bSizeText = new wxBoxSizer( wxVERTICAL );
|
||||
m_textControlSizer->Add( m_staticTextLabel, 0, wxRIGHT, 3 );
|
||||
|
||||
m_textLabelSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER|wxTE_RICH );
|
||||
m_textLabelSingleLine->SetValidator( wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, &m_labelText ) );
|
||||
|
||||
bSizeText->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 );
|
||||
m_textControlSizer->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 );
|
||||
|
||||
m_staticTextText = new wxStaticText( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextText->Wrap( -1 );
|
||||
m_staticTextText->SetToolTip( _("Enter the text to be used within the schematic") );
|
||||
|
||||
m_textControlSizer->Add( m_staticTextText, 0, wxRIGHT, 5 );
|
||||
|
||||
m_textLabelMultiLine = new wxTextCtrl( this, wxID_VALUEMULTI, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
|
||||
m_textLabelMultiLine->SetMinSize( wxSize( -1,60 ) );
|
||||
|
||||
bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 );
|
||||
|
||||
|
||||
m_textControlSizer->Add( bSizeText, 1, wxEXPAND, 3 );
|
||||
m_textControlSizer->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 );
|
||||
|
||||
m_SizeTitle = new wxStaticText( this, wxID_ANY, _("&Size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SizeTitle->Wrap( -1 );
|
||||
|
@ -51,7 +52,7 @@ DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID
|
|||
bSizeCtrlSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_TextSize = new wxTextCtrl( this, wxID_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizeCtrlSizer->Add( m_TextSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 3 );
|
||||
bSizeCtrlSizer->Add( m_TextSize, 0, wxLEFT|wxRIGHT|wxEXPAND, 3 );
|
||||
|
||||
m_staticSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticSizeUnits->Wrap( -1 );
|
||||
|
|
|
@ -102,17 +102,17 @@
|
|||
<property name="cols">2</property>
|
||||
<property name="flexible_direction">wxBOTH</property>
|
||||
<property name="growablecols">1</property>
|
||||
<property name="growablerows"></property>
|
||||
<property name="growablerows">1</property>
|
||||
<property name="hgap">3</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_textControlSizer</property>
|
||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="rows">2</property>
|
||||
<property name="rows">3</property>
|
||||
<property name="vgap">3</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="flag">wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -142,7 +142,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">&Text:</property>
|
||||
<property name="label">Text:</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText1</property>
|
||||
<property name="name">m_staticTextLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -195,195 +195,267 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_VALUESINGLE</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_textLabelSingleLine</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxTE_PROCESS_ENTER|wxTE_RICH</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type">wxString</property>
|
||||
<property name="validator_style">wxFILTER_EXCLUDE_CHAR_LIST</property>
|
||||
<property name="validator_type">wxTextValidator</property>
|
||||
<property name="validator_variable">m_labelText</property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter">OnEnterKey</event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Text:</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticTextText</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Enter the text to be used within the schematic</property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="name">bSizeText</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_VALUESINGLE</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_textLabelSingleLine</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxTE_PROCESS_ENTER|wxTE_RICH</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type">wxString</property>
|
||||
<property name="validator_style">wxFILTER_EXCLUDE_CHAR_LIST</property>
|
||||
<property name="validator_type">wxTextValidator</property>
|
||||
<property name="validator_variable">m_labelText</property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter">OnEnterKey</event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_VALUEMULTI</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,60</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_textLabelMultiLine</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxTE_MULTILINE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_VALUEMULTI</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,60</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_textLabelMultiLine</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxTE_MULTILINE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
|
@ -480,7 +552,7 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
|
|
@ -43,8 +43,9 @@ class DIALOG_LABEL_EDITOR_BASE : public DIALOG_SHIM
|
|||
};
|
||||
|
||||
wxFlexGridSizer* m_textControlSizer;
|
||||
wxStaticText* m_staticText1;
|
||||
wxStaticText* m_staticTextLabel;
|
||||
wxTextCtrl* m_textLabelSingleLine;
|
||||
wxStaticText* m_staticTextText;
|
||||
wxTextCtrl* m_textLabelMultiLine;
|
||||
wxStaticText* m_SizeTitle;
|
||||
wxTextCtrl* m_TextSize;
|
||||
|
|
|
@ -203,16 +203,26 @@ public:
|
|||
if( aCol == REFERENCE || aCol == QUANTITY_COLUMN )
|
||||
{
|
||||
// Remove duplicates (other units of multi-unit parts)
|
||||
auto logicalEnd = std::unique( references.begin(), references.end(),
|
||||
[]( const SCH_REFERENCE& l, const SCH_REFERENCE& r )
|
||||
{
|
||||
// If unannotated then we can't tell what units belong together
|
||||
// so we have to leave them all
|
||||
if( l.GetRefNumber() == wxT( "?" ) )
|
||||
return false;
|
||||
std::sort( references.begin(), references.end(),
|
||||
[]( const SCH_REFERENCE& l, const SCH_REFERENCE& r ) -> bool
|
||||
{
|
||||
wxString l_ref( l.GetRef() << l.GetRefNumber() );
|
||||
wxString r_ref( r.GetRef() << r.GetRefNumber() );
|
||||
return RefDesStringCompare( l_ref, r_ref ) < 0;
|
||||
} );
|
||||
|
||||
return( l.GetRef() == r.GetRef() && l.GetRefNumber() == r.GetRefNumber() );
|
||||
} );
|
||||
auto logicalEnd = std::unique( references.begin(), references.end(),
|
||||
[]( const SCH_REFERENCE& l, const SCH_REFERENCE& r ) -> bool
|
||||
{
|
||||
// If unannotated then we can't tell what units belong together
|
||||
// so we have to leave them all
|
||||
if( l.GetRefNumber() == wxT( "?" ) )
|
||||
return false;
|
||||
|
||||
wxString l_ref( l.GetRef() << l.GetRefNumber() );
|
||||
wxString r_ref( r.GetRef() << r.GetRefNumber() );
|
||||
return l_ref == r_ref;
|
||||
} );
|
||||
references.erase( logicalEnd, references.end() );
|
||||
}
|
||||
|
||||
|
@ -699,8 +709,10 @@ void DIALOG_FIELDS_EDITOR_GLOBAL::LoadFieldNames()
|
|||
for( auto fieldName : userFieldNames )
|
||||
AddField( fieldName, true, false );
|
||||
|
||||
// Add any templateFieldNames which aren't already present in the userFieldNames
|
||||
for( auto templateFieldName : m_parent->GetTemplateFieldNames() )
|
||||
AddField( templateFieldName.m_Name, false, false );
|
||||
if( userFieldNames.count( templateFieldName.m_Name ) == 0 )
|
||||
AddField( templateFieldName.m_Name, false, false );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -81,10 +81,10 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
|
|||
sbSizerPinSharing = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Sharing:") ), wxVERTICAL );
|
||||
|
||||
m_checkApplyToAllParts = new wxCheckBox( sbSizerPinSharing->GetStaticBox(), wxID_ANY, _("Common to all &units in symbol"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerPinSharing->Add( m_checkApplyToAllParts, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
sbSizerPinSharing->Add( m_checkApplyToAllParts, 0, wxALL, 3 );
|
||||
|
||||
m_checkApplyToAllConversions = new wxCheckBox( sbSizerPinSharing->GetStaticBox(), wxID_ANY, _("Common to all body &styles (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerPinSharing->Add( m_checkApplyToAllConversions, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
sbSizerPinSharing->Add( m_checkApplyToAllConversions, 0, wxALL, 3 );
|
||||
|
||||
|
||||
boarderSizer->Add( sbSizerPinSharing, 0, wxEXPAND|wxALL, 5 );
|
||||
|
@ -172,7 +172,7 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
|
|||
|
||||
bRightSizer->Add( fgSizerTextsSizes, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_panelShowPin = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
|
||||
m_panelShowPin = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL|wxBORDER_SUNKEN );
|
||||
m_panelShowPin->SetMinSize( wxSize( 150,150 ) );
|
||||
|
||||
bRightSizer->Add( m_panelShowPin, 1, wxEXPAND | wxALL, 5 );
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="13" />
|
||||
<FileVersion major="1" minor="14" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
|
@ -55,13 +55,20 @@
|
|||
<property name="window_style"></property>
|
||||
<event name="OnActivate"></event>
|
||||
<event name="OnActivateApp"></event>
|
||||
<event name="OnAuiFindManager"></event>
|
||||
<event name="OnAuiPaneActivated"></event>
|
||||
<event name="OnAuiPaneButton"></event>
|
||||
<event name="OnAuiPaneClose"></event>
|
||||
<event name="OnAuiPaneMaximize"></event>
|
||||
<event name="OnAuiPaneRestore"></event>
|
||||
<event name="OnAuiRender"></event>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnClose">OnCloseDialog</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -76,17 +83,23 @@
|
|||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMaximize"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnMove"></event>
|
||||
<event name="OnMoveEnd"></event>
|
||||
<event name="OnMoveStart"></event>
|
||||
<event name="OnMoving"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnShow"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
|
@ -161,6 +174,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Pin &name:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -186,7 +200,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -273,7 +294,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -335,6 +363,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">ID_M_STATICTEXTPADNAME</property>
|
||||
<property name="label">Pin n&umber:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -360,7 +389,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -447,7 +483,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -509,6 +552,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">&Orientation:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -534,7 +578,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -622,7 +673,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCombobox">OnPropertiesChange</event>
|
||||
<event name="OnComboboxCloseup"></event>
|
||||
<event name="OnComboboxDropdown"></event>
|
||||
|
@ -685,6 +743,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">&Electrical type:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -710,7 +769,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -798,7 +864,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCombobox">OnPropertiesChange</event>
|
||||
<event name="OnComboboxCloseup"></event>
|
||||
<event name="OnComboboxDropdown"></event>
|
||||
|
@ -861,6 +934,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Graphic &Style:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -886,7 +960,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -974,7 +1055,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCombobox">OnPropertiesChange</event>
|
||||
<event name="OnComboboxCloseup"></event>
|
||||
<event name="OnComboboxDropdown"></event>
|
||||
|
@ -1030,7 +1118,7 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1090,7 +1178,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox">OnPropertiesChange</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -1118,7 +1213,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -1178,7 +1273,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox">OnPropertiesChange</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -1281,7 +1383,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnCheckBox">OnPropertiesChange</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
|
@ -1371,6 +1480,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">ID_M_STATICTEXTNAMESIZE</property>
|
||||
<property name="label">N&ame text size:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -1396,7 +1506,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1483,7 +1600,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1545,6 +1669,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">ID_M_STATICNAMETEXTSIZEUNITS</property>
|
||||
<property name="label">units</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -1570,7 +1695,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1628,6 +1760,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">ID_M_STATICTEXTPADNAMESIZE</property>
|
||||
<property name="label">Number te&xt size:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -1653,7 +1786,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1740,7 +1880,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1802,6 +1949,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">ID_M_STATICNUMBERTEXTSIZEUNITS</property>
|
||||
<property name="label">units</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -1827,7 +1975,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1885,6 +2040,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">ID_M_STATICTEXTPINLEN</property>
|
||||
<property name="label">&Length:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -1910,7 +2066,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -1997,7 +2160,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2059,6 +2229,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">ID_M_STATICLENGTHUNITS</property>
|
||||
<property name="label">units</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -2084,7 +2255,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2142,6 +2320,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Pin Pos X:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -2167,7 +2346,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2254,7 +2440,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2316,6 +2509,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">units</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -2341,7 +2535,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2399,6 +2600,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Pin Pos Y:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -2424,7 +2626,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2511,7 +2720,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2573,6 +2789,7 @@
|
|||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">units</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -2598,7 +2815,14 @@
|
|||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2679,8 +2903,15 @@
|
|||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER|wxTAB_TRAVERSAL</property>
|
||||
<property name="window_style">wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL|wxBORDER_SUNKEN</property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -2765,7 +2996,14 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnAux1DClick"></event>
|
||||
<event name="OnAux1Down"></event>
|
||||
<event name="OnAux1Up"></event>
|
||||
<event name="OnAux2DClick"></event>
|
||||
<event name="OnAux2Down"></event>
|
||||
<event name="OnAux2Up"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCharHook"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Jul 11 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 19 2018)
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -84,7 +84,7 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
|
|||
sOptionsSizer->Add( m_CommonUnit, 0, wxALL, 5 );
|
||||
|
||||
m_CommonConvert = new wxCheckBox( sOptionsSizer->GetStaticBox(), wxID_ANY, _("Common to all body styles"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sOptionsSizer->Add( m_CommonConvert, 0, wxALIGN_RIGHT|wxBOTTOM|wxEXPAND|wxLEFT, 5 );
|
||||
sOptionsSizer->Add( m_CommonConvert, 0, wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_Invisible = new wxCheckBox( sOptionsSizer->GetStaticBox(), wxID_ANY, _("Invisible"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sOptionsSizer->Add( m_Invisible, 0, wxALIGN_LEFT|wxBOTTOM|wxLEFT, 5 );
|
||||
|
@ -123,7 +123,7 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
|
|||
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
|
||||
m_sdbSizerButtons->Realize();
|
||||
|
||||
bMainSizer->Add( m_sdbSizerButtons, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
|
||||
bMainSizer->Add( m_sdbSizerButtons, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_RIGHT, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bMainSizer );
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue