|
QCAD
Open Source 2D CAD
|
DXF support tools, mainly for QCAD 2 DXF imports. More...
#include <RDxfServices.h>
Public Types | |
| enum | Type { Unknown , String , Int , Float , Vector } |
Public Member Functions | |
| QString | collectVersion2Info (const QString &fileName) |
| QCAD 2 stores the font name in field 'text style name', DXF code 7 which is not supported by Teigha. | |
| void | detectVersion2Format (const QString &fileName) |
| void | fixBlockName (QString &blockName) |
| void | fixDimensionLabel (QString &text, QString &uTol, QString &lTol) const |
| QString | fixFontName (const QString &fontName) const |
| Makes DXF/DWG font names QCAD compatible by removing .shx and fixing the name if appropriate. | |
| void | fixLayerName (QString &layerName) |
| void | fixVersion2HatchData (QString &patternName, double &angle, double &scale, bool solid) const |
| void | fixVersion2String (QString &str) const |
| QTextCodec * | getCodec () const |
| int | getMajorVersion () const |
| int | getMinorVersion () const |
| int | getPatchVersion () const |
| bool | getVersion2Compatibility () const |
| QString | getVersion2DimensionLabel (const QString &handle) const |
| QString | getVersion2Font (const QString &handle) const |
| QString | getVersion2LayerName (const QString &layerName) const |
| double | getVersion2PatternAngle (double angle, const QString &patternName) const |
| QString | getVersion2PatternName (const QString &patternName) const |
| double | getVersion2PatternScale (double scale, const QString &patternName) const |
| bool | getVersion3_1Compatibility () const |
| QString | getVersionBlockName (const QString &blockName) const |
| bool | hasDIMAZIN () const |
| bool | hasDIMZIN () const |
| bool | hasInvalidEllipse () const |
| RDxfServices () | |
| void | reset () |
| void | setCodec (QTextCodec *codec) |
| ~RDxfServices () | |
Static Public Member Functions | |
| static RColor | attributesToColor (int color, int color24, const double dxfColors[][3], bool forLayer=false) |
| static void | autoFixLinetypePattern (RLinetypePattern &pattern) |
| static int | colorToNumber (const RColor &col, const double dxfColors[][3]) |
| Converts a color into a color number in the DXF palette. | |
| static int | colorToNumber24 (const RColor &col) |
| static QString | escapeUnicode (const QString &str) |
| static int | getAci (const RColor &col) |
| static int | getCodeForVariable (RS::KnownVariable v) |
| static RColor | getColor (unsigned int index) |
| static int | getFileQCADVersion (const RDocument &doc) |
| static QString | getSafeBlockName (QString &blockName) |
| static RDxfServices::Type | getTypeForVariable (RS::KnownVariable v) |
| static void | initAci () |
| static bool | isVariable2D (RS::KnownVariable v) |
| Checks if the given variable is two-dimensional (e.g. | |
| static RColor | numberToColor (int num, const double dxfColors[][3], bool comp=false, bool forLayer=false) |
| Converts a color index (num) into a RColor object. | |
| static RColor | numberToColor24 (int num) |
| static RLineweight::Lineweight | numberToWeight (int num) |
| Converts a line width number (e.g. | |
| static QString | parseUnicode (const QString &str) |
| static RS::KnownVariable | stringToVariable (const QString &s) |
| static QString | variableToString (RS::KnownVariable v) |
| static int | widthToNumber (RLineweight::Lineweight w) |
| Converts a RLineweight::Lineweight into an int width for use in DXF files. | |
Private Attributes | |
| QTextCodec * | codec |
| int | dxflibMajorVersion |
| int | dxflibMinorVersion |
| int | dxflibPatchVersion |
| QMap< QString, QString > | version2BlockMapping |
| QMap< QString, QString > | version2DimensionLabels |
| bool | version2GotDIMAZIN |
| bool | version2GotDIMZIN |
| bool | version2GotInvalidEllipse |
| QMap< QString, QString > | version2LayerMapping |
| QMap< QString, QString > | version2TextFonts |
Static Private Attributes | |
| static QMap< unsigned int, QRgb > | aci |
| Copyright (c) 2011-2018 by Andrew Mustun. | |
| static QMap< QRgb, unsigned int > | revAci |
DXF support tools, mainly for QCAD 2 DXF imports.
| enum RDxfServices::Type |
| RDxfServices::RDxfServices | ( | ) |
| RDxfServices::~RDxfServices | ( | ) |
|
static |
|
static |
| QString RDxfServices::collectVersion2Info | ( | const QString & | fileName | ) |
QCAD 2 stores the font name in field 'text style name', DXF code 7 which is not supported by Teigha.
This function collects all font names of MTEXT entities for use by RDwgMTextImporter.
Converts a color into a color number in the DXF palette.
The color that fits best is chosen.
| void RDxfServices::detectVersion2Format | ( | const QString & | fileName | ) |
|
static |
| void RDxfServices::fixBlockName | ( | QString & | blockName | ) |
| void RDxfServices::fixDimensionLabel | ( | QString & | text, |
| QString & | uTol, | ||
| QString & | lTol ) const |
| QString RDxfServices::fixFontName | ( | const QString & | fontName | ) | const |
Makes DXF/DWG font names QCAD compatible by removing .shx and fixing the name if appropriate.
| void RDxfServices::fixLayerName | ( | QString & | layerName | ) |
| void RDxfServices::fixVersion2HatchData | ( | QString & | patternName, |
| double & | angle, | ||
| double & | scale, | ||
| bool | solid ) const |
| void RDxfServices::fixVersion2String | ( | QString & | str | ) | const |
|
inline |
|
static |
|
static |
|
inline |
|
inline |
|
inline |
|
static |
|
static |
|
inline |
| QString RDxfServices::getVersion2DimensionLabel | ( | const QString & | handle | ) | const |
| QString RDxfServices::getVersion2Font | ( | const QString & | handle | ) | const |
| QString RDxfServices::getVersion2LayerName | ( | const QString & | layerName | ) | const |
| double RDxfServices::getVersion2PatternAngle | ( | double | angle, |
| const QString & | patternName ) const |
| QString RDxfServices::getVersion2PatternName | ( | const QString & | patternName | ) | const |
| double RDxfServices::getVersion2PatternScale | ( | double | scale, |
| const QString & | patternName ) const |
| scale | Old QCAD 2 pattern scale. |
| patternName | Old QCAD 2 pattern name. |
|
inline |
| QString RDxfServices::getVersionBlockName | ( | const QString & | blockName | ) | const |
|
inline |
|
inline |
|
inline |
|
static |
|
static |
Checks if the given variable is two-dimensional (e.g.
$LIMMIN).
|
static |
Converts a color index (num) into a RColor object.
Please refer to the dxflib documentation for details.
| num | Color number. |
| comp | Compatibility with older QCad versions (1.5.3 and older) |
|
static |
|
static |
Converts a line width number (e.g.
1) into a RS2::LineWidth.
|
static |
| void RDxfServices::reset | ( | ) |
|
inline |
|
static |
|
static |
|
static |
Converts a RLineweight::Lineweight into an int width for use in DXF files.
|
staticprivate |
Copyright (c) 2011-2018 by Andrew Mustun.
All rights reserved.
This file is part of the QCAD project.
QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QCAD.
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |