Renamed classes to more correct names.
--HG-- branch : develop
This commit is contained in:
parent
2cfe392322
commit
62f573ec55
|
@ -5,11 +5,11 @@ SOURCES += \
|
|||
container/vincrement.cpp \
|
||||
container/vvariable.cpp \
|
||||
container/vinternalvariable.cpp \
|
||||
container/vlengthline.cpp \
|
||||
container/vlengthspline.cpp \
|
||||
container/vlengtharc.cpp \
|
||||
container/vlineangle.cpp \
|
||||
container/vlengthcurve.cpp
|
||||
container/varclength.cpp \
|
||||
container/vcurvelength.cpp \
|
||||
container/vlinelength.cpp \
|
||||
container/vsplinelength.cpp
|
||||
|
||||
HEADERS += \
|
||||
container/vcontainer.h \
|
||||
|
@ -18,9 +18,9 @@ HEADERS += \
|
|||
container/vincrement.h \
|
||||
container/vvariable.h \
|
||||
container/vinternalvariable.h \
|
||||
container/vlengthline.h \
|
||||
container/vlengthspline.h \
|
||||
container/vlengtharc.h \
|
||||
container/vlineangle.h \
|
||||
container/variables.h \
|
||||
container/vlengthcurve.h
|
||||
container/vcurvelength.h \
|
||||
container/varclength.h \
|
||||
container/vlinelength.h \
|
||||
container/vsplinelength.h
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vlengtharc.cpp
|
||||
** @file varclength.cpp
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 28 7, 2014
|
||||
**
|
||||
|
@ -26,40 +26,40 @@
|
|||
**
|
||||
*************************************************************************/
|
||||
|
||||
#include "vlengtharc.h"
|
||||
#include "varclength.h"
|
||||
#include "../geometry/vabstractcurve.h"
|
||||
#include "../widgets/vapplication.h"
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthArc::VLengthArc()
|
||||
:VLengthCurve()
|
||||
VArcLength::VArcLength()
|
||||
:VCurveLength()
|
||||
{
|
||||
type = VarType::LengthArc;
|
||||
type = VarType::ArcLength;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthArc::VLengthArc(const quint32 &id, const quint32 &parentId, const VAbstractCurve *arc)
|
||||
:VLengthCurve(id, parentId, arc)
|
||||
VArcLength::VArcLength(const quint32 &id, const quint32 &parentId, const VAbstractCurve *arc)
|
||||
:VCurveLength(id, parentId, arc)
|
||||
{
|
||||
type = VarType::LengthArc;
|
||||
type = VarType::ArcLength;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthArc::VLengthArc(const VLengthArc &var)
|
||||
:VLengthCurve(var)
|
||||
VArcLength::VArcLength(const VArcLength &var)
|
||||
:VCurveLength(var)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthArc &VLengthArc::operator=(const VLengthArc &var)
|
||||
VArcLength &VArcLength::operator=(const VArcLength &var)
|
||||
{
|
||||
if ( &var == this )
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
VLengthCurve::operator=(var);
|
||||
VCurveLength::operator=(var);
|
||||
return *this;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthArc::~VLengthArc()
|
||||
VArcLength::~VArcLength()
|
||||
{}
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vlengtharc.h
|
||||
** @file varclength.h
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 28 7, 2014
|
||||
**
|
||||
|
@ -26,21 +26,21 @@
|
|||
**
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef VLENGTHARC_H
|
||||
#define VLENGTHARC_H
|
||||
#ifndef VARCLENGTH_H
|
||||
#define VARCLENGTH_H
|
||||
|
||||
#include "vlengthcurve.h"
|
||||
#include "vcurvelength.h"
|
||||
|
||||
class VAbstractCurve;
|
||||
|
||||
class VLengthArc :public VLengthCurve
|
||||
class VArcLength :public VCurveLength
|
||||
{
|
||||
public:
|
||||
VLengthArc();
|
||||
VLengthArc(const quint32 &id, const quint32 &parentId, const VAbstractCurve *arc);
|
||||
VLengthArc(const VLengthArc &var);
|
||||
VLengthArc &operator=(const VLengthArc &var);
|
||||
virtual ~VLengthArc();
|
||||
VArcLength();
|
||||
VArcLength(const quint32 &id, const quint32 &parentId, const VAbstractCurve *arc);
|
||||
VArcLength(const VArcLength &var);
|
||||
VArcLength &operator=(const VArcLength &var);
|
||||
virtual ~VArcLength();
|
||||
};
|
||||
|
||||
#endif // VLENGTHARC_H
|
||||
#endif // VARCLENGTH_H
|
|
@ -32,9 +32,9 @@
|
|||
#include "vinternalvariable.h"
|
||||
#include "vmeasurement.h"
|
||||
#include "vincrement.h"
|
||||
#include "vlengtharc.h"
|
||||
#include "vlengthline.h"
|
||||
#include "vlengthspline.h"
|
||||
#include "varclength.h"
|
||||
#include "vsplinelength.h"
|
||||
#include "vlinelength.h"
|
||||
#include "vlineangle.h"
|
||||
|
||||
#endif // VARIABLES_H
|
||||
|
|
|
@ -139,14 +139,14 @@ void VContainer::setData(const VContainer &data)
|
|||
case (VarType::Increment):
|
||||
CopyVar<VIncrement>(data, i.key());
|
||||
break;
|
||||
case (VarType::LengthLine):
|
||||
case (VarType::LineLength):
|
||||
CopyVar<VLengthLine>(data, i.key());
|
||||
break;
|
||||
case (VarType::LengthSpline):
|
||||
CopyVar<VLengthSpline>(data, i.key());
|
||||
case (VarType::SplineLength):
|
||||
CopyVar<VSplineLength>(data, i.key());
|
||||
break;
|
||||
case (VarType::LengthArc):
|
||||
CopyVar<VLengthArc>(data, i.key());
|
||||
case (VarType::ArcLength):
|
||||
CopyVar<VArcLength>(data, i.key());
|
||||
break;
|
||||
case (VarType::LineAngle):
|
||||
CopyVar<VLineAngle>(data, i.key());
|
||||
|
@ -446,19 +446,19 @@ const QMap<QString, VIncrement *> VContainer::DataIncrements() const
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
const QMap<QString, VLengthLine *> VContainer::DataLengthLines() const
|
||||
{
|
||||
return DataVar<VLengthLine>(VarType::LengthLine);
|
||||
return DataVar<VLengthLine>(VarType::LineLength);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
const QMap<QString, VLengthSpline *> VContainer::DataLengthSplines() const
|
||||
const QMap<QString, VSplineLength *> VContainer::DataLengthSplines() const
|
||||
{
|
||||
return DataVar<VLengthSpline>(VarType::LengthSpline);
|
||||
return DataVar<VSplineLength>(VarType::SplineLength);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
const QMap<QString, VLengthArc *> VContainer::DataLengthArcs() const
|
||||
const QMap<QString, VArcLength *> VContainer::DataLengthArcs() const
|
||||
{
|
||||
return DataVar<VLengthArc>(VarType::LengthArc);
|
||||
return DataVar<VArcLength>(VarType::ArcLength);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -187,8 +187,8 @@ public:
|
|||
const QMap<QString, VMeasurement *> DataMeasurements() const;
|
||||
const QMap<QString, VIncrement *> DataIncrements() const;
|
||||
const QMap<QString, VLengthLine *> DataLengthLines() const;
|
||||
const QMap<QString, VLengthSpline *> DataLengthSplines() const;
|
||||
const QMap<QString, VLengthArc *> DataLengthArcs() const;
|
||||
const QMap<QString, VSplineLength *> DataLengthSplines() const;
|
||||
const QMap<QString, VArcLength *> DataLengthArcs() const;
|
||||
const QMap<QString, VLineAngle *> DataAngleLines() const;
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vlengthcurve.cpp
|
||||
** @file vcurvelength.cpp
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 15 8, 2014
|
||||
**
|
||||
|
@ -26,19 +26,19 @@
|
|||
**
|
||||
*************************************************************************/
|
||||
|
||||
#include "vlengthcurve.h"
|
||||
#include "vcurvelength.h"
|
||||
#include "../widgets/vapplication.h"
|
||||
#include "../geometry/vabstractcurve.h"
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthCurve::VLengthCurve()
|
||||
VCurveLength::VCurveLength()
|
||||
:VInternalVariable(), id(0), parentId(0)
|
||||
{
|
||||
type = VarType::Unknown;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthCurve::VLengthCurve(const quint32 &id, const quint32 &parentId, const VAbstractCurve *curve)
|
||||
VCurveLength::VCurveLength(const quint32 &id, const quint32 &parentId, const VAbstractCurve *curve)
|
||||
:VInternalVariable(), id(id), parentId(parentId)
|
||||
{
|
||||
type = VarType::Unknown;
|
||||
|
@ -48,12 +48,12 @@ VLengthCurve::VLengthCurve(const quint32 &id, const quint32 &parentId, const VAb
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthCurve::VLengthCurve(const VLengthCurve &var)
|
||||
VCurveLength::VCurveLength(const VCurveLength &var)
|
||||
:VInternalVariable(var), id(var.GetId()), parentId(var.GetParentId())
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthCurve &VLengthCurve::operator=(const VLengthCurve &var)
|
||||
VCurveLength &VCurveLength::operator=(const VCurveLength &var)
|
||||
{
|
||||
if ( &var == this )
|
||||
{
|
||||
|
@ -66,11 +66,11 @@ VLengthCurve &VLengthCurve::operator=(const VLengthCurve &var)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthCurve::~VLengthCurve()
|
||||
VCurveLength::~VCurveLength()
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
bool VLengthCurve::Filter(quint32 id)
|
||||
bool VCurveLength::Filter(quint32 id)
|
||||
{
|
||||
if (parentId != 0)//Do not check if value zero
|
||||
{// Not all curves have parents. Only those who was created after cutting the parent curve.
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vlengthcurve.h
|
||||
** @file vcurvelength.h
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 15 8, 2014
|
||||
**
|
||||
|
@ -26,21 +26,21 @@
|
|||
**
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef VLENGTHCURVE_H
|
||||
#define VLENGTHCURVE_H
|
||||
#ifndef VCURVELENGTH_H
|
||||
#define VCURVELENGTH_H
|
||||
|
||||
#include "vinternalvariable.h"
|
||||
|
||||
class VAbstractCurve;
|
||||
|
||||
class VLengthCurve : public VInternalVariable
|
||||
class VCurveLength : public VInternalVariable
|
||||
{
|
||||
public:
|
||||
VLengthCurve();
|
||||
VLengthCurve(const quint32 &id, const quint32 &parentId, const VAbstractCurve *curve);
|
||||
VLengthCurve(const VLengthCurve &var);
|
||||
VLengthCurve &operator=(const VLengthCurve &var);
|
||||
virtual ~VLengthCurve();
|
||||
VCurveLength();
|
||||
VCurveLength(const quint32 &id, const quint32 &parentId, const VAbstractCurve *curve);
|
||||
VCurveLength(const VCurveLength &var);
|
||||
VCurveLength &operator=(const VCurveLength &var);
|
||||
virtual ~VCurveLength();
|
||||
|
||||
virtual bool Filter(quint32 id);
|
||||
quint32 GetId() const;
|
||||
|
@ -51,15 +51,15 @@ protected:
|
|||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
inline quint32 VLengthCurve::GetId() const
|
||||
inline quint32 VCurveLength::GetId() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
inline quint32 VLengthCurve::GetParentId() const
|
||||
inline quint32 VCurveLength::GetParentId() const
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
|
||||
#endif // VLENGTHCURVE_H
|
||||
#endif // VCURVELENGTH_H
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include <QString>
|
||||
|
||||
enum class VarType : char { Measurement, Increment, LengthLine, LengthSpline, LengthArc, LineAngle, Unknown };
|
||||
enum class VarType : char { Measurement, Increment, LineLength, SplineLength, ArcLength, LineAngle, Unknown };
|
||||
|
||||
class VInternalVariable
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vlengthline.cpp
|
||||
** @file vlinelength.cpp
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 28 7, 2014
|
||||
**
|
||||
|
@ -26,7 +26,7 @@
|
|||
**
|
||||
*************************************************************************/
|
||||
|
||||
#include "vlengthline.h"
|
||||
#include "vlinelength.h"
|
||||
#include "../geometry/vpointf.h"
|
||||
#include "../widgets/vapplication.h"
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
VLengthLine::VLengthLine()
|
||||
:VInternalVariable(), p1Id(0), p2Id(0)
|
||||
{
|
||||
type = VarType::LengthLine;
|
||||
type = VarType::LineLength;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -46,7 +46,7 @@ VLengthLine::VLengthLine(const VPointF *p1, const quint32 &p1Id, const VPointF *
|
|||
SCASSERT(p1 != nullptr);
|
||||
SCASSERT(p2 != nullptr);
|
||||
|
||||
type = VarType::LengthLine;
|
||||
type = VarType::LineLength;
|
||||
name = QString(line_+"%1_%2").arg(p1->name(), p2->name());
|
||||
SetValue(p1, p2);
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vlengthline.h
|
||||
** @file vlinelength.h
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 28 7, 2014
|
||||
**
|
||||
|
@ -26,8 +26,8 @@
|
|||
**
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef VLENGTHLINE_H
|
||||
#define VLENGTHLINE_H
|
||||
#ifndef VLINELENGTH_H
|
||||
#define VLINELENGTH_H
|
||||
|
||||
#include "vinternalvariable.h"
|
||||
|
||||
|
@ -63,4 +63,4 @@ inline quint32 VLengthLine::GetP2Id() const
|
|||
return p2Id;
|
||||
}
|
||||
|
||||
#endif // VLENGTHLINE_H
|
||||
#endif // VLINELENGTH_H
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vlengthsplines.cpp
|
||||
** @file vsplinelength.cpp
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 28 7, 2014
|
||||
**
|
||||
|
@ -26,21 +26,21 @@
|
|||
**
|
||||
*************************************************************************/
|
||||
|
||||
#include "vlengthspline.h"
|
||||
#include "vsplinelength.h"
|
||||
#include "../geometry/vabstractcurve.h"
|
||||
#include "../widgets/vapplication.h"
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthSpline::VLengthSpline()
|
||||
:VLengthCurve()
|
||||
VSplineLength::VSplineLength()
|
||||
:VCurveLength()
|
||||
{
|
||||
type = VarType::LengthSpline;
|
||||
type = VarType::SplineLength;
|
||||
}
|
||||
|
||||
VLengthSpline::VLengthSpline(const quint32 &id, const quint32 &parentId, const QString &name, const qreal &value)
|
||||
:VLengthCurve()
|
||||
VSplineLength::VSplineLength(const quint32 &id, const quint32 &parentId, const QString &name, const qreal &value)
|
||||
:VCurveLength()
|
||||
{
|
||||
type = VarType::LengthSpline;
|
||||
type = VarType::SplineLength;
|
||||
this->name = name;
|
||||
this->value = value;
|
||||
this->id = id;
|
||||
|
@ -48,28 +48,28 @@ VLengthSpline::VLengthSpline(const quint32 &id, const quint32 &parentId, const Q
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthSpline::VLengthSpline(const quint32 &id, const quint32 &parentId, const VAbstractCurve *path)
|
||||
:VLengthCurve(id, parentId, path)
|
||||
VSplineLength::VSplineLength(const quint32 &id, const quint32 &parentId, const VAbstractCurve *path)
|
||||
:VCurveLength(id, parentId, path)
|
||||
{
|
||||
type = VarType::LengthSpline;
|
||||
type = VarType::SplineLength;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthSpline::VLengthSpline(const VLengthSpline &var)
|
||||
:VLengthCurve(var)
|
||||
VSplineLength::VSplineLength(const VSplineLength &var)
|
||||
:VCurveLength(var)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthSpline &VLengthSpline::operator=(const VLengthSpline &var)
|
||||
VSplineLength &VSplineLength::operator=(const VSplineLength &var)
|
||||
{
|
||||
if ( &var == this )
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
VLengthCurve::operator=(var);
|
||||
VCurveLength::operator=(var);
|
||||
return *this;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VLengthSpline::~VLengthSpline()
|
||||
VSplineLength::~VSplineLength()
|
||||
{}
|
|
@ -1,6 +1,6 @@
|
|||
/************************************************************************
|
||||
**
|
||||
** @file vlengthsplines.h
|
||||
** @file vlengthspline.h
|
||||
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||
** @date 28 7, 2014
|
||||
**
|
||||
|
@ -26,22 +26,22 @@
|
|||
**
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef VLENGTHSPLINES_H
|
||||
#define VLENGTHSPLINES_H
|
||||
#ifndef VSPLINESLENGTH_H
|
||||
#define VSPLINESLENGTH_H
|
||||
|
||||
#include "vlengthcurve.h"
|
||||
#include "vcurvelength.h"
|
||||
|
||||
class VAbstractCurve;
|
||||
|
||||
class VLengthSpline :public VLengthCurve
|
||||
class VSplineLength :public VCurveLength
|
||||
{
|
||||
public:
|
||||
VLengthSpline();
|
||||
VLengthSpline(const quint32 &id, const quint32 &parentId, const QString &name, const qreal &value);
|
||||
VLengthSpline(const quint32 &id, const quint32 &parentId, const VAbstractCurve *path);
|
||||
VLengthSpline(const VLengthSpline &var);
|
||||
VLengthSpline &operator=(const VLengthSpline &var);
|
||||
virtual ~VLengthSpline();
|
||||
VSplineLength();
|
||||
VSplineLength(const quint32 &id, const quint32 &parentId, const QString &name, const qreal &value);
|
||||
VSplineLength(const quint32 &id, const quint32 &parentId, const VAbstractCurve *path);
|
||||
VSplineLength(const VSplineLength &var);
|
||||
VSplineLength &operator=(const VSplineLength &var);
|
||||
virtual ~VSplineLength();
|
||||
};
|
||||
|
||||
#endif // VLENGTHSPLINES_H
|
||||
#endif // VSPLINELENGTH_H
|
|
@ -1004,7 +1004,7 @@ void DialogTool::ValChenged(int row)
|
|||
if (radioButtonLengthArc->isChecked())
|
||||
{
|
||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||
.arg(*data->GetVariable<VLengthArc *>(qApp->VarFromUser(item->text()))->GetValue())
|
||||
.arg(*data->GetVariable<VArcLength *>(qApp->VarFromUser(item->text()))->GetValue())
|
||||
.arg(tr("Arc length"));
|
||||
labelDescription->setText(desc);
|
||||
return;
|
||||
|
@ -1012,7 +1012,7 @@ void DialogTool::ValChenged(int row)
|
|||
if (radioButtonLengthCurve->isChecked())
|
||||
{
|
||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||
.arg(*data->GetVariable<VLengthSpline *>(qApp->VarFromUser(item->text()))->GetValue())
|
||||
.arg(*data->GetVariable<VSplineLength *>(qApp->VarFromUser(item->text()))->GetValue())
|
||||
.arg(tr("Curve length"));
|
||||
labelDescription->setText(desc);
|
||||
return;
|
||||
|
|
|
@ -140,12 +140,12 @@ VToolArc* VToolArc::Create(const quint32 _id, const quint32 ¢er, QString &ra
|
|||
if (typeCreation == Source::FromGui)
|
||||
{
|
||||
id = data->AddGObject(arc);
|
||||
data->AddCurveLength<VLengthArc>(id);
|
||||
data->AddCurveLength<VArcLength>(id);
|
||||
}
|
||||
else
|
||||
{
|
||||
data->UpdateGObject(id, arc);
|
||||
data->AddCurveLength<VLengthArc>(id);
|
||||
data->AddCurveLength<VArcLength>(id);
|
||||
if (parse != Document::FullParse)
|
||||
{
|
||||
doc->UpdateToolData(id, data);
|
||||
|
|
|
@ -142,8 +142,8 @@ VToolCutArc* VToolCutArc::Create(const quint32 _id, const QString &pointName, QS
|
|||
arc1id = data->AddGObject(new VArc(arc1));
|
||||
arc2id = data->AddGObject(new VArc(arc2));
|
||||
|
||||
data->AddCurveLength<VLengthArc>(arc1id, id);
|
||||
data->AddCurveLength<VLengthArc>(arc2id, id);
|
||||
data->AddCurveLength<VArcLength>(arc1id, id);
|
||||
data->AddCurveLength<VArcLength>(arc2id, id);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -155,8 +155,8 @@ VToolCutArc* VToolCutArc::Create(const quint32 _id, const QString &pointName, QS
|
|||
data->UpdateGObject(arc1id, new VArc(arc1));
|
||||
data->UpdateGObject(arc2id, new VArc(arc2));
|
||||
|
||||
data->AddCurveLength<VLengthArc>(arc1id, id);
|
||||
data->AddCurveLength<VLengthArc>(arc2id, id);
|
||||
data->AddCurveLength<VArcLength>(arc1id, id);
|
||||
data->AddCurveLength<VArcLength>(arc2id, id);
|
||||
|
||||
if (parse != Document::FullParse)
|
||||
{
|
||||
|
|
|
@ -136,11 +136,11 @@ void VToolCutSpline::Create(const quint32 _id, const QString &pointName, QString
|
|||
|
||||
VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve());
|
||||
spl1id = data->AddGObject(spline1);
|
||||
data->AddCurveLength<VLengthSpline>(spl1id, id);
|
||||
data->AddCurveLength<VSplineLength>(spl1id, id);
|
||||
|
||||
VSpline *spline2 = new VSpline(*p, spl2p2, spl2p3, spl->GetP4(), spl->GetKcurve());
|
||||
spl2id = data->AddGObject(spline2);
|
||||
data->AddCurveLength<VLengthSpline>(spl2id, id);
|
||||
data->AddCurveLength<VSplineLength>(spl2id, id);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -152,11 +152,11 @@ void VToolCutSpline::Create(const quint32 _id, const QString &pointName, QString
|
|||
|
||||
VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve());
|
||||
data->UpdateGObject(spl1id, spline1);
|
||||
data->AddCurveLength<VLengthSpline>(spl1id, id);
|
||||
data->AddCurveLength<VSplineLength>(spl1id, id);
|
||||
|
||||
VSpline *spline2 = new VSpline(*p, spl2p2, spl2p3, spl->GetP4(), spl->GetKcurve());
|
||||
data->UpdateGObject(spl2id, spline2);
|
||||
data->AddCurveLength<VLengthSpline>(spl2id, id);
|
||||
data->AddCurveLength<VSplineLength>(spl2id, id);
|
||||
|
||||
if (parse != Document::FullParse)
|
||||
{
|
||||
|
|
|
@ -198,18 +198,18 @@ void VToolCutSplinePath::Create(const quint32 _id, const QString &pointName, QSt
|
|||
if (typeCreation == Source::FromGui)
|
||||
{
|
||||
splPath1id = data->AddGObject(splPath1);
|
||||
data->AddCurveLength<VLengthSpline>(splPath1id, id);
|
||||
data->AddCurveLength<VSplineLength>(splPath1id, id);
|
||||
|
||||
splPath2id = data->AddGObject(splPath2);
|
||||
data->AddCurveLength<VLengthSpline>(splPath2id, id);
|
||||
data->AddCurveLength<VSplineLength>(splPath2id, id);
|
||||
}
|
||||
else
|
||||
{
|
||||
data->UpdateGObject(splPath1id, splPath1);
|
||||
data->AddCurveLength<VLengthSpline>(splPath1id, id);
|
||||
data->AddCurveLength<VSplineLength>(splPath1id, id);
|
||||
|
||||
data->UpdateGObject(splPath2id, splPath2);
|
||||
data->AddCurveLength<VLengthSpline>(splPath2id, id);
|
||||
data->AddCurveLength<VSplineLength>(splPath2id, id);
|
||||
|
||||
if (parse != Document::FullParse)
|
||||
{
|
||||
|
|
|
@ -154,12 +154,12 @@ void VToolSpline::Create(const quint32 _id, const quint32 &p1, const quint32 &p4
|
|||
if (typeCreation == Source::FromGui)
|
||||
{
|
||||
id = data->AddGObject(spline);
|
||||
data->AddCurveLength<VLengthSpline>(id);
|
||||
data->AddCurveLength<VSplineLength>(id);
|
||||
}
|
||||
else
|
||||
{
|
||||
data->UpdateGObject(id, spline);
|
||||
data->AddCurveLength<VLengthSpline>(id);
|
||||
data->AddCurveLength<VSplineLength>(id);
|
||||
if (parse != Document::FullParse)
|
||||
{
|
||||
doc->UpdateToolData(id, data);
|
||||
|
|
|
@ -136,12 +136,12 @@ void VToolSplinePath::Create(const quint32 _id, VSplinePath *path, VMainGraphics
|
|||
if (typeCreation == Source::FromGui)
|
||||
{
|
||||
id = data->AddGObject(path);
|
||||
data->AddCurveLength<VLengthSpline>(id);
|
||||
data->AddCurveLength<VSplineLength>(id);
|
||||
}
|
||||
else
|
||||
{
|
||||
data->UpdateGObject(id, path);
|
||||
data->AddCurveLength<VLengthSpline>(id);
|
||||
data->AddCurveLength<VSplineLength>(id);
|
||||
if (parse != Document::FullParse)
|
||||
{
|
||||
doc->UpdateToolData(id, data);
|
||||
|
|
Loading…
Reference in New Issue
Block a user