Merge branch 'master' of ssh://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad into freecad-ship
2
.gitattributes
vendored
|
@ -14,3 +14,5 @@ UpdateResources.bat export-ignore
|
|||
BuildVersion.bat export-ignore
|
||||
*.sln export-ignore
|
||||
WindowsInstaller export-ignore
|
||||
Version.h.in export-subst
|
||||
|
||||
|
|
|
@ -56,15 +56,21 @@ endif(CMAKE_COMPILER_IS_GNUCXX)
|
|||
|
||||
|
||||
# ================================================================================
|
||||
|
||||
# Output directories for install target
|
||||
|
||||
if(WIN32)
|
||||
SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR})
|
||||
else(WIN32)
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr/lib${LIB_SUFFIX}/freecad")
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr/lib${LIB_SUFFIX}/freecad" CACHE PATH "Installation root directory")
|
||||
SET(INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
|
||||
SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
|
||||
SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# == Win32 is default behaviour use the LibPack copied in Source tree ==========
|
||||
if(MSVC)
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
add_subdirectory(examples)
|
||||
|
||||
INSTALL(
|
||||
FILES
|
||||
License.txt
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_DATADIR}
|
||||
)
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
SET(Examples_Files
|
||||
Schenkel.stp
|
||||
DrawingExample.FCStd
|
||||
EngineBlock.FCStd
|
||||
PartDesignExample.FCStd
|
||||
RobotExample.FCStd
|
||||
)
|
||||
|
@ -16,6 +17,6 @@ INSTALL(
|
|||
FILES
|
||||
${Examples_Files}
|
||||
DESTINATION
|
||||
data/examples
|
||||
${CMAKE_INSTALL_DATADIR}/examples
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#define FCVersionMajor "0"
|
||||
#define FCVersionMinor "13"
|
||||
#define FCVersionName "Vulcan"
|
||||
|
||||
// test: $Format:Hash (%H), Date: %ci$
|
||||
#define FCRevision "$WCREV$" //Highest committed revision number
|
||||
#define FCRevisionDate "$WCDATE$" //Date of highest committed revision
|
||||
#define FCRepositoryURL "$WCURL$" //Repository URL of the working copy
|
||||
|
|
|
@ -12,10 +12,15 @@ if(FREECAD_BUILD_GUI)
|
|||
configure_file(Doc/freecad.qch ${CMAKE_BINARY_DIR}/doc/freecad.qch COPYONLY)
|
||||
endif(FREECAD_BUILD_GUI)
|
||||
|
||||
#if(FREECAD_MAINTAINERS_BUILD)
|
||||
if(FREECAD_MAINTAINERS_BUILD)
|
||||
add_subdirectory(Doc)
|
||||
#endif(FREECAD_MAINTAINERS_BUILD)
|
||||
endif(FREECAD_MAINTAINERS_BUILD)
|
||||
|
||||
if(FREECAD_MAINTAINERS_BUILD AND WIN32)
|
||||
#add_subdirectory(WindowsInstaller)
|
||||
endif(FREECAD_MAINTAINERS_BUILD AND WIN32)
|
||||
|
||||
INSTALL(FILES Doc/Start_Page.html Doc/freecad.qhc Doc/freecad.qch
|
||||
DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
)
|
||||
|
||||
|
|
|
@ -848,4 +848,8 @@ else(WIN32)
|
|||
INSTALL(TARGETS FreeCADGui
|
||||
LIBRARY DESTINATION lib
|
||||
)
|
||||
INSTALL(FILES Icons/freecad.xpm Icons/freecad-doc.png
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}
|
||||
)
|
||||
endif(WIN32)
|
||||
|
||||
|
|
|
@ -52,6 +52,8 @@
|
|||
#include "Placement.h"
|
||||
#include "WaitCursor.h"
|
||||
#include "ViewProvider.h"
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
#include "MergeDocuments.h"
|
||||
|
||||
using namespace Gui;
|
||||
|
@ -1022,6 +1024,46 @@ bool StdCmdPlacement::isActive(void)
|
|||
return (Gui::Control().activeDialog()==0);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Std_Edit
|
||||
//===========================================================================
|
||||
DEF_STD_CMD_A(StdCmdEdit);
|
||||
|
||||
StdCmdEdit::StdCmdEdit()
|
||||
:Command("Std_Edit")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Edit");
|
||||
sMenuText = QT_TR_NOOP("Toggle &Editmode");
|
||||
sToolTipText = QT_TR_NOOP("Toggles the selected object's edit mode");
|
||||
sWhatsThis = "Std_Edit";
|
||||
sStatusTip = QT_TR_NOOP("Enters or leaves the selected object's edit mode");
|
||||
#if QT_VERSION >= 0x040200
|
||||
sPixmap = "edit-edit";
|
||||
#endif
|
||||
eType = ForEdit;
|
||||
}
|
||||
|
||||
void StdCmdEdit::activated(int iMsg)
|
||||
{
|
||||
Gui::MDIView* view = Gui::getMainWindow()->activeWindow();
|
||||
if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) {
|
||||
Gui::View3DInventorViewer* viewer = static_cast<Gui::View3DInventor*>(view)->getViewer();
|
||||
if (viewer->isEditingViewProvider()) {
|
||||
doCommand(Command::Gui,"Gui.activeDocument().resetEdit()");
|
||||
} else {
|
||||
if (Selection().getCompleteSelection().size() > 0) {
|
||||
SelectionSingleton::SelObj obj = Selection().getCompleteSelection()[0];
|
||||
doCommand(Command::Gui,"Gui.activeDocument().setEdit(\"%s\",0)",obj.FeatName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool StdCmdEdit::isActive(void)
|
||||
{
|
||||
return (Selection().getCompleteSelection().size() > 0) || (Gui::Control().activeDialog() != 0);
|
||||
}
|
||||
|
||||
|
||||
namespace Gui {
|
||||
|
||||
|
@ -1054,6 +1096,7 @@ void CreateDocCommands(void)
|
|||
rcCmdMgr.addCommand(new StdCmdRefresh());
|
||||
rcCmdMgr.addCommand(new StdCmdTransform());
|
||||
rcCmdMgr.addCommand(new StdCmdPlacement());
|
||||
rcCmdMgr.addCommand(new StdCmdEdit());
|
||||
}
|
||||
|
||||
} // namespace Gui
|
||||
|
|
149
src/Gui/Icons/edit-edit.svg
Normal file
|
@ -0,0 +1,149 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64"
|
||||
height="64"
|
||||
id="svg4025"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.1 r9760"
|
||||
sodipodi:docname="edit-edit.svg">
|
||||
<defs
|
||||
id="defs4027">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 16 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="32 : 16 : 1"
|
||||
inkscape:persp3d-origin="16 : 10.666667 : 1"
|
||||
id="perspective4033" />
|
||||
<inkscape:perspective
|
||||
id="perspective4010"
|
||||
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||
inkscape:vp_z="1 : 0.5 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_x="0 : 0.5 : 1"
|
||||
sodipodi:type="inkscape:persp3d" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4095"
|
||||
id="linearGradient3999"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="901.1875"
|
||||
y1="1190.875"
|
||||
x2="1267.9062"
|
||||
y2="1190.875"
|
||||
gradientTransform="matrix(0.10456791,0,0,0.10456791,420.90006,31.02362)" />
|
||||
<linearGradient
|
||||
id="linearGradient4095">
|
||||
<stop
|
||||
style="stop-color:#0044be;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4097" />
|
||||
<stop
|
||||
style="stop-color:#2b90cc;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop4099" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4095"
|
||||
id="linearGradient2979"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.13878644,0,0,0.1266123,-121.41255,-154.04118)"
|
||||
x1="901.1875"
|
||||
y1="1190.875"
|
||||
x2="1267.9062"
|
||||
y2="1190.875" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.9795105"
|
||||
inkscape:cx="-43.110306"
|
||||
inkscape:cy="48.878745"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="757"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="20"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata4030">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
transform="translate(0,32)">
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000621;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 50.997977,1.1344967 3.432738,3.3992652 c 0,0 1.210331,6.8306391 1.815497,10.2459571 0.605165,3.415319 1.815494,10.245958 1.815494,10.245958 0,0 -7.757014,-1.057726 -11.316388,-1.815656 -3.559372,-0.757933 -10.039854,-2.731932 -10.039854,-2.731932 l -4.999305,-4.90932"
|
||||
id="path3385-6"
|
||||
sodipodi:nodetypes="cczczcc"
|
||||
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
|
||||
inkscape:export-xdpi="6.2926431"
|
||||
inkscape:export-ydpi="6.2926431"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:url(#linearGradient2979);fill-opacity:1;fill-rule:evenodd;stroke:#000621;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
d="m 22.71718,-26.934304 c 0,0 -6.207288,-0.559419 -12.046285,5.299332 -5.8389965,5.858751 -6.3169063,10.151334 -6.3169063,10.151334 L 36.600148,20.410791 c -0.276624,-0.52502 -0.429376,-1.105486 -0.429376,-1.717188 0,-2.329777 1.221359,-4.975527 3.968622,-4.975527 0.743862,0 1.44788,0.139443 2.081797,0.387739 l 0.299267,-0.253217 c -0.09276,-0.321979 -0.143125,-0.659396 -0.143125,-1.004974 0,-2.329801 2.47993,-4.4743223 5.227207,-4.4743223 0.422165,0 0.831524,0.046264 1.223062,0.1305676 l 1.040912,-0.8744134 c -0.05799,-0.256209 -0.09104,-0.5210491 -0.09104,-0.7913281 0,-1.8379317 3.033164,-1.5039843 4.968355,-2.082003 L 22.717225,-26.934304 z"
|
||||
id="rect2390-8"
|
||||
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
|
||||
inkscape:export-xdpi="6.2926431"
|
||||
inkscape:export-ydpi="6.2926431"
|
||||
sodipodi:nodetypes="czccssccssccsccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000621;stroke-width:1.32559693;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 48.544883,7.6133709 15.050897,-24.733532"
|
||||
id="path3373-7"
|
||||
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
|
||||
inkscape:export-xdpi="6.2926431"
|
||||
inkscape:export-ydpi="6.2926431"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000621;stroke-width:1.32559693;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 41.787708,13.237662 9.4859605,-19.489738"
|
||||
id="path3375-9"
|
||||
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
|
||||
inkscape:export-xdpi="6.2926431"
|
||||
inkscape:export-ydpi="6.2926431"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:#000621;fill-opacity:1;fill-rule:evenodd;stroke:#000621;stroke-width:0.13255970000000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 56.215108,14.884285 c 0,0 -3.733918,2.191368 -5.205971,3.44903 -1.472051,1.257659 -3.626343,4.096932 -3.626343,4.096932 l 11.075451,2.557967 -2.243137,-10.103929 z"
|
||||
id="path3387-0"
|
||||
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
|
||||
inkscape:export-xdpi="6.2926431"
|
||||
inkscape:export-ydpi="6.2926431"
|
||||
sodipodi:nodetypes="czccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.6 KiB |
|
@ -45,6 +45,7 @@
|
|||
<file>edit-select-all.svg</file>
|
||||
<file>edit-redo.svg</file>
|
||||
<file>edit-undo.svg</file>
|
||||
<file>edit-edit.svg</file>
|
||||
<file>help-browser.svg</file>
|
||||
<file>preferences-system.svg</file>
|
||||
<file>window-new.svg</file>
|
||||
|
|
|
@ -197,15 +197,19 @@ namespace Gui {
|
|||
public:
|
||||
PythonRedirector(const char* type, PyObject* obj) : std_out(type), out(obj)
|
||||
{
|
||||
Base::PyGILStateLocker lock;
|
||||
old = PySys_GetObject(const_cast<char*>(std_out));
|
||||
PySys_SetObject(const_cast<char*>(std_out), obj);
|
||||
if (out) {
|
||||
Base::PyGILStateLocker lock;
|
||||
old = PySys_GetObject(const_cast<char*>(std_out));
|
||||
PySys_SetObject(const_cast<char*>(std_out), out);
|
||||
}
|
||||
}
|
||||
~PythonRedirector()
|
||||
{
|
||||
Base::PyGILStateLocker lock;
|
||||
PySys_SetObject(const_cast<char*>(std_out), old);
|
||||
Py_XDECREF(out);
|
||||
if (out) {
|
||||
Base::PyGILStateLocker lock;
|
||||
PySys_SetObject(const_cast<char*>(std_out), old);
|
||||
Py_DECREF(out);
|
||||
}
|
||||
}
|
||||
private:
|
||||
const char* std_out;
|
||||
|
@ -217,8 +221,12 @@ namespace Gui {
|
|||
void MacroManager::run(MacroType eType,const char *sName)
|
||||
{
|
||||
try {
|
||||
PythonRedirector std_out("stdout",new OutputStdout);
|
||||
PythonRedirector std_err("stderr",new OutputStderr);
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("OutputWindow");
|
||||
PyObject* pyout = hGrp->GetBool("RedirectPythonOutput") ? new OutputStdout : 0;
|
||||
PyObject* pyerr = hGrp->GetBool("RedirectPythonErrors") ? new OutputStderr : 0;
|
||||
PythonRedirector std_out("stdout",pyout);
|
||||
PythonRedirector std_err("stderr",pyerr);
|
||||
//The given path name is expected to be Utf-8
|
||||
Base::Interpreter().runFile(sName, true);
|
||||
}
|
||||
|
|
|
@ -419,7 +419,7 @@ Py::Object View3DInventorPy::viewRotateLeft(const Py::Tuple& args)
|
|||
SbRotation rot = cam->orientation.getValue();
|
||||
SbVec3f vdir(0, 0, -1);
|
||||
rot.multVec(vdir, vdir);
|
||||
SbRotation nrot(vdir, M_PI/2);
|
||||
SbRotation nrot(vdir,float( M_PI/2));
|
||||
cam->orientation.setValue(rot*nrot);
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
|
@ -445,7 +445,7 @@ Py::Object View3DInventorPy::viewRotateRight(const Py::Tuple& args)
|
|||
SbRotation rot = cam->orientation.getValue();
|
||||
SbVec3f vdir(0, 0, -1);
|
||||
rot.multVec(vdir, vdir);
|
||||
SbRotation nrot(vdir, -M_PI/2);
|
||||
SbRotation nrot(vdir, float(-M_PI/2));
|
||||
cam->orientation.setValue(rot*nrot);
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
|
|
|
@ -440,7 +440,7 @@ MenuItem* StdWorkbench::setupMenuBar() const
|
|||
*edit << "Std_Undo" << "Std_Redo" << "Separator" << "Std_Cut" << "Std_Copy"
|
||||
<< "Std_Paste" << "Std_DuplicateSelection" << "Separator"
|
||||
<< "Std_Refresh" << "Std_SelectAll" << "Std_Delete" << "Std_Placement"
|
||||
<< "Separator" << "Std_DlgPreferences";
|
||||
<< "Std_Edit" << "Separator" << "Std_DlgPreferences";
|
||||
|
||||
// Standard views
|
||||
MenuItem* stdviews = new MenuItem;
|
||||
|
|
|
@ -340,10 +340,9 @@ class _AxisTaskPanel:
|
|||
self.obj.Angles = a
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
def finish(self):
|
||||
def accept(self):
|
||||
self.resetObject()
|
||||
if self.obj:
|
||||
self.obj.ViewObject.finishEditing()
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
|
||||
def retranslateUi(self, TaskPanel):
|
||||
TaskPanel.setWindowTitle(QtGui.QApplication.translate("Arch", "Axes", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
|
|
@ -222,8 +222,7 @@ class ComponentTaskPanel:
|
|||
|
||||
def accept(self):
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
if self.obj:
|
||||
self.obj.ViewObject.finishEditing()
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
return True
|
||||
|
||||
def editObject(self,wid,col):
|
||||
|
@ -308,7 +307,7 @@ class ViewProviderComponent:
|
|||
|
||||
def unsetEdit(self,vobj,mode):
|
||||
FreeCADGui.Control.closeDialog()
|
||||
return
|
||||
return False
|
||||
|
||||
class ArchSelectionObserver:
|
||||
def __init__(self,origin,watched):
|
||||
|
|
|
@ -100,7 +100,7 @@ def getParamType(param):
|
|||
return "string"
|
||||
elif param in ["textheight","tolerance","gridSpacing"]:
|
||||
return "float"
|
||||
elif param in ["selectBaseObjects","alwaysSnap","grid","fillmode","saveonexit","maxSnap"]:
|
||||
elif param in ["selectBaseObjects","alwaysSnap","grid","fillmode","saveonexit","maxSnap","SvgLinesBlack"]:
|
||||
return "bool"
|
||||
elif param in ["color","constructioncolor","snapcolor"]:
|
||||
return "unsigned"
|
||||
|
@ -1024,13 +1024,6 @@ def draftify(objectslist,makeblock=False):
|
|||
return newobjlist[0]
|
||||
return newobjlist
|
||||
|
||||
def getrgb(color):
|
||||
"getRGB(color): returns a rgb value #000000 from a freecad color"
|
||||
r = str(hex(int(color[0]*255)))[2:].zfill(2)
|
||||
g = str(hex(int(color[1]*255)))[2:].zfill(2)
|
||||
b = str(hex(int(color[2]*255)))[2:].zfill(2)
|
||||
return "#"+r+g+b
|
||||
|
||||
def getSVG(obj,modifier=100,textmodifier=100,linestyle="continuous",fillstyle="shape color",direction=None):
|
||||
'''getSVG(object,[modifier],[textmodifier],[linestyle],[fillstyle],[direction]):
|
||||
returns a string containing a SVG representation of the given object. the modifier attribute
|
||||
|
@ -1052,6 +1045,18 @@ def getSVG(obj,modifier=100,textmodifier=100,linestyle="continuous",fillstyle="s
|
|||
plane = WorkingPlane.plane()
|
||||
plane.alignToPointAndAxis(Vector(0,0,0),fcvec.neg(direction),0)
|
||||
|
||||
def getrgb(color):
|
||||
"getRGB(color): returns a rgb value #000000 from a freecad color"
|
||||
r = str(hex(int(color[0]*255)))[2:].zfill(2)
|
||||
g = str(hex(int(color[1]*255)))[2:].zfill(2)
|
||||
b = str(hex(int(color[2]*255)))[2:].zfill(2)
|
||||
col = "#"+r+g+b
|
||||
if col == "#ffffff":
|
||||
print getParam('SvgLinesBlack')
|
||||
if getParam('SvgLinesBlack'):
|
||||
col = "#000000"
|
||||
return col
|
||||
|
||||
def getProj(vec):
|
||||
if not plane: return vec
|
||||
nx = fcvec.project(vec,plane.u)
|
||||
|
@ -1077,10 +1082,19 @@ def getSVG(obj,modifier=100,textmodifier=100,linestyle="continuous",fillstyle="s
|
|||
v = getProj(e.Vertexes[-1].Point)
|
||||
svg += 'L '+ str(v.x) +' '+ str(v.y) + ' '
|
||||
elif isinstance(e.Curve,Part.Circle):
|
||||
if len(e.Vertexes) == 1:
|
||||
# complete circle
|
||||
svg = getCircle(e)
|
||||
return svg
|
||||
r = e.Curve.Radius
|
||||
drawing_plane_normal = FreeCAD.DraftWorkingPlane.axis
|
||||
if plane: drawing_plane_normal = plane.axis
|
||||
flag_large_arc = (((e.ParameterRange[1] - e.ParameterRange[0]) / math.pi) % 2) > 1
|
||||
flag_sweep = e.Curve.Axis * drawing_plane_normal >= 0
|
||||
v = getProj(e.Vertexes[-1].Point)
|
||||
svg += 'A '+ str(r) + ' '+ str(r) +' 0 0 1 '+ str(v.x) +' '
|
||||
svg += str(v.y) + ' '
|
||||
svg += 'A ' + str(r) + ' ' + str(r) + ' '
|
||||
svg += '0 ' + str(int(flag_large_arc)) + ' ' + str(int(flag_sweep)) + ' '
|
||||
svg += str(v.x) + ' ' + str(v.y) + ' '
|
||||
if fill != 'none': svg += 'Z'
|
||||
svg += '" '
|
||||
svg += 'stroke="' + stroke + '" '
|
||||
|
@ -1092,6 +1106,21 @@ def getSVG(obj,modifier=100,textmodifier=100,linestyle="continuous",fillstyle="s
|
|||
svg += '/>\n'
|
||||
return svg
|
||||
|
||||
def getCircle(edge):
|
||||
cen = getProj(edge.Curve.Center)
|
||||
rad = edge.Curve.Radius
|
||||
svg = '<circle cx="' + str(cen.x)
|
||||
svg += '" cy="' + str(cen.y)
|
||||
svg += '" r="' + str(rad)+'" '
|
||||
svg += 'stroke="' + stroke + '" '
|
||||
svg += 'stroke-width="' + str(width) + ' px" '
|
||||
svg += 'style="stroke-width:'+ str(width)
|
||||
svg += ';stroke-miterlimit:4'
|
||||
svg += ';stroke-dasharray:' + lstyle
|
||||
svg += ';fill:' + fill + '"'
|
||||
svg += '/>\n'
|
||||
return svg
|
||||
|
||||
if getType(obj) == "Dimension":
|
||||
p1,p2,p3,p4,tbase,norm,rot = obj.ViewObject.Proxy.calcGeom(obj)
|
||||
dimText = getParam("dimPrecision")
|
||||
|
@ -1225,18 +1254,7 @@ def getSVG(obj,modifier=100,textmodifier=100,linestyle="continuous",fillstyle="s
|
|||
if (fcgeo.findEdge(e,wiredEdges) == None):
|
||||
svg += getPath([e])
|
||||
else:
|
||||
cen = getProj(obj.Shape.Edges[0].Curve.Center)
|
||||
rad = obj.Shape.Edges[0].Curve.Radius
|
||||
svg = '<circle cx="' + str(cen.x)
|
||||
svg += '" cy="' + str(cen.y)
|
||||
svg += '" r="' + str(rad)+'" '
|
||||
svg += 'stroke="' + stroke + '" '
|
||||
svg += 'stroke-width="' + str(width) + ' px" '
|
||||
svg += 'style="stroke-width:'+ str(width)
|
||||
svg += ';stroke-miterlimit:4'
|
||||
svg += ';stroke-dasharray:' + lstyle
|
||||
svg += ';fill:' + fill + '"'
|
||||
svg += '/>\n'
|
||||
svg = getCircle(obj.Shape.Edges[0])
|
||||
return svg
|
||||
|
||||
def makeDrawingView(obj,page,lwmod=None,tmod=None):
|
||||
|
|
|
@ -147,12 +147,10 @@ class DraftTaskPanel:
|
|||
def getStandardButtons(self):
|
||||
return int(QtGui.QDialogButtonBox.Cancel)
|
||||
def accept(self):
|
||||
if FreeCAD.activeDraftCommand:
|
||||
FreeCAD.activeDraftCommand.finish()
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
return True
|
||||
def reject(self):
|
||||
if FreeCAD.activeDraftCommand:
|
||||
FreeCAD.activeDraftCommand.finish()
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
return True
|
||||
|
||||
class DraftToolBar:
|
||||
|
|
|
@ -393,6 +393,29 @@ If color mapping is choosed, you must choose a color mapping file containing a t
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="gui::prefcheckbox_6">
|
||||
<property name="toolTip">
|
||||
<string>When exporting SVG views, make all white linework appear in black, for better readability against white backgrounds</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Translate white line color to black</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>SvgLinesBlack</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Draft</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -216,19 +216,10 @@ def getcolor(color):
|
|||
b = float(v[2]/255.0)
|
||||
return (r,g,b,0.0)
|
||||
|
||||
def getsize(width):
|
||||
"extracts a number from the given string (removes suffixes)"
|
||||
if width[-1] == "%":
|
||||
return float(width[:-1])
|
||||
elif len(width) > 1:
|
||||
for s in ['pt','pc','mm','cm','in','px']:
|
||||
if width[-2:] == s:
|
||||
return float(width[:-2])
|
||||
try:
|
||||
s = float(width)
|
||||
return s
|
||||
except ValueError:
|
||||
return width
|
||||
def getsize(length):
|
||||
"""extracts a number from the given string (removes unit suffixes)"""
|
||||
number, exponent, unit=re.findall('([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)(px|pt|pc|mm|cm|in|em|ex|%)?',length)[0]
|
||||
return float(number)
|
||||
|
||||
def makewire(path,checkclosed=False,donttry=False):
|
||||
'''try to make a wire out of the list of edges. If the 'Wire' functions fails or the wire is not
|
||||
|
|
|
@ -8,6 +8,17 @@ INSTALL(
|
|||
FILES
|
||||
Init.py
|
||||
InitGui.py
|
||||
DrawingAlgos.py
|
||||
DrawingExample.py
|
||||
DrawingTests.py
|
||||
DESTINATION
|
||||
Mod/Drawing
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
DIRECTORY
|
||||
Templates
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_DATADIR}/Mod/Drawing
|
||||
FILES_MATCHING PATTERN "*.svg*"
|
||||
)
|
||||
|
|
|
@ -9,8 +9,9 @@
|
|||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:freecad="http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Svg_Namespace"
|
||||
width="420"
|
||||
height="297"
|
||||
width="420mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 420 297"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
|
@ -576,9 +577,6 @@
|
|||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base"
|
||||
inkscape:zoom="1.7101889"
|
||||
inkscape:cx="254.10366"
|
||||
inkscape:cy="146.94782"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="20"
|
||||
inkscape:current-layer="svg2"
|
||||
|
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
|
@ -8,8 +8,9 @@
|
|||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="297"
|
||||
height="210"
|
||||
width="297mm"
|
||||
height="210mm"
|
||||
viewBox="0 0 297 210"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
|
@ -903,9 +904,6 @@
|
|||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base"
|
||||
inkscape:zoom="3.5"
|
||||
inkscape:cx="119.25908"
|
||||
inkscape:cy="0.84879944"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="22"
|
||||
inkscape:current-layer="svg2"
|
||||
|
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
|
@ -7,7 +7,8 @@
|
|||
version="1.1"
|
||||
baseProfile="full"
|
||||
width="297mm"
|
||||
height="420mm">
|
||||
height="420mm"
|
||||
viewBox="0 0 297 420">
|
||||
|
||||
<!-- DrawingContent -->
|
||||
|
||||
|
|
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 432 B |
|
@ -8,6 +8,8 @@ INSTALL(
|
|||
FILES
|
||||
Init.py
|
||||
InitGui.py
|
||||
convert2TetGen.py
|
||||
FemExample.py
|
||||
DESTINATION
|
||||
Mod/Fem
|
||||
)
|
||||
|
|
|
@ -36,6 +36,9 @@ SET(IdfLibs_SRCS
|
|||
lib/TSM_104_01_L_DV_A.stp
|
||||
lib/TSS0P_8.stp
|
||||
lib/VC0603_SMD.stp
|
||||
lib/RLF_12545.igs
|
||||
lib/SOT23.igs
|
||||
lib/SOT404.igs
|
||||
)
|
||||
SOURCE_GROUP("Idflibs" FILES ${IdfLibs_SRCS})
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
import FreeCAD, Part, os, FreeCADGui, __builtin__
|
||||
from FreeCAD import Base
|
||||
from math import *
|
||||
import ImportGui
|
||||
|
||||
##########################################################
|
||||
# Script version dated 19-Jan-2012 #
|
||||
|
@ -45,7 +46,7 @@ EmpDisplayMode=2 # 0='Flat Lines', 1='Shaded', 2='Wireframe', 3='Points'; recomm
|
|||
|
||||
IDF_sort=0 # 0-sort per refdes [1 - part number (not preffered)/refdes] 2-sort per footprint/refdes
|
||||
|
||||
IDF_diag=1 # 0/1=disabled/enabled output (footprint.lst/missing_models.lst)
|
||||
IDF_diag=0 # 0/1=disabled/enabled output (footprint.lst/missing_models.lst)
|
||||
IDF_diag_path="/tmp" # path for output of footprint.lst and missing_models.lst
|
||||
|
||||
|
||||
|
@ -330,7 +331,8 @@ def place_steps(doc,placement,board_thickness):
|
|||
model_lines=model_file.readlines()
|
||||
model_file.close()
|
||||
model_dict=[]
|
||||
model_file=pythonopen(IDF_diag_path+"/missing_models.lst", "w")
|
||||
if IDF_diag==1:
|
||||
model_file=pythonopen(IDF_diag_path+"/missing_models.lst", "w")
|
||||
keys=[]
|
||||
#prev_step="*?.*?" #hope nobody will insert this step filename
|
||||
step_dict=[]
|
||||
|
@ -342,11 +344,20 @@ def place_steps(doc,placement,board_thickness):
|
|||
model_dict=dict(model_dict)
|
||||
validkeys=filter(lambda x:x in [place_item[2] for place_item in placement], model_dict.keys())
|
||||
FreeCAD.Console.PrintMessage("Step models to be loaded for footprints: "+str(validkeys)+"\n")
|
||||
grp=doc.addObject("App::DocumentObjectGroup", "Step Models")
|
||||
grp=doc.addObject("App::DocumentObjectGroup", "Step Lib")
|
||||
for validkey in validkeys:
|
||||
step_dict.append((validkey,Part.read(step_path+model_dict[validkey])))
|
||||
ImportGui.insert(step_path+model_dict[validkey],FreeCAD.ActiveDocument.Name)
|
||||
#partName=FreeCAD.ActiveDocument.ActiveObject.Name
|
||||
impPart=FreeCAD.ActiveDocument.ActiveObject
|
||||
#impPart.Shape=FreeCAD.ActiveDocument.ActiveObject.Shape
|
||||
#impPart.ViewObject.DiffuseColor=FreeCAD.ActiveDocument.ActiveObject.ViewObject.DiffuseColor
|
||||
impPart.ViewObject.Visibility=0
|
||||
impPart.Label=validkey
|
||||
grp.addObject(impPart)
|
||||
step_dict.append((validkey,impPart))
|
||||
FreeCAD.Console.PrintMessage("Reading step file "+str(model_dict[validkey])+" for footprint "+str(validkey)+"\n")
|
||||
step_dict=dict(step_dict)
|
||||
grp=doc.addObject("App::DocumentObjectGroup", "Step Models")
|
||||
for place_item in placement:
|
||||
if step_dict.has_key(place_item[2]):
|
||||
step_model=doc.addObject("Part::Feature",place_item[0]+"_s")
|
||||
|
@ -354,7 +365,8 @@ def place_steps(doc,placement,board_thickness):
|
|||
#if prev_step!=place_item[2]:
|
||||
# model0=Part.read(step_path+"/"+model_dict[place_item[2]])
|
||||
# prev_step=place_item[2]
|
||||
step_model.Shape=step_dict[place_item[2]]
|
||||
step_model.Shape=step_dict[place_item[2]].Shape
|
||||
step_model.ViewObject.DiffuseColor=step_dict[place_item[2]].ViewObject.DiffuseColor
|
||||
z_pos=0
|
||||
rotateY=0
|
||||
if place_item[6]=='BOTTOM':
|
||||
|
@ -366,7 +378,7 @@ def place_steps(doc,placement,board_thickness):
|
|||
else:
|
||||
if IDF_diag==1:
|
||||
model_file.writelines(str(place_item[0])+" "+str(place_item[2])+"\n")
|
||||
model_file.close()
|
||||
model_file.close()
|
||||
|
||||
def toQuaternion(heading, attitude,bank): # rotation heading=arround Y, attitude =arround Z, bank attitude =arround X
|
||||
"""toQuaternion(heading, attitude,bank)->FreeCAD.Base.Rotation(Quternion)"""
|
||||
|
|
|
@ -31,6 +31,6 @@
|
|||
|
||||
|
||||
|
||||
# an option for IDF added by Milos Koutny (12-Feb-2010)
|
||||
# two options for IDF added by Milos Koutny (12-Feb-2010)
|
||||
FreeCAD.addImportType("IDF emn file File Type (*.emn)","Idf")
|
||||
|
||||
#FreeCAD.addImportType("IDF emp File Type (*.emp)","Import_Emp")
|
||||
|
|
2702
src/Mod/Idf/lib/RLF_12545.igs
Normal file
9026
src/Mod/Idf/lib/SOT23.igs
Normal file
4419
src/Mod/Idf/lib/SOT404.igs
Normal file
|
@ -1,5 +1,5 @@
|
|||
"FOOTPRINT" "STEP FILE"
|
||||
"SOT23-R" "SOT23.stp"
|
||||
"SOT23-R" "SOT23.igs"
|
||||
"SMD_C_0805-R" "0805_SMD.stp"
|
||||
"SMD_C_1210-R" "1210_SMD.stp"
|
||||
"SMD_R_1206-R" "1206_SMD.stp"
|
||||
|
@ -13,7 +13,7 @@
|
|||
"MSOP10E_LT" "MSOP_10.stp"
|
||||
"TCMT11XX" "TCMT1107_4.stp"
|
||||
"SMB-TB" "SMB_DO_214AA.stp"
|
||||
"SOT404-GDS-R" "SOT404.stp"
|
||||
"SOT404-GDS-R" "SOT404.igs"
|
||||
"SOT428-A1-A2C-R" "SOT428_DPAK.stp"
|
||||
"SOT96-1-R" "SOT_96.stp"
|
||||
"SOT323-BEC-R" "SOT_323_3.stp"
|
||||
|
@ -22,9 +22,9 @@
|
|||
"SOD523-R" "SOD_523.stp"
|
||||
"TSM-104-01-L-DV" "TSM_104_01_L_DV_A.stp"
|
||||
"TSM-103-01-L-DV-A" "TSM_103_01_L_DV_A.stp"
|
||||
"SOD323-R" "SOD_323.stp"
|
||||
"SOD323-R" "SOD_323.igs"
|
||||
"VC0603-R" "VC0603_SMD.stp"
|
||||
"RLF12545" "RLF_12545.stp"
|
||||
"RLF12545" "RLF_12545.igs"
|
||||
"CAPAE830X1050" "CAP_50SGV_8_10.stp"
|
||||
"RLF7030-R" "RLF_7030.stp"
|
||||
"EPS_B66285E" "EPL22_6_16.stp"
|
||||
|
|
Can't render this file because it contains an unexpected character in line 1 and column 11.
|
|
@ -53,7 +53,7 @@ Sub-elements such as vertices, edges or faces are accessible as:
|
|||
<UserDocu>Import the content to this shape of a string in BREP format.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="extrude">
|
||||
<Methode Name="extrude" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Extrude the shape along a direction.</UserDocu>
|
||||
</Documentation>
|
||||
|
@ -71,22 +71,22 @@ Part.revolve(Vector(0,0,0),Vector(0,0,1),360) - revolves the shape around the Z
|
|||
This is a more detailed check as done in isValid().</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="fuse">
|
||||
<Methode Name="fuse" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Union of this and a given topo shape.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="oldFuse">
|
||||
<Methode Name="oldFuse" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Union of this and a given topo shape (old algorithm).</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="common">
|
||||
<Methode Name="common" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Intersection of this and a given topo shape.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="section">
|
||||
<Methode Name="section" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Section of this with a given topo shape.</UserDocu>
|
||||
</Documentation>
|
||||
|
@ -101,7 +101,7 @@ This is a more detailed check as done in isValid().</UserDocu>
|
|||
<UserDocu>Make single slice of this shape.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="cut">
|
||||
<Methode Name="cut" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Difference of this and a given topo shape.</UserDocu>
|
||||
</Documentation>
|
||||
|
@ -116,13 +116,13 @@ This is a more detailed check as done in isValid().</UserDocu>
|
|||
<UserDocu>Removes internal wires (also holes) from the shape.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="mirror">
|
||||
<Methode Name="mirror" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Mirror this shape on a given plane.
|
||||
The plane is given with its base point and its normal direction.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="transformGeometry">
|
||||
<Methode Name="transformGeometry" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Apply geometric transformation on a copy of the shape.
|
||||
The transformation to be applied is defined as a 4x4 matrix.
|
||||
|
@ -177,14 +177,14 @@ the underlying geometry.</UserDocu>
|
|||
<UserDocu>Make chamfer.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="makeThickness">
|
||||
<Methode Name="makeThickness" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>A hollowed solid is built from an initial solid and a set of faces on this solid,
|
||||
which are to be removed. The remaining faces of the solid become the walls of
|
||||
the hollowed solid, their thickness defined at the time of construction.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="makeOffsetShape">
|
||||
<Methode Name="makeOffsetShape" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Offset a given shape</UserDocu>
|
||||
</Documentation>
|
||||
|
@ -247,7 +247,7 @@ Orientation is not taken into account.</UserDocu>
|
|||
<UserDocu>Tessellate the the shape and return a list of vertices and face indices</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="project">
|
||||
<Methode Name="project" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Project a shape on this shape</UserDocu>
|
||||
</Documentation>
|
||||
|
|
|
@ -8,6 +8,9 @@ INSTALL(
|
|||
FILES
|
||||
Init.py
|
||||
InitGui.py
|
||||
MakeBottle.py
|
||||
TestPartApp.py
|
||||
TestPartGui.py
|
||||
DESTINATION
|
||||
Mod/Part
|
||||
)
|
||||
|
|
|
@ -105,7 +105,9 @@ elseif(MINGW)
|
|||
else(MSVC)
|
||||
set_target_properties(PartDesign PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Mod/PartDesign)
|
||||
set_target_properties(PartDesign PROPERTIES PREFIX "")
|
||||
set_target_properties(PartDesign PROPERTIES INSTALL_RPATH ${INSTALL_RPATH})
|
||||
set_target_properties(PartDesign PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/Mod/PartDesign)
|
||||
endif(MSVC)
|
||||
|
||||
INSTALL(TARGETS PartDesign DESTINATION lib)
|
||||
# The PartDesign module must go to where the __init__.py file is
|
||||
INSTALL(TARGETS PartDesign DESTINATION Mod/PartDesign)
|
||||
|
||||
|
|
|
@ -6,8 +6,25 @@ endif(FREECAD_BUILD_GUI)
|
|||
|
||||
INSTALL(
|
||||
FILES
|
||||
__init__.py
|
||||
Init.py
|
||||
InitGui.py
|
||||
TestPartDesignApp.py
|
||||
TestPartDesignGui.py
|
||||
DESTINATION
|
||||
Mod/PartDesign
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
FILES
|
||||
Scripts/__init__.py
|
||||
Scripts/Gear.py
|
||||
Scripts/DistanceBolt.py
|
||||
Scripts/Epitrochoid.py
|
||||
Scripts/RadialCopy.py
|
||||
Scripts/Parallelepiped.py
|
||||
Scripts/Spring.py
|
||||
DESTINATION
|
||||
Mod/PartDesign/Scripts
|
||||
)
|
||||
|
||||
|
|
|
@ -136,7 +136,9 @@ elseif(MINGW)
|
|||
else(MSVC)
|
||||
set_target_properties(PartDesignGui PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Mod/PartDesign)
|
||||
set_target_properties(PartDesignGui PROPERTIES PREFIX "")
|
||||
set_target_properties(PartDesignGui PROPERTIES INSTALL_RPATH ${INSTALL_RPATH})
|
||||
set_target_properties(PartDesignGui PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/Mod/PartDesign)
|
||||
endif(MSVC)
|
||||
|
||||
INSTALL(TARGETS PartDesignGui DESTINATION lib)
|
||||
# The PartDesign module must go to where the __init__.py file is
|
||||
INSTALL(TARGETS PartDesignGui DESTINATION Mod/PartDesign)
|
||||
|
||||
|
|
|
@ -8,6 +8,16 @@ INSTALL(
|
|||
FILES
|
||||
Init.py
|
||||
InitGui.py
|
||||
RaytracingExample.py
|
||||
DESTINATION
|
||||
Mod/Raytracing
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
DIRECTORY
|
||||
Templates
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_DATADIR}/Mod/Raytracing
|
||||
FILES_MATCHING PATTERN "*.pov*"
|
||||
)
|
||||
|
||||
|
|
|
@ -8,6 +8,20 @@ INSTALL(
|
|||
FILES
|
||||
Init.py
|
||||
InitGui.py
|
||||
KukaExporter.py
|
||||
MovieTool.py
|
||||
RobotExample.py
|
||||
RobotExampleTrajectoryOutOfShapes.py
|
||||
DESTINATION
|
||||
Mod/Robot
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
DIRECTORY
|
||||
Lib
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_DATADIR}/Mod/Robot
|
||||
PATTERN "Makefile*" EXCLUDE
|
||||
PATTERN "*.pdf" EXCLUDE
|
||||
)
|
||||
|
||||
|
|
|
@ -8,6 +8,10 @@ INSTALL(
|
|||
FILES
|
||||
Init.py
|
||||
InitGui.py
|
||||
SketcherExample.py
|
||||
TestSketcherApp.py
|
||||
TestSketcherGui.py
|
||||
DESTINATION
|
||||
Mod/Sketcher
|
||||
)
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ int DrawSketchHandler::seekAutoConstraint(std::vector<AutoConstraint> &suggested
|
|||
const float tangDeviation = 2.;
|
||||
|
||||
int tangId = Constraint::GeoUndef;
|
||||
float smlTangDist = 1e15;
|
||||
float smlTangDist = 1e15f;
|
||||
|
||||
// Get geometry list
|
||||
const std::vector<Part::Geometry *> geomlist = sketchgui->getSketchObject()->getCompleteGeometry();
|
||||
|
|
|
@ -27,6 +27,6 @@ SET(StartPage_DATA
|
|||
)
|
||||
|
||||
INSTALL(FILES ${StartPage_SRCS} ${StartPage_DATA}
|
||||
DESTINATION Mod/Start/StartPage
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/Mod/Start/StartPage
|
||||
)
|
||||
|
||||
|
|
|
@ -44,6 +44,9 @@ SET(TestGui_SRCS
|
|||
PreCompiled.cpp
|
||||
PreCompiled.h
|
||||
)
|
||||
SET(TestGuiPy_SRCS
|
||||
qtunittest.py
|
||||
)
|
||||
|
||||
add_library(QtUnitGui SHARED ${TestGui_SRCS})
|
||||
|
||||
|
@ -69,3 +72,5 @@ else(MSVC)
|
|||
endif(MSVC)
|
||||
|
||||
INSTALL(TARGETS QtUnitGui DESTINATION lib)
|
||||
INSTALL(FILES ${TestGuiPy_SRCS} DESTINATION Mod/Test)
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
<File Id="PartInitGuiPy" Name="InitGui.py" DiskId="1" />
|
||||
<File Id="Partpyd" Name="Part.pyd" DiskId="1" />
|
||||
<File Id="PartGuipyd" Name="PartGui.pyd" DiskId="1" />
|
||||
<File Id="TestPartAppPy" Name="TestPartApp.py" DiskId="1" />
|
||||
<File Id="TestPartGuiPy" Name="TestPartGui.py" DiskId="1" />
|
||||
</Component>
|
||||
</Directory>
|
||||
</Include>
|
|
@ -28,6 +28,8 @@
|
|||
<File Id="PartDesignInitGuiPy" Name="InitGui.py" DiskId="1" />
|
||||
<File Id="PartDesignpyd" Name="PartDesign.pyd" DiskId="1" />
|
||||
<File Id="PartDesignGuipyd" Name="PartDesignGui.pyd" DiskId="1" />
|
||||
<File Id="TestPartDesignAppPy" Name="TestPartDesignApp.py" DiskId="1" />
|
||||
<File Id="TestPartDesignGuiPy" Name="TestPartDesignGui.py" DiskId="1" />
|
||||
<File Id="PartDesign__init__py" Name="__init__.py" />
|
||||
</Component>
|
||||
<Directory Id="ModPartDesignScripts" Name="Scripts" FileSource="../../Mod/PartDesign/Scripts">
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<File Id="SketcherInitGuiPy" Name="InitGui.py" DiskId="1" />
|
||||
<File Id="Sketcherpyd" Name="Sketcher.pyd" DiskId="1" />
|
||||
<File Id="SketcherGuipyd" Name="SketcherGui.pyd" DiskId="1" />
|
||||
<File Id="SketcherTestsAppPy" Name="SketcherTestsApp.py" DiskId="1" />
|
||||
<File Id="TestSketcherAppPy" Name="TestSketcherApp.py" DiskId="1" />
|
||||
</Component>
|
||||
</Directory>
|
||||
</Include>
|