New internal variable RotationElArc.
--HG-- branch : develop
This commit is contained in:
parent
8b16cead24
commit
e6dcfd708b
|
@ -36,6 +36,7 @@
|
||||||
- [#783] Flipping control.
|
- [#783] Flipping control.
|
||||||
- [#790] Generate unique name for each detail.
|
- [#790] Generate unique name for each detail.
|
||||||
- [#792] New feature. Visibility trigger for internal path.
|
- [#792] New feature. Visibility trigger for internal path.
|
||||||
|
- New internal variable RotationElArc.
|
||||||
|
|
||||||
# Version 0.5.1
|
# Version 0.5.1
|
||||||
- [#683] Tool Seam allowance's dialog is off screen on small resolutions.
|
- [#683] Tool Seam allowance's dialog is off screen on small resolutions.
|
||||||
|
|
|
@ -283,6 +283,8 @@ const QString angle2SplPath = angle2_V + splPath;
|
||||||
const QString seg_ = QStringLiteral("Seg_");
|
const QString seg_ = QStringLiteral("Seg_");
|
||||||
const QString currentLength = QStringLiteral("CurrentLength");
|
const QString currentLength = QStringLiteral("CurrentLength");
|
||||||
const QString currentSeamAllowance = QStringLiteral("CurrentSeamAllowance");
|
const QString currentSeamAllowance = QStringLiteral("CurrentSeamAllowance");
|
||||||
|
const QString rotation_V = QStringLiteral("Rotation");
|
||||||
|
const QString rotationElArc_ = rotation_V + elarc_;
|
||||||
|
|
||||||
const QStringList builInVariables = QStringList() << measurement_
|
const QStringList builInVariables = QStringList() << measurement_
|
||||||
<< increment_
|
<< increment_
|
||||||
|
@ -309,4 +311,5 @@ const QStringList builInVariables = QStringList() << measurement_
|
||||||
<< c1LengthSpl_
|
<< c1LengthSpl_
|
||||||
<< c2LengthSpl_
|
<< c2LengthSpl_
|
||||||
<< c1LengthSplPath
|
<< c1LengthSplPath
|
||||||
<< c2LengthSplPath;
|
<< c2LengthSplPath
|
||||||
|
<< rotationElArc_;
|
||||||
|
|
|
@ -219,6 +219,8 @@ extern const QString angle2SplPath;
|
||||||
extern const QString seg_;
|
extern const QString seg_;
|
||||||
extern const QString currentLength;
|
extern const QString currentLength;
|
||||||
extern const QString currentSeamAllowance;
|
extern const QString currentSeamAllowance;
|
||||||
|
extern const QString rotation_V;
|
||||||
|
extern const QString rotationElArc_;
|
||||||
|
|
||||||
extern const QStringList builInVariables;
|
extern const QStringList builInVariables;
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "../ifc/ifcdef.h"
|
#include "../ifc/ifcdef.h"
|
||||||
#include "../vgeometry/vabstractcurve.h"
|
#include "../vgeometry/vabstractcurve.h"
|
||||||
#include "../vgeometry/vspline.h"
|
#include "../vgeometry/vspline.h"
|
||||||
|
#include "../vgeometry/vellipticalarc.h"
|
||||||
#include "vcurvevariable.h"
|
#include "vcurvevariable.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -44,6 +45,13 @@ VCurveAngle::VCurveAngle()
|
||||||
SetType(VarType::CurveAngle);
|
SetType(VarType::CurveAngle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VCurveAngle::VCurveAngle(const quint32 &id, const quint32 &parentId)
|
||||||
|
:VCurveVariable(id, parentId)
|
||||||
|
{
|
||||||
|
SetType(VarType::CurveAngle);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VCurveAngle::VCurveAngle(const quint32 &id, const quint32 &parentId, const VAbstractCurve *curve, CurveAngle angle)
|
VCurveAngle::VCurveAngle(const quint32 &id, const quint32 &parentId, const VAbstractCurve *curve, CurveAngle angle)
|
||||||
:VCurveVariable(id, parentId)
|
:VCurveVariable(id, parentId)
|
||||||
|
@ -81,21 +89,18 @@ VCurveAngle::VCurveAngle(const quint32 &id, const quint32 &parentId, const QStri
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VCurveAngle::VCurveAngle(const VCurveAngle &var)
|
VEllipticalArcRotation::VEllipticalArcRotation()
|
||||||
:VCurveVariable(var)
|
: VCurveAngle()
|
||||||
{}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
VCurveAngle &VCurveAngle::operator=(const VCurveAngle &var)
|
|
||||||
{
|
{
|
||||||
if ( &var == this )
|
SetType(VarType::CurveAngle);
|
||||||
{
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
VCurveVariable::operator=(var);
|
|
||||||
return *this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VCurveAngle::~VCurveAngle()
|
VEllipticalArcRotation::VEllipticalArcRotation(const quint32 &id, const quint32 &parentId, const VEllipticalArc *elArc)
|
||||||
{}
|
: VCurveAngle(id, parentId)
|
||||||
|
{
|
||||||
|
SetType(VarType::CurveAngle);
|
||||||
|
SCASSERT(elArc != nullptr)
|
||||||
|
SetValue(elArc->GetRotationAngle());
|
||||||
|
SetName(rotation_V + elArc->name());
|
||||||
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
|
|
||||||
class VAbstractCurve;
|
class VAbstractCurve;
|
||||||
class VSpline;
|
class VSpline;
|
||||||
|
class VEllipticalArc;
|
||||||
|
|
||||||
enum class CurveAngle : char { StartAngle, EndAngle };
|
enum class CurveAngle : char { StartAngle, EndAngle };
|
||||||
|
|
||||||
|
@ -47,9 +48,17 @@ public:
|
||||||
VCurveAngle(const quint32 &id, const quint32 &parentId, const VAbstractCurve *curve, CurveAngle angle);
|
VCurveAngle(const quint32 &id, const quint32 &parentId, const VAbstractCurve *curve, CurveAngle angle);
|
||||||
VCurveAngle(const quint32 &id, const quint32 &parentId, const QString &baseCurveName, const VSpline &spl,
|
VCurveAngle(const quint32 &id, const quint32 &parentId, const QString &baseCurveName, const VSpline &spl,
|
||||||
CurveAngle angle, qint32 segment);
|
CurveAngle angle, qint32 segment);
|
||||||
VCurveAngle(const VCurveAngle &var);
|
virtual ~VCurveAngle() =default;
|
||||||
VCurveAngle &operator=(const VCurveAngle &var);
|
protected:
|
||||||
virtual ~VCurveAngle() Q_DECL_OVERRIDE;
|
VCurveAngle(const quint32 &id, const quint32 &parentId);
|
||||||
|
};
|
||||||
|
|
||||||
|
class VEllipticalArcRotation : public VCurveAngle
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
VEllipticalArcRotation();
|
||||||
|
VEllipticalArcRotation(const quint32 &id, const quint32 &parentId, const VEllipticalArc *elArc);
|
||||||
|
virtual ~VEllipticalArcRotation() =default;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // VCURVEANGLE_H
|
#endif // VCURVEANGLE_H
|
||||||
|
|
|
@ -376,6 +376,9 @@ void VContainer::AddArc(const QSharedPointer<VAbstractCurve> &arc, const quint32
|
||||||
|
|
||||||
VArcRadius *radius2 = new VArcRadius(id, parentId, casted.data(), 2, *GetPatternUnit());
|
VArcRadius *radius2 = new VArcRadius(id, parentId, casted.data(), 2, *GetPatternUnit());
|
||||||
AddVariable(radius2->GetName(), radius2);
|
AddVariable(radius2->GetName(), radius2);
|
||||||
|
|
||||||
|
VEllipticalArcRotation *rotation = new VEllipticalArcRotation(id, parentId, casted.data());
|
||||||
|
AddVariable(rotation->GetName(), rotation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -401,6 +401,7 @@ void VTranslateVars::InitVariables()
|
||||||
"Do not add symbol _ to the end of the name"));
|
"Do not add symbol _ to the end of the name"));
|
||||||
variables.insert(c2LengthSplPath, translate("VTranslateVars", "C2LengthSplPath",
|
variables.insert(c2LengthSplPath, translate("VTranslateVars", "C2LengthSplPath",
|
||||||
"Do not add symbol _ to the end of the name"));
|
"Do not add symbol _ to the end of the name"));
|
||||||
|
variables.insert(rotationElArc_, translate("VTranslateVars", "RotationElArc_", "Left symbol _ in the name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -145,6 +145,7 @@ void TST_BuitInRegExp::TestCheckUnderlineExists_data()
|
||||||
data.insert(c2LengthSpl_, true);
|
data.insert(c2LengthSpl_, true);
|
||||||
data.insert(c1LengthSplPath, false);
|
data.insert(c1LengthSplPath, false);
|
||||||
data.insert(c2LengthSplPath, false);
|
data.insert(c2LengthSplPath, false);
|
||||||
|
data.insert(rotationElArc_, true);
|
||||||
|
|
||||||
//Catch case when new internal variable appears.
|
//Catch case when new internal variable appears.
|
||||||
QCOMPARE(data.size(), builInVariables.size());
|
QCOMPARE(data.size(), builInVariables.size());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user