From fe4ab358e506d1a30554d4f9e80506f653c8bfa0 Mon Sep 17 00:00:00 2001 From: Sebastian Hoogen Date: Thu, 8 Jan 2015 08:56:09 +0100 Subject: [PATCH 1/3] issue #1450 --- src/Mod/Part/App/modelRefine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Part/App/modelRefine.cpp b/src/Mod/Part/App/modelRefine.cpp index ae3455cd6053..2a7adb3d778a 100644 --- a/src/Mod/Part/App/modelRefine.cpp +++ b/src/Mod/Part/App/modelRefine.cpp @@ -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; @@ -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); From 9ce08e75963bf67962f7fc640d6077bd56b869aa Mon Sep 17 00:00:00 2001 From: Sebastian Hoogen Date: Thu, 8 Jan 2015 09:09:28 +0100 Subject: [PATCH 2/3] make the Qt::ISODate workaround obvious by including the intended implmentation --- src/Base/TimeInfo.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Base/TimeInfo.cpp b/src/Base/TimeInfo.cpp index 90827289385c..3c459a21ed11 100644 --- a/src/Base/TimeInfo.cpp +++ b/src/Base/TimeInfo.cpp @@ -71,6 +71,10 @@ 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); @@ -78,6 +82,7 @@ std::string TimeInfo::currentDateTimeString() local.setUtcOffset(utcOffset); QString dm = local.toString(Qt::ISODate); return dm.toStdString(); +#endif } std::string TimeInfo::diffTime(const TimeInfo &timeStart,const TimeInfo &timeEnd ) From ff8ad03aa337d5ee3cde906e80a2e690106a506f Mon Sep 17 00:00:00 2001 From: Sebastian Hoogen Date: Fri, 9 Jan 2015 13:22:53 +0100 Subject: [PATCH 3/3] bugfix in dxf output of arc regression created by 099ece5c00ba791a6c39a24544b143341a7bf1f2 --- src/Mod/Draft/importDXF.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index 4a8d1f351f75..6a80364fc152 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -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)