Files
EgtExchange/BtlGeom.h
T
Dario Sassi 0ea6d12b92 EgtExchange 1.6k3 :
- in import BTL aggiunta gestione trim del pezzo con features di lavorazione
- in import BTL aggiunto flag per trim pezzo speciale per pareti.
2015-11-09 10:29:10 +00:00

115 lines
5.8 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2015-2015
//----------------------------------------------------------------------------
// File : BtlGeom.h Data : 26.08.15 Versione : 1.6h5
// Contenuto : Dichiarazione della classe BtlGeom.
//
//
//
// Modifiche : 26.08.15 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "BtlGeomCoStru.h"
#include "/EgtDev/Include/EgkGeomDB.h"
#include "/EgtDev/Include/EgkCurve.h"
class Polygon3d ;
class ICurveComposite ;
class ISurfTriMesh ;
//----------------------------------------------------------------------------
class BtlGeom
{
public :
BtlGeom( void) ;
public :
bool Init( IGeomDB* pGDB, bool bFlatPos, bool bSpecialTrim) ;
bool CreatePart( void) ;
bool ErasePart( void) ;
bool SetPartProdNbr( int nProdNbr) ;
bool SetPartName( std::string sDes) ;
bool SetPartCount( int nCount) ;
bool AddPartBox( double dLength, double dHeight, double dWidth) ;
bool AddPartTransformation( int nUID, const Frame3d& frRef) ;
bool AdjustPartFlatPos( int nPartId) ;
public : // Outline
bool AddPartOutline( int nSide, const FCEDEQUE& dqFce) ;
bool AddPartAperture( int nSide, const FCEDEQUE& dqFce) ;
bool AddPartStdOutline( void) ;
public : // Proc
bool GetProcessParamInfos( int nGroup, int nProc, int nSide,
INTVECTOR& vnDPar, int& nSPar, DBLVECTOR& vdPar, std::string& sPar) const ;
bool AddProcess( int nGroup, int nProc, int nSide, const std::string& sDes, int nProcId,
const DBLVECTOR& vdPar, const std::string& sPar) ;
private :
bool CreateAssemblyGroup( void) ;
bool IsTrueSide( int nSide) const ; // esclude gli estremi (RIGHT e LEFT)
ICurveComposite* CurveFromFces( const FCEDEQUE& dqFce) ;
std::string GetOutlineOutName( int nSide) const ;
std::string GetOutlineApertureName( int nSide) const ;
std::string GetOutlineTopName( int nSide) const ;
std::string GetOutlineBottomName( int nSide) const ;
double GetSideLength( int nSide) const ;
double GetSideWidth( int nSide) const ;
double GetSideHeight( int nSide) const ;
Frame3d GetSideFrame( int nSide) const ;
Plane3d GetSidePlane( int nSide) const ;
int GetOppositeSide( int nSide) const ;
private : // Outline
bool UseProcessToTrimOutline( int nProcId) ;
bool TrimOutline( int nProcSurfId) ;
bool GetLineInFace( const Point3d& ptP1, const Point3d& ptP2, int& nFace) const ;
bool IsLineOnFace( const Point3d& ptP1, const Point3d& ptP2, int nFace) const ;
bool RemoveDanglingFace( const ICURVEPVECTOR vCrvP[], ISurfTriMesh* pStm) ;
bool AdjustOneOutlineFace( int nSide, ICURVEPVECTOR& vCrvP) ;
int GetFaceRegion( int nSide) ;
ICurveComposite* GetFaceContour( int nSide) ;
private : // Proc
bool AddCut( int nGroup, int nProc, int nSide, const std::string& sDes, int nProcId,
const DBLVECTOR& vdPar) ;
bool AddLongitCut( int nGroup, int nProc, int nSide, const std::string& sDes, int nProcId,
const DBLVECTOR& vdPar) ;
bool AddDoubleCut( int nGroup, int nProc, int nSide, const std::string& sDes, int nProcId,
const DBLVECTOR& vdPar) ;
bool AddRidgeValleyCut( int nGroup, int nProc, int nSide, const std::string& sDes, int nProcId,
const DBLVECTOR& vdPar) ;
bool AddLapJoint( int nGroup, int nProc, int nSide, const std::string& sDes, int nProcId,
const DBLVECTOR& vdPar) ;
bool AddNotch( int nGroup, int nProc, int nSide, const std::string& sDes, int nProcId,
const DBLVECTOR& vdPar) ;
bool AddSeathingCut( int nGroup, int nProc, int nSide, const std::string& sDes, int nProcId,
const DBLVECTOR& vdPar) ;
bool AddText( int nGroup, int nProc, int nSide, const std::string& sDes, int nProcId,
const DBLVECTOR& vdPar, const std::string& sPar) ;
bool CreatePolygonInBox( const Point3d& ptP, const Vector3d& vtN, int nSide, Polygon3d& Polyg) ;
bool DoSewing( ISurfTriMesh* pStm, const Polygon3d& Polyg) ;
bool SetNameAndInfo( int nId, int nGroup, int nProc, int nSide, const std::string& sDes, int nProcId) ;
private :
IGeomDB* m_pGDB ;
bool m_bFlatPos ; // flag per posizionamento pezzi di piatto
bool m_bSpecialTrim ; // flag per trim speciale regioni per pareti (solo con feature passanti)
Color m_BoxCol ; // colore per box pezzi
Color m_OutsCol ; // colore per outline pezzi
Color m_ProcsCol ; // colore per lavorazioni pezzi
Color m_MarkCol ; // colore per linee di marcatura e testi
int m_nAsseId ; // identificativo gruppo per trasformazioni di assemblaggio
Point3d m_ptOrig ; // origine di inserimento del prossimo pezzo
int m_nPartId ; // identificativo del pezzo corrente
int m_nAuxId ; // identificativo del layer aux del pezzo corrente
int m_nBoxId ; // identificativo del layer box del pezzo corrente
int m_nOutsId ; // identificativo del layer outline del pezzo corrente
int m_nProcsId ; // identificativo del layer lavorazioni del pezzo corrente
Vector3d m_vtDim ; // dimensioni (LENGTH,HEIGHT,WIDTH) del pezzo corrente
} ;