Tool seam allowance add support for elliptical arc.
--HG-- branch : feature
This commit is contained in:
parent
0882313f1e
commit
b6d0aa1a1f
|
@ -577,7 +577,8 @@ VPieceNode VPattern::ParseSANode(const QDomElement &domElement) const
|
||||||
const QStringList types = QStringList() << VAbstractPattern::NodePoint
|
const QStringList types = QStringList() << VAbstractPattern::NodePoint
|
||||||
<< VAbstractPattern::NodeArc
|
<< VAbstractPattern::NodeArc
|
||||||
<< VAbstractPattern::NodeSpline
|
<< VAbstractPattern::NodeSpline
|
||||||
<< VAbstractPattern::NodeSplinePath;
|
<< VAbstractPattern::NodeSplinePath
|
||||||
|
<< VAbstractPattern::NodeElArc;
|
||||||
|
|
||||||
switch (types.indexOf(t))
|
switch (types.indexOf(t))
|
||||||
{
|
{
|
||||||
|
@ -593,6 +594,9 @@ VPieceNode VPattern::ParseSANode(const QDomElement &domElement) const
|
||||||
case 3: // VAbstractPattern::NodeSplinePath
|
case 3: // VAbstractPattern::NodeSplinePath
|
||||||
tool = Tool::NodeSplinePath;
|
tool = Tool::NodeSplinePath;
|
||||||
break;
|
break;
|
||||||
|
case 4: // NodeElArc
|
||||||
|
tool = Tool::NodeElArc;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
VException e(tr("Wrong tag name '%1'.").arg(t));
|
VException e(tr("Wrong tag name '%1'.").arg(t));
|
||||||
throw e;
|
throw e;
|
||||||
|
|
|
@ -31,11 +31,13 @@
|
||||||
#include "../vpatterndb/vpiecenode.h"
|
#include "../vpatterndb/vpiecenode.h"
|
||||||
#include "../vpatterndb/vpiecepath.h"
|
#include "../vpatterndb/vpiecepath.h"
|
||||||
#include "nodeDetails/vnodearc.h"
|
#include "nodeDetails/vnodearc.h"
|
||||||
|
#include "nodeDetails/vnodeellipticalarc.h"
|
||||||
#include "nodeDetails/vnodepoint.h"
|
#include "nodeDetails/vnodepoint.h"
|
||||||
#include "nodeDetails/vnodespline.h"
|
#include "nodeDetails/vnodespline.h"
|
||||||
#include "nodeDetails/vnodesplinepath.h"
|
#include "nodeDetails/vnodesplinepath.h"
|
||||||
#include "nodeDetails/vtoolpiecepath.h"
|
#include "nodeDetails/vtoolpiecepath.h"
|
||||||
#include "../vgeometry/varc.h"
|
#include "../vgeometry/varc.h"
|
||||||
|
#include "../vgeometry/vellipticalarc.h"
|
||||||
#include "../vgeometry/vcubicbezier.h"
|
#include "../vgeometry/vcubicbezier.h"
|
||||||
#include "../vgeometry/vcubicbezierpath.h"
|
#include "../vgeometry/vcubicbezierpath.h"
|
||||||
#include "../vgeometry/vpointf.h"
|
#include "../vgeometry/vpointf.h"
|
||||||
|
@ -106,6 +108,12 @@ VToolSeamAllowance *VToolSeamAllowance::Create(DialogTool *dialog, VMainGraphics
|
||||||
VNodeArc::Create(doc, data, id, nodeD.GetId(), Document::FullParse, Source::FromGui);
|
VNodeArc::Create(doc, data, id, nodeD.GetId(), Document::FullParse, Source::FromGui);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case (Tool::NodeElArc):
|
||||||
|
{
|
||||||
|
id = CreateNode<VEllipticalArc>(data, nodeD.GetId());
|
||||||
|
VNodeEllipticalArc::Create(doc, data, id, nodeD.GetId(), Document::FullParse, Source::FromGui);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case (Tool::NodeSpline):
|
case (Tool::NodeSpline):
|
||||||
{
|
{
|
||||||
const auto obj = data->GetGObject(nodeD.GetId());
|
const auto obj = data->GetGObject(nodeD.GetId());
|
||||||
|
@ -736,6 +744,7 @@ void VToolSeamAllowance::InitNodes(const VPiece &detail, VMainGraphicsScene *sce
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (Tool::NodeArc):
|
case (Tool::NodeArc):
|
||||||
|
case (Tool::NodeElArc):
|
||||||
case (Tool::NodeSpline):
|
case (Tool::NodeSpline):
|
||||||
case (Tool::NodeSplinePath):
|
case (Tool::NodeSplinePath):
|
||||||
doc->IncrementReferens(detail.GetPath().at(i).GetId());
|
doc->IncrementReferens(detail.GetPath().at(i).GetId());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user