Merge branch 'master' into FixPathSort

This commit is contained in:
sliptonic
2020-04-06 14:33:55 -05:00
committed by GitHub
30 changed files with 216 additions and 126 deletions

View File

@@ -212,6 +212,11 @@ void Cloud::CloudWriter::createBucket()
// Let's build the Header and call to curl
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
#ifdef ALLOW_SELF_SIGNED_CERTIFICATE
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
#endif
if ( curl )
{
struct curl_slist *chunk = NULL;
@@ -390,6 +395,10 @@ Cloud::CloudWriter::CloudWriter(const char* Url, const char* AccessKey, const ch
// Let's build the Header and call to curl
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
#ifdef ALLOW_SELF_SIGNED_CERTIFICATE
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
#endif
if ( curl )
{
// Let's build our own header
@@ -577,6 +586,10 @@ Cloud::CloudReader::CloudReader(const char* Url, const char* AccessKey, const ch
std::string s;
RequestData = Cloud::ComputeDigestAmzS3v2("GET", "application/xml", path, this->SecretKey, NULL, 0);
curl = curl_easy_init();
#ifdef ALLOW_SELF_SIGNED_CERTIFICATE
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
#endif
if ( curl )
{
// Let's build our own header
@@ -661,6 +674,10 @@ void Cloud::CloudReader::DownloadFile(Cloud::CloudReader::FileEntry *entry)
// Let's build the Header and call to curl
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
#ifdef ALLOW_SELF_SIGNED_CERTIFICATE
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
#endif
if ( curl )
{
struct curl_slist *chunk = NULL;
@@ -771,6 +788,10 @@ void Cloud::CloudWriter::pushCloud(const char *FileName, const char *data, long
// Let's build the Header and call to curl
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
#ifdef ALLOW_SELF_SIGNED_CERTIFICATE
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
#endif
if ( curl )
{
struct curl_slist *chunk = NULL;

View File

@@ -1,8 +1,10 @@
#----------------------------- Control certificate validation ------------
option(ALLOW_SELF_SIGNED_CERTIFICATE "Allow self signed certificate" OFF)
if (ALLOW_SELF_SIGNED_CERTIFICATE)
add_compile_options("-DALLOW_SELF_SIGNED_CERTIFICATE")
endif ()
#------------------------------ OpenSSL and CURL -------------------------
if (APPLE)
set(OPENSSL_ROOT_DIR ${HOMEBREW_PREFIX}/Cellar/openssl/*)
endif(APPLE)
if (UNIX AND NOT APPLE)
if (UNIX AND APPLE)
find_package(PkgConfig REQUIRED)
pkg_search_module(OPENSSL REQUIRED openssl)
elseif(WIN32 AND LIBPACK_FOUND)
@@ -27,8 +29,8 @@ elseif(WIN32 AND LIBPACK_FOUND)
set(OPENSSL_VERSION ${openssl_version_str})
endif ()
else()
find_package(OPENSSL REQUIRED)
endif(UNIX AND NOT APPLE)
find_package(OpenSSL REQUIRED)
endif(UNIX AND APPLE)
if(OPENSSL_FOUND)
message(STATUS "openssl-${OPENSSL_VERSION} has been found\n")
else()

View File

@@ -13,7 +13,6 @@ SET(Draft_SRCS_base
DraftVecUtils.py
DraftGeomUtils.py
DraftLayer.py
DraftEdit.py
DraftFillet.py
WorkingPlane.py
getSVG.py
@@ -85,6 +84,7 @@ SET(Draft_GUI_tools
draftguitools/gui_snaps.py
draftguitools/gui_snapper.py
draftguitools/gui_trackers.py
draftguitools/gui_edit.py
draftguitools/README.md
)

View File

@@ -1619,7 +1619,7 @@ class DraftToolBar:
"""this function sends the entered text to the active draft command
if enter has been pressed twice. Otherwise it blanks the line.
"""
self.sourceCmd.text = self.textValue.toPlainText().split()
self.sourceCmd.text = self.textValue.toPlainText().splitlines()
self.sourceCmd.createObject()
def displayPoint(self, point=None, last=None, plane=None, mask=None):

View File

@@ -36,7 +36,7 @@ __url__ = "https://www.freecadweb.org"
# Generic stuff
#---------------------------------------------------------------------------
import sys, os, FreeCAD, FreeCADGui, WorkingPlane, math, re, Draft, Draft_rc, DraftVecUtils
import sys, FreeCAD, FreeCADGui, WorkingPlane, math, Draft, Draft_rc, DraftVecUtils
from FreeCAD import Vector
from PySide import QtCore,QtGui
import DraftGui
@@ -56,9 +56,9 @@ if not hasattr(FreeCAD, "DraftWorkingPlane"):
# Commands that have been migrated to their own modules
#---------------------------------------------------------------------------
import DraftEdit
# import DraftFillet
import draftguitools.gui_edit
import draftguitools.gui_selectplane
# import DraftFillet
import drafttaskpanels.task_shapestring as task_shapestring
import drafttaskpanels.task_scale as task_scale

View File

@@ -1,4 +1,8 @@
# -*- coding: utf8 -*-
"""Provide the Draft_Edit command used by the Draft workbench."""
## @package gui_edit
# \ingroup DRAFT
# \brief Provide the Draft_Edit command used by the Draft workbench
#***************************************************************************
#* Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
#* Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *

View File

@@ -38,7 +38,7 @@ class DraftImportTools(unittest.TestCase):
def test_import_gui_draftedit(self):
"""Import Draft Edit."""
module = "DraftEdit"
module = "draftguitools.gui_edit"
if not App.GuiUp:
aux._no_gui(module)
self.assertTrue(True)

View File

@@ -251,6 +251,9 @@
<property name="text">
<string>Two-side rendering</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>TwoSideRendering</cstring>
</property>

View File

@@ -246,7 +246,7 @@ ViewProviderPartExt::ViewProviderPartExt()
("User parameter:BaseApp/Preferences/Mod/Part");
NormalsFromUV = hPart->GetBool("NormalsFromUVNodes", NormalsFromUV);
long twoside = hPart->GetBool("TwoSideRendering", false) ? 1 : 0;
long twoside = hPart->GetBool("TwoSideRendering", true) ? 1 : 0;
// Let the user define a custom lower limit but a value less than
// OCCT's epsilon is not allowed

View File

@@ -59,8 +59,7 @@ def toolDepthAndOffset(width, extraDepth, tool):
toolOffset = float(tool.FlatRadius)
extraOffset = float(tool.Diameter) / 2 - width if 180 == angle else extraDepth / tan
offset = toolOffset + extraOffset
if offset < 0.0001:
offset = 0.01
return (depth, offset)