Coin Logo http://www.coin3d.org/
http://www.kongsberg.com/kogt/

Public Member Functions | Friends | List of all members
dxfConverter Class Reference

The dxfConverter class offers a simple interface for dxf converting. It makes it possible to extract all geometry from dxf files, and store it in internal geometry sturctures, which again can be exported as vrml. More...

#include <convert.h>

Public Member Functions

 dxfConverter ()
 
 ~dxfConverter ()
 
void setMaxerr (const dxfdouble maxerr)
 
void findHeaderVariables (dimeModel &model)
 
bool doConvert (dimeModel &model)
 
bool writeVrml (const char *filename, const bool vrml1=false, const bool only2d=false)
 
bool writeVrml (FILE *out, const bool vrml1=false, const bool only2d=false)
 
void setNumSub (const int num)
 
int getNumSub () const
 
dxfdouble getMaxerr () const
 
void setFillmode (const bool fill)
 
bool getFillmode () const
 
bool getLayercol () const
 
void setLayercol (const bool v)
 
dxfLayerDatagetLayerData (const int colidx)
 
dxfLayerDatagetLayerData (const dimeEntity *entity)
 
dxfLayerData ** getLayerData ()
 
int getColorIndex (const dimeEntity *entity)
 
int getCurrentInsertColorIndex () const
 

Friends

class dime2Profit
 
class dime2So
 

Detailed Description

The dxfConverter class offers a simple interface for dxf converting. It makes it possible to extract all geometry from dxf files, and store it in internal geometry sturctures, which again can be exported as vrml.

Constructor & Destructor Documentation

dxfConverter::dxfConverter ( )

Constructor

dxfConverter::~dxfConverter ( )

Destructor

Member Function Documentation

bool dxfConverter::doConvert ( dimeModel model)

Converts model to the internal geometry structures.

See also
dxfConverter::writeWrl()

References dimeModel::traverseEntities().

void dxfConverter::findHeaderVariables ( dimeModel model)

Finds the state of supported header variables in model. This method should be called before dxfxConverter::doConvert()

References dimeModel::findSection(), and dimeHeaderSection::getVariable().

int dxfConverter::getColorIndex ( const dimeEntity entity)

Finds the correct color index for entity. Handles the BYLAYER case.

References dimeLayer::getColorNumber(), dimeEntity::getColorNumber(), and dimeEntity::getLayer().

Referenced by getLayerData().

int dxfConverter::getCurrentInsertColorIndex ( ) const
inline

Returns the color index of the current INSERT entity. If no INSERT entity is current, the color index 7 (white) will be returned.

bool dxfConverter::getFillmode ( ) const
inline

Returns whether polylines with width and SOLID and TRACE should be filled.

bool dxfConverter::getLayercol ( ) const
inline

Returns whether only layers should be used (and not color index) when converting

dxfLayerData * dxfConverter::getLayerData ( const int  colidx)

Returns a dxfLayerData instance for the color with color index colidx.

dxfLayerData * dxfConverter::getLayerData ( const dimeEntity entity)

Finds the color index for entity, and returns the dxfLayerData for it.

References getColorIndex(), getLayerData(), and dimeBase::typeId().

dxfLayerData ** dxfConverter::getLayerData ( )

Returns a pointer to the dxfLayerData array.

Referenced by getLayerData().

dxfdouble dxfConverter::getMaxerr ( ) const
inline

Returns the maximum allowed error when converting circles, arcs ellipses.

int dxfConverter::getNumSub ( ) const
inline

Returns the numner of subdivisions set by dxfConverter::setNumSub()

void dxfConverter::setFillmode ( const bool  fill)
inline

Sets whether polylines with width and SOLID and TRACE should be filled.

void dxfConverter::setLayercol ( const bool  v)
inline

Sets whether only layer (and not color index) should be used when converting. This method should normally no be used.

void dxfConverter::setMaxerr ( const dxfdouble  maxerr)
inline

Sets the maximum error allowed when converting circles, arcs and ellipses into lines/polygons.

void dxfConverter::setNumSub ( const int  num)
inline

Sets the number of subdivisions for a circle or ellipse. This overrides the value set in dxfConverter::setMaxerr() and should normally not be used

See also
dxfConverter::getNumSub()
bool dxfConverter::writeVrml ( const char *  filename,
const bool  vrml1 = false,
const bool  only2d = false 
)

Writes the internal geometry structures to filename.

bool dxfConverter::writeVrml ( FILE *  out,
const bool  vrml1 = false,
const bool  only2d = false 
)

Writes the internal geometry structures to out. Warning: This function is not CRT safe.

References dxfLayerData::writeWrl().


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

Copyright © by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Sat Sep 27 2014 20:27:49 for Dime by Doxygen 1.8.8.