Skip to content

Commit

Permalink
Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jan 10, 2015
2 parents 6a3437e + ff8ad03 commit 0954adf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/Base/TimeInfo.cpp
Expand Up @@ -71,13 +71,18 @@ void TimeInfo::setTime_t (uint64_t seconds)

std::string TimeInfo::currentDateTimeString()
{
#if (QT_VERSION >= 0x050300)
return QDateTime::currentDateTime().toTimeSpec(Qt::OffsetFromUTC)
.toString(Qt::ISODate).toStdString();
#else
QDateTime local = QDateTime::currentDateTime();
QDateTime utc = local.toUTC();
utc.setTimeSpec(Qt::LocalTime);
int utcOffset = utc.secsTo(local);
local.setUtcOffset(utcOffset);
QString dm = local.toString(Qt::ISODate);
return dm.toStdString();
#endif
}

std::string TimeInfo::diffTime(const TimeInfo &timeStart,const TimeInfo &timeEnd )
Expand Down
3 changes: 3 additions & 0 deletions src/Mod/Draft/importDXF.py
Expand Up @@ -1357,6 +1357,9 @@ def getArcData(edge):
ang1,ang2=edge.ParameterRange
else:
ang2,ang1=edge.ParameterRange
if edge.Curve.XAxis != FreeCAD.Vector(1,0,0):
ang1 -= DraftVecUtils.angle(edge.Curve.XAxis)
ang2 -= DraftVecUtils.angle(edge.Curve.XAxis)
return DraftVecUtils.tup(ce), radius, math.degrees(ang1),\
math.degrees(ang2)

Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Part/App/modelRefine.cpp
Expand Up @@ -739,7 +739,7 @@ FaceTypedCylinder& ModelRefine::getCylinderObject()
/////////////////////////////////////////////////////////////////////////////////////////////////////////

// TODO: change this version after occ fix. Freecad Mantis 1450
#if OCC_VERSION_HEX <= 0x070000
#if OCC_VERSION_HEX <= 0x7fffff
void collectConicEdges(const TopoDS_Shell &shell, TopTools_IndexedMapOfShape &map)
{
TopTools_IndexedMapOfShape edges;
Expand Down Expand Up @@ -1026,7 +1026,7 @@ bool FaceUniter::process()

BRepLib_FuseEdges edgeFuse(workShell);
// TODO: change this version after occ fix. Freecad Mantis 1450
#if OCC_VERSION_HEX <= 0x070000
#if OCC_VERSION_HEX <= 0x7fffff
TopTools_IndexedMapOfShape map;
collectConicEdges(workShell, map);
edgeFuse.AvoidEdges(map);
Expand Down

0 comments on commit 0954adf

Please sign in to comment.