Commit Graph

11533 Commits

Author SHA1 Message Date
Abdullah Tahiri
044e0f6c20 Sketcher: Use transparent exception mechanism for fillets
=========================================================

This ensures that the exception back in the c++ that invoked python retains the type of exception and can be properly catched.
2018-10-28 18:34:50 +01:00
Abdullah Tahiri
7effa68eeb Part: Geometry use CADKernelError exception for OCCT
====================================================

Part of the geometry was using CADKernelError and part was using RunTimeError exceptions, so unify criteria.

Runtime is very generic and does not need to stem from OCCT.

- Also rename of a typo basic to basis, to be coherent with OCCT terminology
2018-10-28 18:34:36 +01:00
Abdullah Tahiri
4b9d90321a Sketcher: GUI command updated to support filleting of bounded curves 2018-10-28 18:34:23 +01:00
Abdullah Tahiri
f1a98c3101 Sketcher: Support for filleting bounded curves
==============================================

Generally, bounded curves require that the curves are coincident at one point, the vertex to be filleted.

Trimmed curves, like combinations of line segments, arcs of conics, do not require it, as they are able to extend the trimmed
curve using the basis curve. However, they work fine when there is such a coincidence.
2018-10-28 18:34:12 +01:00
Abdullah Tahiri
649d115afb Part: Geometry New Bounded-Trimmed-curve inheritance
====================================================

The new hierarchy is as this:
GeomArcOfConic:GeomTrimmedCurve:GeomBoundedCurve:GeomCurve

A bounded curve is one having a start and endpoint, like an arc, a line segment, or a b-spline

A trimmed curve is one arising from trimming a basis curve, line an arc or a line segment, but NOT a b-spline.

An arc of Conic is one arising from a conic section, line an arc, but neither a line segment, nor a b-spline.

This new hierarchy enables a more consistent handling of geometry and it is closer to the OCCT hierarchy.
2018-10-28 18:33:58 +01:00
Abdullah Tahiri
0ed7b1d691 Part: Geometry - refactoring of intersection code 2018-10-28 18:33:45 +01:00
Abdullah Tahiri
c946de8fb4 Part: Geometry - intersection - checkendpoints
===============================================

Extrema algorithms sometimes fails when coincident endpoints

I am not sure if it is a bug in OCCT or it is just not intended.

This commits adds an extra check to add endpoints if within tolerance.
https://forum.freecadweb.org/viewtopic.php?f=10&t=31700
2018-10-28 18:33:32 +01:00
Abdullah Tahiri
4d1e981138 Part: Geometry GeomTrim Geomline segment type
=============================================

Make line segment inherit from GeomTrim. This allows seamless management of trimmed curves.
2018-10-28 18:33:19 +01:00
Abdullah Tahiri
396998467b Part: Geometry intersect routines throw when OCCT throws 2018-10-28 18:32:42 +01:00
Abdullah Tahiri
7c1a218847 Sketcher: Inter-trimmed-curve filleting
=======================================

Algorithm changed to use offset curves, so as to avoid moving geometry in the sketcher.
2018-10-28 18:32:30 +01:00
Abdullah Tahiri
b1858f2cf4 Part: Geometry Arcs inheriting from GeomTrimmedCurve 2018-10-28 18:32:15 +01:00
Abdullah Tahiri
0aa3da513a Sketcher: filleting arcofconic-arcofconic command 2018-10-28 18:32:02 +01:00
Abdullah Tahiri
44c5f1a67e Sketcher: Fillet support inter-conics
==============================================

Specific support for filleting between conics.

It does not support B-Splines or line segments.
2018-10-28 18:31:48 +01:00
Abdullah Tahiri
8b97a31372 Part: Geometry refactoring
==========================

python c+ wrapper to use twin class c++ function instead of duplicating the code
2018-10-28 18:31:35 +01:00
Abdullah Tahiri
9e349c33a8 Part: Geometry - improvements/bug fixes
=======================================

