|
KiCad PCB EDA Suite
|
#include <cmath>#include <string>#include <map>#include <wx/filename.h>#include <wx/log.h>#include <wx/string.h>#include "plugins/3d/3d_plugin.h"#include "plugins/3dapi/ifsg_all.h"#include "idf_parser.h"#include "vrml_layer.h"Go to the source code of this file.
Classes | |
| class | LOCALESWITCH |
| struct | FILE_DATA |
Macros | |
| #define | PLUGIN_3D_IDF_MAJOR 1 |
| #define | PLUGIN_3D_IDF_MINOR 0 |
| #define | PLUGIN_3D_IDF_PATCH 0 |
| #define | PLUGIN_3D_IDF_REVNO 0 |
| #define | NCOLORS 6 |
| #define | NEXTS 4 |
| #define | NFILS 2 |
Functions | |
| static SCENEGRAPH * | loadIDFOutline (const wxString &aFileName) |
| static SCENEGRAPH * | loadIDFBoard (const wxString &aFileName) |
| static SCENEGRAPH * | addOutline (IDF3_COMP_OUTLINE *outline, int idxColor, SGNODE *aParent) |
| static SCENEGRAPH * | makeBoard (IDF3_BOARD &brd, SGNODE *aParent) |
| static bool | makeComponents (IDF3_BOARD &brd, SGNODE *aParent) |
| static bool | makeOtherOutlines (IDF3_BOARD &brd, SGNODE *aParent) |
| static bool | getOutlineModel (VRML_LAYER &model, const std::list< IDF_OUTLINE * > *items) |
| static bool | addSegment (VRML_LAYER &model, IDF_SEGMENT *seg, int icont, int iseg) |
| static SCENEGRAPH * | vrmlToSG (VRML_LAYER &vpcb, int idxColor, SGNODE *aParent, double top, double bottom) |
| static SGNODE * | getColor (IFSG_SHAPE &shape, int colorIdx) |
| const char * | GetKicadPluginName (void) |
| Return the name of the plugin instance, for example IDFv3. | |
| void | GetPluginVersion (unsigned char *Major, unsigned char *Minor, unsigned char *Patch, unsigned char *Revision) |
| Retrieve the version of the instantiated plugin for informational purposes. | |
| int | GetNExtensions (void) |
| char const * | GetModelExtension (int aIndex) |
| int | GetNFilters (void) |
| char const * | GetFileFilter (int aIndex) |
| bool | CanRender (void) |
| SCENEGRAPH * | Load (char const *aFileName) |
| Read a model file and creates a generic display structure. | |
Variables | |
| const wxChar *const | traceIdfPlugin = wxT( "KICAD_IDF_PLUGIN" ) |
| Flag to enable IDF plugin trace output. | |
| static char | ext0 [] = "idf" |
| static char | ext1 [] = "emn" |
| static char | ext2 [] = "IDF" |
| static char | ext3 [] = "EMN" |
| static char | fil0 [] = "IDF (*.idf;*.IDF)|*.idf;*.IDF" |
| static char | fil1 [] = "IDF BRD (*.emn;*.EMN)|*.emn;*.EMN" |
| static struct FILE_DATA | file_data |
| #define NCOLORS 6 |
Definition at line 42 of file s3d_plugin_idf.cpp.
Referenced by getColor().
| #define NEXTS 4 |
Definition at line 218 of file s3d_plugin_idf.cpp.
Referenced by GetModelExtension(), and GetNExtensions().
| #define NFILS 2 |
Definition at line 223 of file s3d_plugin_idf.cpp.
Referenced by GetFileFilter(), and GetNFilters().
| #define PLUGIN_3D_IDF_MAJOR 1 |
Definition at line 35 of file s3d_plugin_idf.cpp.
Referenced by GetPluginVersion().
| #define PLUGIN_3D_IDF_MINOR 0 |
Definition at line 36 of file s3d_plugin_idf.cpp.
Referenced by GetPluginVersion().
| #define PLUGIN_3D_IDF_PATCH 0 |
Definition at line 37 of file s3d_plugin_idf.cpp.
Referenced by GetPluginVersion().
| #define PLUGIN_3D_IDF_REVNO 0 |
Definition at line 38 of file s3d_plugin_idf.cpp.
Referenced by GetPluginVersion().
|
static |
Definition at line 570 of file s3d_plugin_idf.cpp.
References getOutlineModel(), top(), traceIdfPlugin, and vrmlToSG().
Referenced by loadIDFOutline(), and makeComponents().
|
static |
Definition at line 403 of file s3d_plugin_idf.cpp.
References model, and traceIdfPlugin.
Referenced by DIPTRACE::PCB_PARSER::CreateBoardOutline(), getOutlineModel(), makeWireFromChain(), PCB_IO_EASYEDAPRO_PARSER::ParsePoly(), and DOGBONE_CORNER_ROUTINE::ProcessLinePair().
| bool CanRender | ( | void | ) |
Definition at line 291 of file s3d_plugin_idf.cpp.
|
static |
Definition at line 106 of file s3d_plugin_idf.cpp.
References IFSG_NODE::GetRawPtr(), NCOLORS, IFSG_APPEARANCE::SetDiffuse(), IFSG_APPEARANCE::SetShininess(), and IFSG_APPEARANCE::SetSpecular().
Referenced by processSolidOrShell(), and vrmlToSG().
| char const * GetFileFilter | ( | int | aIndex | ) |
Definition at line 282 of file s3d_plugin_idf.cpp.
| const char * GetKicadPluginName | ( | void | ) |
Return the name of the plugin instance, for example IDFv3.
This string may be used to check for name conflicts or to display informational messages about loaded plugins. This method must be implemented in specific instantiations of a plugin class.
Definition at line 191 of file s3d_plugin_idf.cpp.
| char const * GetModelExtension | ( | int | aIndex | ) |
| aIndex | is the extension to return; valid values are 0 to GetNExtensions() - 1. |
Definition at line 267 of file s3d_plugin_idf.cpp.
| int GetNExtensions | ( | void | ) |
Definition at line 261 of file s3d_plugin_idf.cpp.
| int GetNFilters | ( | void | ) |
Definition at line 276 of file s3d_plugin_idf.cpp.
|
static |
Definition at line 336 of file s3d_plugin_idf.cpp.
References addSegment(), model, and traceIdfPlugin.
Referenced by addOutline(), makeBoard(), and makeOtherOutlines().
| void GetPluginVersion | ( | unsigned char * | Major, |
| unsigned char * | Minor, | ||
| unsigned char * | Patch, | ||
| unsigned char * | Revision ) |
Retrieve the version of the instantiated plugin for informational purposes.
Do not confuse this with GetClassVersion which is used to determine API compatibility.
| Major | will hold the Plugin Major version. |
| Minor | will hold the Plugin Minor version. |
| Patch | will hold the Plugin Patch level. |
| Revision | will hold the Plugin Revision. |
Definition at line 197 of file s3d_plugin_idf.cpp.
| SCENEGRAPH * Load | ( | char const * | aFileName | ) |
Read a model file and creates a generic display structure.
| aFileName | is the full path of the model file. |
Definition at line 298 of file s3d_plugin_idf.cpp.
|
static |
Definition at line 628 of file s3d_plugin_idf.cpp.
References IFSG_NODE::Destroy(), IFSG_NODE::GetRawPtr(), makeBoard(), makeComponents(), makeOtherOutlines(), and traceIdfPlugin.
Referenced by Load().
|
static |
Definition at line 601 of file s3d_plugin_idf.cpp.
References addOutline(), and traceIdfPlugin.
Referenced by Load().
|
static |
Definition at line 671 of file s3d_plugin_idf.cpp.
References comp, getOutlineModel(), top(), and vrmlToSG().
Referenced by loadIDFBoard().
|
static |
Definition at line 734 of file s3d_plugin_idf.cpp.
References std::abs(), IFSG_NODE::AddChildNode(), addOutline(), IFSG_NODE::AddRefNode(), IFSG_TRANSFORM::Attach(), comp, IFSG_NODE::GetParent(), M_PI, IFSG_TRANSFORM::SetRotation(), IFSG_TRANSFORM::SetTranslation(), and vA.
Referenced by loadIDFBoard().
|
static |
Definition at line 855 of file s3d_plugin_idf.cpp.
References std::abs(), comp, getOutlineModel(), top(), and vrmlToSG().
Referenced by loadIDFBoard().
|
static |
Definition at line 438 of file s3d_plugin_idf.cpp.
References IFSG_COORDS::AddCoord(), IFSG_INDEX::AddIndex(), IFSG_NORMALS::AddNormal(), IFSG_NODE::AddRefNode(), S3D::CalcTriNorm(), getColor(), IFSG_NODE::GetRawPtr(), IFSG_COORDINDEX::NewNode(), IFSG_COORDS::NewNode(), IFSG_FACESET::NewNode(), IFSG_NORMALS::NewNode(), IFSG_SHAPE::NewNode(), IFSG_COORDS::SetCoordsList(), IFSG_INDEX::SetIndices(), SGVECTOR::SetVector(), top(), and traceIdfPlugin.
Referenced by addOutline(), makeBoard(), and makeOtherOutlines().
|
static |
Definition at line 226 of file s3d_plugin_idf.cpp.
Referenced by FILE_DATA::FILE_DATA().
|
static |
Definition at line 227 of file s3d_plugin_idf.cpp.
Referenced by FILE_DATA::FILE_DATA().
|
static |
Definition at line 234 of file s3d_plugin_idf.cpp.
Referenced by FILE_DATA::FILE_DATA().
|
static |
Definition at line 235 of file s3d_plugin_idf.cpp.
Referenced by FILE_DATA::FILE_DATA().
|
static |
Definition at line 236 of file s3d_plugin_idf.cpp.
Referenced by FILE_DATA::FILE_DATA().
|
static |
Definition at line 237 of file s3d_plugin_idf.cpp.
Referenced by FILE_DATA::FILE_DATA().
|
static |
Referenced by GetFileFilter(), GetModelExtension(), GetNExtensions(), and GetNFilters().