From d6c78ca1a14520f140c632ec25981752b3ae4e43 Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 17 Dec 2014 14:56:14 +0200 Subject: [PATCH] All points in detail should go clockwise. This mean in some cases need reverse curves that go anticlockwise. Old method reversing curves doesn't work correct in all cases. I don't see now way automatically handle this. That's why now user can choose himself need reverse points for this curve or not. Also this mean increment in format version to 0.1.2. --HG-- branch : feature --- src/app/dialogs/tools/dialogdetail.cpp | 46 +++- src/app/dialogs/tools/dialogdetail.h | 3 +- src/app/dialogs/tools/dialogdetail.ui | 13 +- src/app/geometry/vabstractcurve.cpp | 24 +- src/app/geometry/vabstractcurve.h | 5 +- src/app/geometry/vequidistant.cpp | 36 +-- src/app/geometry/vequidistant.h | 3 - src/app/geometry/vnodedetail.cpp | 30 ++- src/app/geometry/vnodedetail.h | 5 +- src/app/geometry/vnodedetail_p.h | 13 +- src/app/tools/vtooldetail.cpp | 10 +- src/app/tools/vtooldetail.h | 1 + src/app/tools/vtooluniondetails.cpp | 5 +- src/app/xml/vpattern.cpp | 3 +- src/libs/ifc/schema.qrc | 1 + src/libs/ifc/schema/pattern/v0.1.2.xsd | 292 +++++++++++++++++++++++++ src/libs/ifc/xml/vpatternconverter.cpp | 32 +-- src/libs/ifc/xml/vpatternconverter.h | 2 +- 18 files changed, 431 insertions(+), 93 deletions(-) create mode 100644 src/libs/ifc/schema/pattern/v0.1.2.xsd diff --git a/src/app/dialogs/tools/dialogdetail.cpp b/src/app/dialogs/tools/dialogdetail.cpp index b4bded7e0..4605084a4 100644 --- a/src/app/dialogs/tools/dialogdetail.cpp +++ b/src/app/dialogs/tools/dialogdetail.cpp @@ -69,6 +69,7 @@ DialogDetail::DialogDetail(const VContainer *data, const quint32 &toolId, QWidge this, &DialogDetail::BiasYChanged); connect(ui.checkBoxSeams, &QCheckBox::clicked, this, &DialogDetail::ClickedSeams); connect(ui.checkBoxClosed, &QCheckBox::clicked, this, &DialogDetail::ClickedClosed); + connect(ui.checkBoxReverse, &QCheckBox::clicked, this, &DialogDetail::ClickedReverse); connect(ui.lineEditNameDetail, &QLineEdit::textChanged, this, &DialogDetail::NamePointChanged); connect(ui.toolButtonDelete, &QToolButton::clicked, this, &DialogDetail::DeleteItem); @@ -133,9 +134,10 @@ void DialogDetail::SaveData() * @param typeNode type of node in detail * @param mx offset respect to x * @param my offset respect to y + * @param reverse reverse list of points */ void DialogDetail::NewItem(quint32 id, const Tool &typeTool, const NodeDetail &typeNode, - qreal mx, qreal my) + qreal mx, qreal my, bool reverse) { QString name; switch (typeTool) @@ -171,14 +173,27 @@ void DialogDetail::NewItem(quint32 id, const Tool &typeTool, const NodeDetail &t QListWidgetItem *item = new QListWidgetItem(name); item->setFont(QFont("Times", 12, QFont::Bold)); - VNodeDetail node(id, typeTool, typeNode, mx, my); + VNodeDetail node(id, typeTool, typeNode, mx, my, reverse); item->setData(Qt::UserRole, QVariant::fromValue(node)); ui.listWidget->addItem(item); ui.listWidget->setCurrentRow(ui.listWidget->count()-1); + ui.doubleSpinBoxBiasX->blockSignals(true); ui.doubleSpinBoxBiasY->blockSignals(true); + ui.doubleSpinBoxBiasX->setValue(qApp->fromPixel(node.getMx())); ui.doubleSpinBoxBiasY->setValue(qApp->fromPixel(node.getMy())); + if (node.getTypeTool() == Tool::NodePoint) + { + ui.checkBoxReverse->setChecked(false); + ui.checkBoxReverse->setEnabled(false); + } + else + { + ui.checkBoxReverse->setEnabled(true); + ui.checkBoxReverse->setChecked(node.getReverse()); + } + ui.doubleSpinBoxBiasX->blockSignals(false); ui.doubleSpinBoxBiasY->blockSignals(false); } @@ -195,7 +210,7 @@ void DialogDetail::setDetails(const VDetail &value) for (int i = 0; i < details.CountNode(); ++i) { NewItem(details.at(i).getId(), details.at(i).getTypeTool(), details.at(i).getTypeNode(), details.at(i).getMx(), - details.at(i).getMy()); + details.at(i).getMy(), details.at(i).getReverse()); } ui.lineEditNameDetail->setText(details.getName()); ui.checkBoxSeams->setChecked(details.getSeamAllowance()); @@ -260,6 +275,17 @@ void DialogDetail::ClickedClosed(bool checked) closed = checked; } +//--------------------------------------------------------------------------------------------------------------------- +void DialogDetail::ClickedReverse(bool checked) +{ + qint32 row = ui.listWidget->currentRow(); + QListWidgetItem *item = ui.listWidget->item( row ); + SCASSERT(item != nullptr); + VNodeDetail node = qvariant_cast(item->data(Qt::UserRole)); + node.setReverse(checked); + item->setData(Qt::UserRole, QVariant::fromValue(node)); +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief ObjectChanged changed new object (point, arc, spline or spline path) form list @@ -271,10 +297,20 @@ void DialogDetail::ObjectChanged(int row) { return; } - QListWidgetItem *item = ui.listWidget->item( row ); - VNodeDetail node = qvariant_cast(item->data(Qt::UserRole)); + const QListWidgetItem *item = ui.listWidget->item( row ); + const VNodeDetail node = qvariant_cast(item->data(Qt::UserRole)); ui.doubleSpinBoxBiasX->setValue(qApp->fromPixel(node.getMx())); ui.doubleSpinBoxBiasY->setValue(qApp->fromPixel(node.getMy())); + if (node.getTypeTool() == Tool::NodePoint) + { + ui.checkBoxReverse->setChecked(false); + ui.checkBoxReverse->setEnabled(false); + } + else + { + ui.checkBoxReverse->setEnabled(true); + ui.checkBoxReverse->setChecked(node.getReverse()); + } } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/dialogs/tools/dialogdetail.h b/src/app/dialogs/tools/dialogdetail.h index 98791899e..8f8efe965 100644 --- a/src/app/dialogs/tools/dialogdetail.h +++ b/src/app/dialogs/tools/dialogdetail.h @@ -50,6 +50,7 @@ public slots: void BiasYChanged(qreal d); void ClickedSeams(bool checked); void ClickedClosed(bool checked); + void ClickedReverse(bool checked); void ObjectChanged(int row); void DeleteItem(); virtual void UpdateList(); @@ -73,7 +74,7 @@ private: bool closed; void NewItem(quint32 id, const Tool &typeTool, const NodeDetail &typeNode, - qreal mx = 0, qreal my = 0); + qreal mx = 0, qreal my = 0, bool reverse = false); }; //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/dialogs/tools/dialogdetail.ui b/src/app/dialogs/tools/dialogdetail.ui index afc5b9225..212625aef 100644 --- a/src/app/dialogs/tools/dialogdetail.ui +++ b/src/app/dialogs/tools/dialogdetail.ui @@ -7,7 +7,7 @@ 0 0 565 - 324 + 342 @@ -126,6 +126,17 @@ + + + + + + Reverse + + + + + diff --git a/src/app/geometry/vabstractcurve.cpp b/src/app/geometry/vabstractcurve.cpp index e483e430e..6919dfea4 100644 --- a/src/app/geometry/vabstractcurve.cpp +++ b/src/app/geometry/vabstractcurve.cpp @@ -52,13 +52,12 @@ VAbstractCurve &VAbstractCurve::operator=(const VAbstractCurve &curve) } //--------------------------------------------------------------------------------------------------------------------- -QVector VAbstractCurve::GetSegmentPoints(const QPointF &begin, const QPointF &end, - const QVector &contourPoints) const +QVector VAbstractCurve::GetSegmentPoints(const QPointF &begin, const QPointF &end, bool reverse) const { QVector points = GetPoints(); - if (contourPoints.isEmpty() == false) + if (reverse) { - points = CorrectAnticlockwise(points, contourPoints); + points = GetReversePoints(points); } points = FromBegin(points, begin); points = ToEnd(points, end); @@ -122,23 +121,6 @@ QVector VAbstractCurve::ToEnd(const QVector &points, const QPo return GetReversePoints(reversed); } -//--------------------------------------------------------------------------------------------------------------------- -QVector VAbstractCurve::CorrectAnticlockwise(const QVector &points, - const QVector &contourPoints) const -{ - const int len1 = GetLengthContour(contourPoints, points); - const QVector reversedPoints = GetReversePoints(points); - const int lenReverse = GetLengthContour(contourPoints, reversedPoints); - if (len1 <= lenReverse) - { - return points; - } - else - { - return reversedPoints; - } -} - //--------------------------------------------------------------------------------------------------------------------- QPainterPath VAbstractCurve::GetPath(PathDirection direction) const { diff --git a/src/app/geometry/vabstractcurve.h b/src/app/geometry/vabstractcurve.h index 9a6fcaefb..1c38482ed 100644 --- a/src/app/geometry/vabstractcurve.h +++ b/src/app/geometry/vabstractcurve.h @@ -45,8 +45,7 @@ public: VAbstractCurve& operator= (const VAbstractCurve &curve); virtual QVector GetPoints() const =0; - QVector GetSegmentPoints(const QPointF &begin, const QPointF &end, - const QVector &contourPoints = QVector()) const; + QVector GetSegmentPoints(const QPointF &begin, const QPointF &end, bool reverse = false) const; virtual QPainterPath GetPath(PathDirection direction = PathDirection::Hide) const; virtual qreal GetLength() const =0; @@ -56,8 +55,6 @@ protected: private: QVector FromBegin(const QVector &points, const QPointF &begin) const; QVector ToEnd(const QVector &points, const QPointF &end) const; - QVector CorrectAnticlockwise(const QVector &points, - const QVector &contourPoints) const; }; #endif // VABSTRACTCURVE_H diff --git a/src/app/geometry/vequidistant.cpp b/src/app/geometry/vequidistant.cpp index 1f856525d..2abdc2dc9 100644 --- a/src/app/geometry/vequidistant.cpp +++ b/src/app/geometry/vequidistant.cpp @@ -77,7 +77,12 @@ QPainterPath VEquidistant::ContourPath(const quint32 &idDetail) const const QPointF begin = StartSegment(detail, i); const QPointF end = EndSegment(detail, i); - AddContourPoints(curve->GetSegmentPoints(begin, end, points), points, pointsEkv, detail, i); + QVector nodePoints = curve->GetSegmentPoints(begin, end, detail.at(i).getReverse()); + points << nodePoints; + if (detail.getSeamAllowance() == true) + { + pointsEkv << biasPoints(nodePoints, detail.at(i).getMx(), detail.at(i).getMy()); + } } break; default: @@ -428,32 +433,3 @@ QPointF VEquidistant::SingleParallelPoint(const QLineF &line, const qreal &angle pLine.setLength( width ); return pLine.p2(); } - -//--------------------------------------------------------------------------------------------------------------------- -void VEquidistant::AddContourPoints(const QVector &nodePoints, QVector &points, - QVector &pointsEkv, const VDetail &detail, int i) -{ - /* - * Even if we made correction anticlockwise in method VAbstractCurve::GetSegmentPoints i decided left this check - * also here. I think it will make code more bullet proof. If it will slowdown creation contour delete correction. - */ - int len1 = VGObject::GetLengthContour(points, nodePoints); - QVector reversedPoints = VGObject::GetReversePoints(nodePoints); - int lenReverse = VGObject::GetLengthContour(points, reversedPoints); - if (len1 <= lenReverse) - { - points << nodePoints; - if (detail.getSeamAllowance() == true) - { - pointsEkv << biasPoints(nodePoints, detail.at(i).getMx(), detail.at(i).getMy()); - } - } - else - { - points << reversedPoints; - if (detail.getSeamAllowance() == true) - { - pointsEkv << biasPoints(reversedPoints, detail.at(i).getMx(), detail.at(i).getMy()); - } - } -} diff --git a/src/app/geometry/vequidistant.h b/src/app/geometry/vequidistant.h index 4af0ef7ed..9e19df5d5 100644 --- a/src/app/geometry/vequidistant.h +++ b/src/app/geometry/vequidistant.h @@ -106,9 +106,6 @@ private: */ static QPointF SingleParallelPoint(const QLineF &line, const qreal &angle, const qreal &width); - static void AddContourPoints(const QVector &nodePoints, QVector &points, - QVector &pointsEkv, const VDetail &detail, int i); - QPointF StartSegment(const VDetail &detail, const int &i) const; QPointF EndSegment(const VDetail &detail, const int &i) const; }; diff --git a/src/app/geometry/vnodedetail.cpp b/src/app/geometry/vnodedetail.cpp index 41a8fb74f..80b54c6fa 100644 --- a/src/app/geometry/vnodedetail.cpp +++ b/src/app/geometry/vnodedetail.cpp @@ -35,8 +35,8 @@ VNodeDetail::VNodeDetail() {} //--------------------------------------------------------------------------------------------------------------------- -VNodeDetail::VNodeDetail(quint32 id, Tool typeTool, NodeDetail typeNode, qreal mx, qreal my) - :d(new VNodeDetailData(id, typeTool, typeNode, mx, my)) +VNodeDetail::VNodeDetail(quint32 id, Tool typeTool, NodeDetail typeNode, qreal mx, qreal my, bool reverse) + :d(new VNodeDetailData(id, typeTool, typeNode, mx, my, reverse)) {} //--------------------------------------------------------------------------------------------------------------------- @@ -118,3 +118,29 @@ void VNodeDetail::setMy(const qreal &value) { d->my = value; } + +//--------------------------------------------------------------------------------------------------------------------- +bool VNodeDetail::getReverse() const +{ + if (getTypeTool() == Tool::NodePoint) + { + return false; + } + else + { + return d->reverse; + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VNodeDetail::setReverse(bool reverse) +{ + if (getTypeTool() == Tool::NodePoint) + { + d->reverse = false; + } + else + { + d->reverse = reverse; + } +} diff --git a/src/app/geometry/vnodedetail.h b/src/app/geometry/vnodedetail.h index c2b0c21d1..ab557f8bc 100644 --- a/src/app/geometry/vnodedetail.h +++ b/src/app/geometry/vnodedetail.h @@ -53,7 +53,7 @@ public: * @param mx object bias x axis * @param my object bias y axis */ - VNodeDetail(quint32 id, Tool typeTool, NodeDetail typeNode, qreal mx = 0, qreal my = 0); + VNodeDetail(quint32 id, Tool typeTool, NodeDetail typeNode, qreal mx = 0, qreal my = 0, bool reverse = false); /** * @brief VNodeDetail copy constructor * @param node node @@ -116,6 +116,9 @@ public: * @param value bias y axis. */ void setMy(const qreal &value); + + bool getReverse() const; + void setReverse(bool reverse); private: QSharedDataPointer d; }; diff --git a/src/app/geometry/vnodedetail_p.h b/src/app/geometry/vnodedetail_p.h index 6c676cd51..3de2ea778 100644 --- a/src/app/geometry/vnodedetail_p.h +++ b/src/app/geometry/vnodedetail_p.h @@ -41,15 +41,16 @@ class VNodeDetailData : public QSharedData { public: VNodeDetailData() - :id(NULL_ID), typeTool(Tool::NodePoint), typeNode(NodeDetail::Contour), mx(0), my(0) + :id(NULL_ID), typeTool(Tool::NodePoint), typeNode(NodeDetail::Contour), mx(0), my(0), reverse(false) {} - VNodeDetailData(quint32 id, Tool typeTool, NodeDetail typeNode, qreal mx, qreal my) - :id(id), typeTool(typeTool), typeNode(typeNode), mx(mx), my(my) + VNodeDetailData(quint32 id, Tool typeTool, NodeDetail typeNode, qreal mx, qreal my, bool reverse) + :id(id), typeTool(typeTool), typeNode(typeNode), mx(mx), my(my), reverse(reverse) {} VNodeDetailData (const VNodeDetailData& node) - :QSharedData(node), id(node.id), typeTool(node.typeTool), typeNode(node.typeNode), mx(node.mx), my(node.my) + :QSharedData(node), id(node.id), typeTool(node.typeTool), typeNode(node.typeNode), mx(node.mx), my(node.my), + reverse(node.reverse) {} ~VNodeDetailData() {} @@ -74,6 +75,10 @@ public: * @brief my bias y axis. */ qreal my; + /** + * @brief reverse true if need reverse points list for node. + */ + bool reverse; }; #ifdef Q_CC_GNU diff --git a/src/app/tools/vtooldetail.cpp b/src/app/tools/vtooldetail.cpp index ab308f822..9205c334f 100644 --- a/src/app/tools/vtooldetail.cpp +++ b/src/app/tools/vtooldetail.cpp @@ -52,6 +52,7 @@ const QString VToolDetail::AttrClosed = QStringLiteral("closed"); const QString VToolDetail::AttrWidth = QStringLiteral("width"); const QString VToolDetail::AttrIdObject = QStringLiteral("idObject"); const QString VToolDetail::AttrNodeType = QStringLiteral("nodeType"); +const QString VToolDetail::AttrReverse = QStringLiteral("reverse"); const QString VToolDetail::NodeTypeContour = QStringLiteral("Contour"); const QString VToolDetail::NodeTypeModeling = QStringLiteral("Modeling"); @@ -181,7 +182,8 @@ void VToolDetail::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern qDebug()<<"May be wrong tool type!!! Ignoring."<SetAttribute(nod, AttrIdObject, node.getId()); doc->SetAttribute(nod, AttrMx, qApp->fromPixel(node.getMx())); doc->SetAttribute(nod, AttrMy, qApp->fromPixel(node.getMy())); + + if (node.getTypeTool() != Tool::NodePoint) + { + doc->SetAttribute(nod, AttrReverse, static_cast(node.getReverse())); + } + if (node.getTypeNode() == NodeDetail::Contour) { doc->SetAttribute(nod, AttrNodeType, NodeTypeContour); diff --git a/src/app/tools/vtooldetail.h b/src/app/tools/vtooldetail.h index 61cf79210..f5aeefe06 100644 --- a/src/app/tools/vtooldetail.h +++ b/src/app/tools/vtooldetail.h @@ -74,6 +74,7 @@ public: static const QString AttrWidth; static const QString AttrIdObject; static const QString AttrNodeType; + static const QString AttrReverse; static const QString NodeTypeContour; static const QString NodeTypeModeling; static const QString NodeArc; diff --git a/src/app/tools/vtooluniondetails.cpp b/src/app/tools/vtooluniondetails.cpp index 8baf5946a..d59f93e40 100644 --- a/src/app/tools/vtooluniondetails.cpp +++ b/src/app/tools/vtooluniondetails.cpp @@ -257,7 +257,7 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer qDebug()<<"May be wrong tool type!!! Ignoring."< VToolUnionDetails::GetDetailFromFile(VPattern *doc, const QDomE quint32 id = doc->GetParametrUInt(element, VToolDetail::AttrIdObject, NULL_ID_STR); qreal mx = qApp->toPixel(doc->GetParametrDouble(element, VAbstractTool::AttrMx, "0.0")); qreal my = qApp->toPixel(doc->GetParametrDouble(element, VAbstractTool::AttrMy, "0.0")); + const bool reversed = doc->GetParametrUInt(element, VToolDetail::AttrReverse, "0"); Tool tool = Tool::NodePoint; NodeDetail nodeType = NodeDetail::Contour; QString t = doc->GetParametrString(element, "type", "NodePoint"); @@ -713,7 +714,7 @@ QVector VToolUnionDetails::GetDetailFromFile(VPattern *doc, const QDomE { tool = Tool::NodeSplinePath; } - d.append(VNodeDetail(id, tool, nodeType, mx, my)); + d.append(VNodeDetail(id, tool, nodeType, mx, my, reversed)); } } } diff --git a/src/app/xml/vpattern.cpp b/src/app/xml/vpattern.cpp index 7673dbd44..85df02add 100644 --- a/src/app/xml/vpattern.cpp +++ b/src/app/xml/vpattern.cpp @@ -980,6 +980,7 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document const quint32 id = GetParametrUInt(element, VToolDetail::AttrIdObject, NULL_ID_STR); const qreal mx = qApp->toPixel(GetParametrDouble(element, VAbstractTool::AttrMx, "0.0")); const qreal my = qApp->toPixel(GetParametrDouble(element, VAbstractTool::AttrMy, "0.0")); + const bool reverse = GetParametrUInt(element, VToolDetail::AttrReverse, "0"); const NodeDetail nodeType = NodeDetail::Contour; const QString t = GetParametrString(element, AttrType, "NodePoint"); @@ -1004,7 +1005,7 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document continue; break; } - detail.append(VNodeDetail(id, tool, nodeType, mx, my)); + detail.append(VNodeDetail(id, tool, nodeType, mx, my, reverse)); } } } diff --git a/src/libs/ifc/schema.qrc b/src/libs/ifc/schema.qrc index ce37b86bc..93866bf60 100644 --- a/src/libs/ifc/schema.qrc +++ b/src/libs/ifc/schema.qrc @@ -3,5 +3,6 @@ schema/individual_measurements.xsd schema/standard_measurements.xsd schema/pattern/v0.1.1.xsd + schema/pattern/v0.1.2.xsd diff --git a/src/libs/ifc/schema/pattern/v0.1.2.xsd b/src/libs/ifc/schema/pattern/v0.1.2.xsd new file mode 100644 index 000000000..134c9be89 --- /dev/null +++ b/src/libs/ifc/schema/pattern/v0.1.2.xsd @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index 8352cbc1c..1a7165978 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -40,8 +40,8 @@ */ const QString VPatternConverter::PatternMinVerStr = QStringLiteral("0.1.1"); -const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.1.1"); -const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.1.1.xsd"); +const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.1.2"); +const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.1.2.xsd"); //--------------------------------------------------------------------------------------------------------------------- VPatternConverter::VPatternConverter(const QString &fileName) @@ -87,8 +87,8 @@ QString VPatternConverter::XSDSchema(int ver) const switch(ver) { case (0x000101): -// return QStringLiteral("://schema/pattern/v0.1.2.xsd"); -// case (0x000102): + return QStringLiteral("://schema/pattern/v0.1.1.xsd"); + case (0x000102): return CurrentSchema; default: { @@ -107,13 +107,13 @@ void VPatternConverter::ApplyPatches() switch(ver) { case (0x000101): -// { -// ToV0_1_2(); -// const QString schema = XSDSchema(0x000102); -// ValidateXML(schema, fileName); -// break; -// } -// case (0x000102): + { + ToV0_1_2(); + const QString schema = XSDSchema(0x000102); + ValidateXML(schema, fileName); + break; + } + case (0x000102): break; default: break; @@ -139,8 +139,8 @@ void VPatternConverter::ApplyPatches() } //--------------------------------------------------------------------------------------------------------------------- -//void VPatternConverter::ToV0_1_2() -//{ -// SetVersion("0.1.2"); -// Save(); -//} +void VPatternConverter::ToV0_1_2() +{ + SetVersion("0.1.2"); + Save(); +} diff --git a/src/libs/ifc/xml/vpatternconverter.h b/src/libs/ifc/xml/vpatternconverter.h index 5f1629976..118176eea 100644 --- a/src/libs/ifc/xml/vpatternconverter.h +++ b/src/libs/ifc/xml/vpatternconverter.h @@ -54,7 +54,7 @@ private: Q_DISABLE_COPY(VPatternConverter) static const QString PatternMinVerStr; -// void ToV0_1_2(); + void ToV0_1_2(); }; #endif // VPATTERNCONVERTER_H