routine for closest parameter to point was failing on endpoints. The former version
used the parameter of the basis curve, which sometimes was giving parameter values
incoherent. This version uses distance to endpoints when a projection on the trimmed
curve can not be found.
2018-10-28 18:31:22 +01:00
Abdullah Tahiri
f301feec31 Part: New routines for curve intersection 2018-10-28 18:31:06 +01:00
Yorik van Havre
4c9356f0f5 Arch: Finished implementing color support for Arch Reference 2018-10-28 13:57:05 -03:00
Yorik van Havre
a3729d5ca9 Arch: Support part colors in Reference 2018-10-28 13:57:05 -03:00
wmayer
17c783051b extend FreeCAD.getUserMacroDir to accept boolean to either return actual or default macro directory 2018-10-28 17:10:10 +01:00
lorenz
e517c00d9b py3: Fem: remove extra b'ees
https://forum.freecadweb.org/viewtopic.php?f=18&t=30954
2018-10-28 15:13:30 +01:00
wmayer
465152bcc9 fix crash in debug mode in sketcher in case the equation matrix has rank zero 2018-10-28 14:51:14 +01:00
wmayer
4362ddc797 Raytracing: Fixed search locations of povray 2018-10-28 13:09:25 +01:00
Yorik van Havre
57726db47f AddonManager: minor bugfix 2018-10-27 16:15:55 -03:00
Yorik van Havre
7fabfde0ef py3 compatibility fixes 2018-10-27 16:04:51 -03:00
wmayer
3443fd9661 replace deprecated failUnless with assertEqual 2018-10-27 17:44:37 +02:00
ickby
c60364772a Persistence: Test cases for content dump
It turned our that the document could not be dumped as the xml specifier was used as first element. As the dumping added the <content> element around it was invalid. However, content is required to read properties. Hence the xml element generation was moved.
2018-10-27 16:15:30 +02:00
wmayer
2af5a983a2 unit test for / operator of Quantity 2018-10-27 15:58:40 +02:00
George Shuklin
7ec3984cbe Add support for dLabel.ViewObject.Line
If it's false, do not draw line (and arrow), text only
2018-10-26 19:25:44 -03:00
George Shuklin
9543d54647 Add arrows to dLabel getSVG, minor style cleanup 2018-10-26 19:25:44 -03:00
George Shuklin
3a85a1fd41 Add line for annotation (no arrow yet) 2018-10-26 19:25:44 -03:00
George Shuklin
3391a5ea4b Initial work, only text (no lines) 2018-10-26 19:25:44 -03:00
triplus
10cd4cc7af Hide Draft tray toolbar
Forum discussion:

https://forum.freecadweb.org/viewtopic.php?f=3&t=31720
2018-10-26 04:26:20 +02:00
wandererfan
4fa707f46d Respect "InvertZoom" parameter 2018-10-26 00:49:53 +02:00
wandererfan
9c1587cfad Fix delayed rotation of DVP based Views 2018-10-26 00:49:53 +02:00
wandererfan
b2135da447 Workaround for #3332 2018-10-26 00:49:52 +02:00
luz.paz
0660fd737c Reverting partial commit 2a53eb043 2018-10-26 00:47:18 +02:00
wmayer
33663d134d make the methods highlightSelection/unhighlightSelection virtual 2018-10-26 00:40:20 +02:00
Yorik van Havre
b11ed19f8d Arch: Make section planes claim their children in the tree 2018-10-25 12:13:16 -03:00
Yorik van Havre
f1e3ec88c6 AddonManager: Fixed missing files in cmake 2018-10-25 12:02:46 -03:00
Yorik van Havre
8ffd8c2901 Arch: Fixed bug in Site 2018-10-25 11:59:22 -03:00
luz.paz
2a53eb0432 Please review these and then I'll squash all in to one commit 2018-10-25 11:06:28 -03:00
luz.paz
f976a4f734 Misc. typos and whitespace fixes
Found via `codespell -q 3 --skip="*.po,*.ts,./.git,./src/3rdParty,./src/CXX,./src/zipios++,./src/Mod/Assembly/App/opendcm" -I ../fc-word-whitelist.txt` and `grep`
2018-10-25 11:06:28 -03:00
Gaël Écorchard
968ce141d0 [AddonManager] Fix Python 2 bug with list comprehension 2018-10-25 11:04:43 -03:00
Gaël Écorchard
2506f5b207 [AddonManager] Strip whitespace from other_files
Strip whitespace from the file name in the macro metadata __Files__
field.
2018-10-25 11:04:43 -03:00
Gaël Écorchard
37b738f86f [AddonManager] Add support for __Files__
Read the metadata __Files__ for macros from git and install or remove
files listed there.
__Files__ must be a comma-separated list of files to be copied alongside
the macro.  Their path must be relative to the macro (*.FCMacro file)
and not to othe root of the repository. Each file can be prefixed with a
subdirectory.
2018-10-25 11:04:43 -03:00
Gaël Écorchard
bac786a8ea [AddonManager] separate the Macro class
Separate the Macro class of the AddonManager into addonmanager_macro.py
to prepare for future support for dependent files for macros from the
git repository.
2018-10-25 11:04:43 -03:00
Clemens Weissbacher
cef825c567 py3: OpenSCAD: make Mod/OpenSCAD python3 compatible 2018-10-25 11:03:36 -03:00
Clemens Weissbacher
54f88cc75c py3: Arch: fix import urllib2 problem 2018-10-25 11:03:36 -03:00
pekkaroi
ae9786253c PATH Fix bug on finding minimum Z on DressupRampEntry 2018-10-25 11:02:02 -03:00
lorenz
d3df5d979a py3: Arch: try to fix unicode problem 2018-10-25 11:01:03 -03:00