LibrePCB Developers Documentation
OccModel Class Referencefinal

3D model implemented with OpenCascade More...

#include <occmodel.h>

+ Collaboration diagram for OccModel:

Classes

struct  Data
 

Public Types

typedef std::tuple< qreal, qreal, qreal > Color
 

Public Member Functions

 OccModel () noexcept=delete
 
 OccModel (const OccModel &other)=delete
 
 ~OccModel () noexcept
 
void addToAssembly (const OccModel &model, const Point3D &pos, const Angle3D &rot, const Transform &transform, const QString &name)
 
void saveAsStep (const QString &name, const FilePath &fp) const
 
QMap< Color, QVector< QVector3D > > tesselate () const
 
OccModeloperator= (const OccModel &rhs)=delete
 

Static Public Member Functions

static bool isAvailable () noexcept
 
static QString getOccVersionString () noexcept
 
static void setVerboseOutput (bool verbose) noexcept
 
static std::unique_ptr< OccModelcreateAssembly (const QString &name)
 
static std::unique_ptr< OccModelcreateBoard (const Path &outline, const QVector< Path > &holes, const PositiveLength &thickness, const QColor &color)
 
static std::unique_ptr< OccModelloadStep (const QByteArray content)
 
static QByteArray minifyStep (const QByteArray &content)
 

Private Member Functions

 OccModel (std::unique_ptr< Data > data)
 

Static Private Member Functions

static void initOpenCascade ()
 
static QString cleanString (const QString &str)
 
static void throwNotAvailable ()
 

Private Attributes

std::unique_ptr< DatamImpl
 

Static Private Attributes

static bool sOutputVerbosityConfigured = false
 

Detailed Description

3D model implemented with OpenCascade

Member Typedef Documentation

◆ Color

typedef std::tuple<qreal, qreal, qreal> Color

Constructor & Destructor Documentation

◆ OccModel() [1/3]

OccModel ( )
deletenoexcept
+ Here is the caller graph for this function:

◆ OccModel() [2/3]

OccModel ( const OccModel other)
delete

◆ ~OccModel()

~OccModel ( )
noexcept

◆ OccModel() [3/3]

OccModel ( std::unique_ptr< Data data)
explicitprivate

Member Function Documentation

◆ addToAssembly()

void addToAssembly ( const OccModel model,
const Point3D pos,
const Angle3D rot,
const Transform transform,
const QString &  name 
)
+ Here is the call graph for this function:

◆ saveAsStep()

void saveAsStep ( const QString &  name,
const FilePath fp 
) const
+ Here is the call graph for this function:

◆ tesselate()

QMap< OccModel::Color, QVector< QVector3D > > tesselate ( ) const

◆ isAvailable()

bool isAvailable ( )
staticnoexcept

◆ getOccVersionString()

QString getOccVersionString ( )
staticnoexcept
+ Here is the caller graph for this function:

◆ setVerboseOutput()

void setVerboseOutput ( bool  verbose)
staticnoexcept
+ Here is the caller graph for this function:

◆ createAssembly()

std::unique_ptr< OccModel > createAssembly ( const QString &  name)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createBoard()

std::unique_ptr< OccModel > createBoard ( const Path outline,
const QVector< Path > &  holes,
const PositiveLength thickness,
const QColor &  color 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadStep()

std::unique_ptr< OccModel > loadStep ( const QByteArray  content)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ minifyStep()

QByteArray minifyStep ( const QByteArray &  content)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

OccModel & operator= ( const OccModel rhs)
delete

◆ initOpenCascade()

void initOpenCascade ( )
staticprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cleanString()

QString cleanString ( const QString &  str)
staticprivate
+ Here is the caller graph for this function:

◆ throwNotAvailable()

void throwNotAvailable ( )
staticprivate
+ Here is the caller graph for this function:

Member Data Documentation

◆ sOutputVerbosityConfigured

bool sOutputVerbosityConfigured = false
staticprivate

◆ mImpl

std::unique_ptr<Data> mImpl
private

The documentation for this class was generated from the following files: