Make dwg import less debug noisy

This commit is contained in:
Nyall Dawson 2018-11-09 12:17:50 +10:00
parent df9307b9aa
commit 8bf206d221
2 changed files with 561 additions and 529 deletions

File diff suppressed because it is too large Load Diff

View File

@ -92,7 +92,8 @@ namespace DRW
#define SETENTFRIENDS friend class dxfRW; \
friend class dwgReader;
/** Base class for entities
/**
* Base class for entities
* @author Rallaz
*/
class DRW_Entity
@ -196,9 +197,9 @@ class DRW_Entity
//parses dxf pair to read entity
bool parseCode( int code, dxfReader *reader );
//calculates extrusion axis (normal vector)
void calculateAxis( DRW_Coord extPoint );
void calculateAxis( const DRW_Coord &extPoint );
//apply extrusion to @extPoint and return data in @point
void extrudePoint( DRW_Coord extPoint, DRW_Coord *point );
void extrudePoint( const DRW_Coord &extPoint, DRW_Coord *point );
virtual bool parseDwg( DRW::Version version, dwgBuffer *buf, duint32 bs = 0 ) = 0;
//parses dwg common start part to read entity
bool parseDwg( DRW::Version version, dwgBuffer *buf, dwgBuffer *strBuf, duint32 bs = 0 );
@ -255,7 +256,8 @@ class DRW_Entity
};
/** Class to handle point entity
/**
* Class to handle point entity
* @author Rallaz
*/
class DRW_Point : public DRW_Entity
@ -284,7 +286,8 @@ class DRW_Point : public DRW_Entity
// the UCS in effect when the point was drawn
};
/** Class to handle line entity
/**
* Class to handle line entity
* @author Rallaz
*/
class DRW_Line : public DRW_Point
@ -307,7 +310,8 @@ class DRW_Line : public DRW_Point
DRW_Coord secPoint; //!< Second point, code 11, 21 & 31
};
/** Class to handle ray entity
/**
* Class to handle ray entity
* @author Rallaz
*/
class DRW_Ray : public DRW_Line
@ -322,7 +326,8 @@ class DRW_Ray : public DRW_Line
virtual bool parseDwg( DRW::Version version, dwgBuffer *buf, duint32 bs = 0 );
};
/** Class to handle xline entity
/**
* Class to handle xline entity
* @author Rallaz
*/
class DRW_Xline : public DRW_Ray
@ -334,7 +339,8 @@ class DRW_Xline : public DRW_Ray
}
};
/** Class to handle circle entity
/**
* Class to handle circle entity
* @author Rallaz
*/
class DRW_Circle : public DRW_Point
@ -357,7 +363,8 @@ class DRW_Circle : public DRW_Point
double mRadius; //!< Radius, code 40
};
/** Class to handle arc entity
/**
* Class to handle arc entity
* @author Rallaz
*/
class DRW_Arc : public DRW_Circle
@ -399,7 +406,8 @@ class DRW_Arc : public DRW_Circle
int isccw; //!< Is counter clockwise arc?, only used in hatch, code 73
};
/** Class to handle ellipse and elliptic arc entity
/**
* Class to handle ellipse and elliptic arc entity
*
* Note: start/end parameter are in radians for ellipse entity but
* for hatch boundary are in degrees
@ -438,7 +446,8 @@ class DRW_Ellipse : public DRW_Line
int isccw; //!< Is counter clockwise arc?, only used in hatch, code 73
};
/** Class to handle trace entity
/**
* Class to handle trace entity
*
* @author Rallaz
*/
@ -464,7 +473,8 @@ class DRW_Trace : public DRW_Line
DRW_Coord fourthPoint; //!< Four point, code 13, 23 & 33
};
/** Class to handle solid entity
/**
* Class to handle solid entity
*
* @author Rallaz
*/
@ -501,7 +511,8 @@ class DRW_Solid : public DRW_Trace
};
/** Class to handle 3dface entity
/**
* Class to handle 3dface entity
* @author Rallaz
*/
class DRW_3Dface : public DRW_Trace
@ -548,7 +559,8 @@ class DRW_3Dface : public DRW_Trace
};
/** Class to handle block entries
/**
* Class to handle block entries
* @author Rallaz
*/
class DRW_Block : public DRW_Point
@ -577,7 +589,8 @@ class DRW_Block : public DRW_Point
};
/** Class to handle insert entries
/**
* Class to handle insert entries
* @author Rallaz
*/
class DRW_Insert : public DRW_Point
@ -618,7 +631,8 @@ class DRW_Insert : public DRW_Point
dwgHandle seqendH; //RLZ: on implement attrib remove this handle from obj list (see pline/vertex code)
};
/** Class to handle lwpolyline entity
/**
* Class to handle lwpolyline entity
* @author Rallaz
*/
class DRW_LWPolyline : public DRW_Entity
@ -694,7 +708,8 @@ class DRW_LWPolyline : public DRW_Entity
std::vector<DRW_Vertex2D *> vertlist; //!< Vertex list
};
/** Class to handle insert entries
/**
* Class to handle insert entries
* @author Rallaz
*/
class DRW_Text : public DRW_Line
@ -753,7 +768,8 @@ class DRW_Text : public DRW_Line
dwgHandle styleH; //!< Handle for text style
};
/** Class to handle insert entries
/**
* Class to handle insert entries
* @author Rallaz
*/
class DRW_MText : public DRW_Text
@ -794,7 +810,8 @@ class DRW_MText : public DRW_Text
bool haveXAxis;
};
/** Class to handle vertex for polyline entity
/**
* Class to handle vertex for polyline entity
* @author Rallaz
*/
class DRW_Vertex : public DRW_Point
@ -856,7 +873,8 @@ class DRW_Vertex : public DRW_Point
int identifier; //!< Vertex identifier, code 91, default 0
};
/** Class to handle polyline entity
/**
* Class to handle polyline entity
* @author Rallaz
*/
class DRW_Polyline : public DRW_Point
@ -923,7 +941,8 @@ class DRW_Polyline : public DRW_Point
};
/** Class to handle spline entity
/**
* Class to handle spline entity
* @author Rallaz
*/
class DRW_Spline : public DRW_Entity
@ -992,7 +1011,8 @@ class DRW_Spline : public DRW_Entity
DRW_Coord *fitpoint; //!< Current fit point to add data
};
/** Class to handle hatch loop
/**
* Class to handle hatch loop
* @author Rallaz
*/
class DRW_HatchLoop
@ -1031,7 +1051,8 @@ class DRW_HatchLoop
std::vector<DRW_Entity *> objlist; //!< Entities list
};
/** Class to handle hatch entity
/**
* Class to handle hatch entity
* @author Rallaz
*/
//TODO: handle lwpolylines, splines and ellipses
@ -1151,7 +1172,8 @@ class DRW_Hatch : public DRW_Point
bool ispol;
};
/** Class to handle image entity
/**
* Class to handle image entity
* @author Rallaz
*/
class DRW_Image : public DRW_Line
@ -1189,7 +1211,8 @@ class DRW_Image : public DRW_Line
};
/** Base class for dimension entity
/**
* Base class for dimension entity
* @author Rallaz
*/
class DRW_Dimension : public DRW_Entity
@ -1322,7 +1345,8 @@ class DRW_Dimension : public DRW_Entity
};
/** Class to handle aligned dimension entity
/**
* Class to handle aligned dimension entity
* @author Rallaz
*/
class DRW_DimAligned : public DRW_Dimension
@ -1353,7 +1377,8 @@ class DRW_DimAligned : public DRW_Dimension
virtual bool parseDwg( DRW::Version version, dwgBuffer *buf, duint32 bs = 0 );
};
/** Class to handle linear or rotated dimension entity
/**
* Class to handle linear or rotated dimension entity
* @author Rallaz
*/
class DRW_DimLinear : public DRW_DimAligned
@ -1375,7 +1400,8 @@ class DRW_DimLinear : public DRW_DimAligned
void setOblique( const double d ) {setOb52( d );}
};
/** Class to handle aligned, linear or rotated dimension entity
/**
* Class to handle aligned, linear or rotated dimension entity
* @author Rallaz
*/
class DRW_DimRadial : public DRW_Dimension
@ -1403,7 +1429,8 @@ class DRW_DimRadial : public DRW_Dimension
virtual bool parseDwg( DRW::Version version, dwgBuffer *buf, duint32 bs = 0 );
};
/** Class to handle aligned, linear or rotated dimension entity
/**
* Class to handle aligned, linear or rotated dimension entity
* @author Rallaz
*/
class DRW_DimDiametric : public DRW_Dimension
@ -1431,7 +1458,8 @@ class DRW_DimDiametric : public DRW_Dimension
virtual bool parseDwg( DRW::Version version, dwgBuffer *buf, duint32 bs = 0 );
};
/** Class to handle angular dimension entity
/**
* Class to handle angular dimension entity
* @author Rallaz
*/
class DRW_DimAngular : public DRW_Dimension
@ -1464,7 +1492,8 @@ class DRW_DimAngular : public DRW_Dimension
};
/** Class to handle angular 3p dimension entity
/**
* Class to handle angular 3p dimension entity
* @author Rallaz
*/
class DRW_DimAngular3p : public DRW_Dimension
@ -1494,7 +1523,8 @@ class DRW_DimAngular3p : public DRW_Dimension
virtual bool parseDwg( DRW::Version version, dwgBuffer *buf, duint32 bs = 0 );
};
/** Class to handle ordinate dimension entity
/**
* Class to handle ordinate dimension entity
* @author Rallaz
*/
class DRW_DimOrdinate : public DRW_Dimension
@ -1523,7 +1553,8 @@ class DRW_DimOrdinate : public DRW_Dimension
};
/** Class to handle leader entity
/**
* Class to handle leader entity
* @author Rallaz
*/
class DRW_Leader : public DRW_Entity
@ -1586,7 +1617,8 @@ class DRW_Leader : public DRW_Entity
dwgHandle AnnotH;
};
/** Class to handle viewport entity
/**
* Class to handle viewport entity
* @author Rallaz
*/
class DRW_Viewport : public DRW_Point