MOD: TECHDRAW (Removed unused functions)

Unused functions removed.
This commit is contained in:
Andrea
2025-04-03 09:49:42 +02:00
committed by Chris Hennes
parent 8963a0d8bc
commit 0bfc022191
4 changed files with 1 additions and 153 deletions

View File

@@ -115,37 +115,6 @@ QGraphicsPathItem* PATPathMaker::simpleLine(TechDraw::BaseGeomPtr base)
}
//! make a fragment (length = remain) of a dashed line, with pattern starting at +offset
QGraphicsPathItem* PATPathMaker::geomToStubbyLine(TechDraw::BaseGeomPtr base, double remain, LineSet& ls)
{
QGraphicsPathItem* fillItem = new QGraphicsPathItem(m_parent);
Base::Vector3d start(base->getStartPoint().x,
base->getStartPoint().y,
0.0);
Base::Vector3d end(base->getEndPoint().x,
base->getEndPoint().y,
0.0);
double origLen = (end - start).Length();
double appRemain = Rez::appX(remain);
Base::Vector3d newEnd = start + (ls.getUnitDir() * appRemain);
double newLen = (newEnd - start).Length();
if (newLen > origLen) {
newEnd = end;
}
double offset = Rez::guiX(m_fillScale * ls.getDashSpec().length()) - remain;
fillItem->setPath(dashedPPath(offsetDash(decodeDashSpec(ls.getDashSpec()), offset),
Rez::guiX(start),
Rez::guiX(newEnd)));
m_fillItems.push_back(fillItem);
return fillItem;
}
//! convert from mm to scene units
std::vector<double> PATPathMaker::decodeDashSpec(DashSpec patDash)
{
@@ -257,18 +226,3 @@ std::vector<double> PATPathMaker::offsetDash(const std::vector<double> dashPatte
return result;
}
//! find remaining length of a dash pattern after offset
double PATPathMaker::dashRemain(const std::vector<double> dashPattern, const double offset)
{
double length = 0.0;
for (auto& d: dashPattern) {
length += fabs(d);
}
if (offset > length) {
return 0.0;
}
return length - offset;
}