Fixes.
--HG-- branch : feature
This commit is contained in:
parent
e37e2d48f3
commit
93a812af08
|
@ -223,6 +223,7 @@ void DialogPointOfIntersectionArcs::SaveData()
|
||||||
|
|
||||||
point->setArc1Id(GetFirstArcId());
|
point->setArc1Id(GetFirstArcId());
|
||||||
point->setArc2Id(GetSecondArcId());
|
point->setArc2Id(GetSecondArcId());
|
||||||
|
point->setCrossPoint(GetCrossArcPoint());
|
||||||
point->RefreshGeometry();
|
point->RefreshGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,12 +56,12 @@ void VisToolPointOfIntersectionArcs::RefreshGeometry()
|
||||||
if (arc1Id > NULL_ID)
|
if (arc1Id > NULL_ID)
|
||||||
{
|
{
|
||||||
const QSharedPointer<VArc> arc1 = Visualization::data->GeometricObject<VArc>(arc1Id);
|
const QSharedPointer<VArc> arc1 = Visualization::data->GeometricObject<VArc>(arc1Id);
|
||||||
DrawPath(arc1Path, arc1->GetPath(PathDirection::Hide), Qt::darkGreen, Qt::SolidLine, Qt::RoundCap);
|
DrawPath(arc1Path, arc1->GetPath(PathDirection::Show), Qt::darkGreen, Qt::SolidLine, Qt::RoundCap);
|
||||||
|
|
||||||
if (arc2Id > NULL_ID)
|
if (arc2Id > NULL_ID)
|
||||||
{
|
{
|
||||||
const QSharedPointer<VArc> arc2 = Visualization::data->GeometricObject<VArc>(arc2Id);
|
const QSharedPointer<VArc> arc2 = Visualization::data->GeometricObject<VArc>(arc2Id);
|
||||||
DrawPath(arc2Path, arc2->GetPath(PathDirection::Hide), Qt::darkRed, Qt::SolidLine, Qt::RoundCap);
|
DrawPath(arc2Path, arc2->GetPath(PathDirection::Show), Qt::darkRed, Qt::SolidLine, Qt::RoundCap);
|
||||||
|
|
||||||
const QPointF fPoint = VToolPointOfIntersectionArcs::FindPoint(arc1.data(), arc2.data(), crossPoint);
|
const QPointF fPoint = VToolPointOfIntersectionArcs::FindPoint(arc1.data(), arc2.data(), crossPoint);
|
||||||
DrawPoint(point, fPoint, mainColor);
|
DrawPoint(point, fPoint, mainColor);
|
||||||
|
|
|
@ -874,10 +874,13 @@ void VToolOptionsPropertyBrowser::ChangeDataToolPointOfIntersectionArcs(VPropert
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
cross = CrossArcsPoint::FirstPoint;
|
cross = CrossArcsPoint::FirstPoint;
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
cross = CrossArcsPoint::SecondPoint;
|
cross = CrossArcsPoint::SecondPoint;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
cross = CrossArcsPoint::FirstPoint;
|
cross = CrossArcsPoint::FirstPoint;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i->SetCrossArcsPoint(cross);
|
i->SetCrossArcsPoint(cross);
|
||||||
|
|
|
@ -1142,7 +1142,8 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, QDomElement &domElem
|
||||||
<< VNodePoint::ToolType << VToolHeight::ToolType << VToolTriangle::ToolType
|
<< VNodePoint::ToolType << VToolHeight::ToolType << VToolTriangle::ToolType
|
||||||
<< VToolPointOfIntersection::ToolType << VToolCutSpline::ToolType
|
<< VToolPointOfIntersection::ToolType << VToolCutSpline::ToolType
|
||||||
<< VToolCutSplinePath::ToolType << VToolCutArc::ToolType
|
<< VToolCutSplinePath::ToolType << VToolCutArc::ToolType
|
||||||
<< VToolLineIntersectAxis::ToolType << VToolCurveIntersectAxis::ToolType;
|
<< VToolLineIntersectAxis::ToolType << VToolCurveIntersectAxis::ToolType
|
||||||
|
<< VToolPointOfIntersectionArcs::ToolType;
|
||||||
switch (points.indexOf(type))
|
switch (points.indexOf(type))
|
||||||
{
|
{
|
||||||
case 0: //VToolSinglePoint::ToolType
|
case 0: //VToolSinglePoint::ToolType
|
||||||
|
@ -1633,6 +1634,26 @@ void VPattern::ParsePointElement(VMainGraphicsScene *scene, QDomElement &domElem
|
||||||
throw excep;
|
throw excep;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 17: //VToolPointOfIntersectionArcs::ToolType
|
||||||
|
try
|
||||||
|
{
|
||||||
|
PointsCommonAttributes(domElement, id, name, mx, my);
|
||||||
|
const quint32 firstArcId = GetParametrUInt(domElement, VAbstractTool::AttrFirstArc, NULL_ID_STR);
|
||||||
|
const quint32 secondArcId = GetParametrUInt(domElement, VAbstractTool::AttrSecondArc, NULL_ID_STR);
|
||||||
|
const CrossArcsPoint crossPoint = static_cast<CrossArcsPoint>(GetParametrUInt(domElement,
|
||||||
|
VAbstractTool::AttrCrossPoint,
|
||||||
|
"1"));
|
||||||
|
|
||||||
|
VToolPointOfIntersectionArcs::Create(id, name, firstArcId, secondArcId, crossPoint, mx, my, scene, this,
|
||||||
|
data, parse, Source::FromFile);
|
||||||
|
}
|
||||||
|
catch (const VExceptionBadId &e)
|
||||||
|
{
|
||||||
|
VExceptionObjectError excep(tr("Error creating or updating point of intersection arcs"), domElement);
|
||||||
|
excep.AddMoreInformation(e.ErrorMessage());
|
||||||
|
throw excep;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
qDebug() << "Illegal point type in VDomDocument::ParsePointElement().";
|
qDebug() << "Illegal point type in VDomDocument::ParsePointElement().";
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user