Commit Graph

21675 Commits

Author SHA1 Message Date
Russell Johnson
e7a6903fb2 Path: Fix timing of updatePanelVisibility() call
Targeted function call needed to be after `updateBase()` call after the `for` loop.
2020-06-18 19:56:52 -05:00
Russell Johnson
add80615eb Path: Add new Slot operation
New slotting operation:
- Accepts selection of up to two features.
- Selectable features include: faces, edges, and vertices.
- User may select a single face or edge, or a pair of features.
- The path may be extended at the start and end.
- The path may be reversed.
- The path may be altered to the perpendicular in some cases.
- A unique Slot icon is included.
- Includes simple collision detection with warning message.
2020-06-18 19:56:52 -05:00
wmayer
3d2694d536 Gui: [skip ci] handle case if an absolute path to a qss file is set 2020-06-18 12:34:43 +02:00
wmayer
1343e5b37e Cloud: [skip ci] add missing closing curly brace 2020-06-18 12:33:27 +02:00
Yorik van Havre
29d4859633 Draft: snapper.getPoint() does not return object anymore if no snapped object 2020-06-17 14:03:29 +02:00
Jean-Marie Verdun
5737d56a61 Retab 2020-06-17 13:05:01 +02:00
Jean-Marie Verdun
6708ee2341 Add Amazon v4 API support as to take into consideration
the end of life of SHA1 signing from OpenSSL which is used by v2 API
2020-06-17 13:05:01 +02:00
Jean-Marie Verdun
3a6d38e574 Introduce ComputeDigestAmzS3v4 and BuildHeaderAmzS3v4
into the Cloud code (WIP)
2020-06-17 13:05:01 +02:00
Jean-Marie Verdun
547631be89 Add SHA256 sum function 2020-06-17 13:05:01 +02:00
Jean-Marie Verdun
1ed4d901ca Add Amazon protocol version as a parameter
as to smooth the transition from SHA-1 to SHA-256 signing
2020-06-17 13:05:01 +02:00
vocx-fc
8f0a7696c2 Draft: add prototype function to AngularDimension to link objects
At the moment the user must manually modify `FirstAngle`
and `LastAngle` to obtain a new `Angle`, but since the values
are manually entered the result is not tied to any actual object
in the document.

We introduce a function `measure_two_obj_angles`
to calculate the corresponding parameters from a pair of objects
and their edges.
Currently this function is deactivated because it is intended
for testing purposes only.

This needs to be improved because at the moment it only gives
two possible angles. We should be able to get the four angles
of a two-line intersection. Maybe a new property is required
to indicate the quadrant to choose and display.
2020-06-17 12:53:29 +02:00
vocx-fc
d5cafc3138 Draft: organize execute code of the dimension classes
Instead of placing the entire code in the `execute` method,
we use three medthods to extract the `Start` and `End` dimension
points from different combinations of edges.

One method to get the dimension from a single object, from the edge,
either linear or circular; one method to get the dimension
from a single object, from two vertices; one method to measure
the distance between two objects, from two different vertices.
2020-06-17 12:53:29 +02:00
vocx-fc
462b303c49 Draft: set properties of the Dimension class through functions
There are three classes `DimensionBase`, `LinearDimension`, and
`AngularDimension`, their properties are set only if they don't
already exist.

Provide also better documentation in the tooltips,
and use `setPropertyStatus` to hide and show the intended
properties in the property editor.

The `Support` property is not used at all except as a way to
store an object, so it should probably be removed in the future.
2020-06-17 12:53:29 +02:00
vocx-fc
a531cc2c98 Draft: new make_radial_dimension function for more precision
A single `make_dimension` handles three types of dimensions,
(1) simple linear, (2) linear linked to an object, and (3) linked
to a circular edge.

So, we provide a new function, `make_radial_dimension_obj`,
to handle the third case. In this way we can check the input
parameters much better.

We adjust the `Draft_Dimension` Gui Command accordingly.
2020-06-17 12:53:29 +02:00
vocx-fc
2cb2b10d8f Draft: new make_linear_dimension functions for more precision
A single `make_dimension` handles three types of dimensions,
(1) simple linear, (2) linear linked to an object, and (3) linked
to a circular edge.

So, we provide two new functions, `make_linear_dimension`
and `make_linear_dimension_obj`, to handle the first two cases.
In this way we can check the input parameters much better.

We adjust the `Draft_Dimension` Gui Command accordingly.
2020-06-17 12:53:29 +02:00
vocx-fc
93f1e87bc0 Draft: move make_dimension function to its own module
Previously the `make_dimension` and `make_angular_dimension`
functions were in `draftobjects/dimension.py`.
Now they are moved to `draftmake/make_dimension.py`.

The original `makeAngularDimension` function requires angles
in radians which is counterintuitive for most cases. Also
the order is `[big, small]`.

The new function `make_angular_dimension` accepts angles
in degrees, and the order is `[small, big]`. The older
function is retained for compatibility purposes.

Also perform several improvements such as PEP8 cleanup,
writing complete docstrings, type checking the input arguments,
and depreacting the older call.

The `Draft.py` module, Gui Command, unit test, and test script
are updated accordingly.
2020-06-17 12:53:29 +02:00
vocx-fc
63df9aa7dc Draft: clean up the internal DraftAnnotation class
Add a function to clarify the added properties,
and clean up the PEP8 style of the code.
2020-06-17 12:53:29 +02:00
vocx-fc
b30b31ccb6 Draft: fix FlipDimension for LinearDimension
During the re-organization of the `Dimension` classes,
a new class `LinearDimension` was created. So this `FlipDimension`
is updated to handle it.
2020-06-17 12:53:29 +02:00
vocx-fc
d8bb119768 Draft: adjust text of tooltip in arrays 2020-06-17 12:13:39 +02:00
vocx-fc
61f8ab8829 Draft: fix small warning for the DraftLink class used in arrays 2020-06-17 12:13:39 +02:00
Johan Heikkila
e67053df5f Coin3D version 4 is needed (same version as for python3-pivy). Fixes broken nightly builds on Fedora. 2020-06-17 12:06:52 +02:00
donovaly
6db5b9f3b5 [TD] code optimization for DrawViewPart
Use same code for GeomHatch and Hatch in DrawViewPart as discussed here: https://forum.freecadweb.org/viewtopic.php?f=35&t=47536&start=10
2020-06-16 10:02:21 -04:00
Yorik van Havre
9c0a35f48b Arch: Added timing in IFC import 2020-06-16 13:39:21 +02:00
wmayer
acf3b5a256 boost: [skip ci] fix for boost < 1.60 2020-06-15 21:33:56 +02:00
wandererfan
6b47318065 [TD]fix 4335 section line pos on rotated base 2020-06-15 13:57:55 -04:00
wandererfan
d34c3573ab [TD]clear svg hatch on delete 2020-06-15 13:57:55 -04:00
wandererfan
de93a81768 [TD]Treat Imperial1/USCustomary as single value schema 2020-06-15 13:57:55 -04:00
wandererfan
c92d725aed [TD]change misleading prop name - Shape 2020-06-15 13:57:55 -04:00
wandererfan
0e4d893651 [TD]missing prefix/suffix for compound schema 2020-06-15 13:57:55 -04:00
wmayer
d6169d6478 boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
f2d3f7b03c boost: [skip ci] prepare fix for boost < 1.68 2020-06-15 19:16:19 +02:00
Yorik van Havre
0bf34a0b22 Arch: Export wall axes to IFC 2020-06-15 17:11:21 +02:00
Yorik van Havre
79710f0af3 Draft: Implemented annotation styles 2020-06-15 15:30:06 +02:00
donovaly
2c1ac10c2d get rid of unnecessary UI specifications 2020-06-15 08:05:05 -04:00
donovaly
d53c63f656 [TD] remove frame from pref dialogs 2020-06-15 08:05:05 -04:00
donovaly
b2250aad0b [TD] add missing update for Projection Group
currently when changing the scale or spacing this change is not taken into account until one explicitly marked the ProjGroup for recomputation
2020-06-15 08:04:14 -04:00
Bernd Hahnebach
ac70f2837d FEM: gui tools, code formating 2020-06-15 11:44:20 +02:00
Bernd Hahnebach
cc9e262c47 FEM: gui tools, sort icons and menues 2020-06-15 11:44:15 +02:00
Bernd Hahnebach
a9aac02fdc FEM: constraint fluid boundary, add comment 2020-06-15 11:44:07 +02:00
carlopav
136f2615e9 Draft: fixes #4100 Problems with Points command callbacks
The point callback was not properly removed on continue mode.
2020-06-15 10:12:18 +02:00
luz.paz
29cba68da9 Fix typos [skip ci]
Found via codespell v1.18.0.dev0  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2020-06-15 10:11:22 +02:00
donovaly
bd7bcf3c76 [Draft] add more patterns
This commit just syncs with the pattern of TechDraw:
- add further patterns
- save all patterns as plain SVG (strictly following thee SVG specifications) using Inkscape 1.0
2020-06-15 10:10:12 +02:00
Harald Geyer
5958b3976b Arch: importIFCHelper: Fix spurious message 2020-06-15 10:05:30 +02:00
vocx-fc
9567b22fc3 Draft: separate target into object and subelements in make_label
Before, the `make_label` function had a `target` parameter
that had to be a `LinkSub`, `[Part::Feature, "Edge1"]`.
However, it is easier to pass the individual components
separately using two parameters, `target_object` and `subelements`,
which can then be assembled into `[target_object, subelements]`.

The second element is optional, so it can be set to `None`,
and then the second element will be converted to an empty list,
`[target_object, []]`, as required by the Label's underlying `Target`
property.
2020-06-15 10:01:04 +02:00
vocx-fc
48fe9d4088 Draft: hide properties not used in the Label object
When `LabelType` is `'Custom'`, the `Target` property
is hidden and `CustomText` is shown.

For other values of `LabelType`, `Target` is shown,
and in turn `CustomText` is hidden.

This avoids showing unused information in the property editor.
2020-06-15 10:01:04 +02:00
vocx-fc
6b14fa35dc Draft: combine two types of labels using functions
We use smaller functions to return a list of strings corresponding
to each basic value of `LabelType`. Then the final `Text` value
can be defined as a simple value, or as the concatenation
of two smaller lists, depending on the value of `LabelType`.

Since we have 8 basic values, we could return up to 8^2
combinations, but at the moment we only return 8 basic
values and 5 simple combinations, which are the ones
that make the most sense.

In the future we could define new properties, say, `LabelType2`
and `LabelType3`, to be able to combine two or three types
of strings in an arbitrary fashion. At the moment, the possible
combinations are hard coded in `LabelType`.
2020-06-15 10:01:04 +02:00
vocx-fc
8c3ee6e4b3 Draft: organize the execute code of the Label in a function
Instead of placing the entire code in the `execute` method,
a `return_info` function is used to return the specific string
that we wish to display depending on the `Target` object,
 the `LabelType`, and subelement in `Target`, if any.

We also make the code more readable by using smaller variables,
and avoiding notations with lists of lists (`variable[0][1][6:]`).
2020-06-15 10:01:04 +02:00
vocx-fc
d23b664a2e Draft: set the properties of the Label class through functions
There are three general types of properties, target, leader,
and label; so we set the 9 properties using three functions,
and provide better documentation in the tooltips
for each property.
2020-06-15 10:01:04 +02:00
vocx-fc
fa092ae3df Draft: move make_label function to its own module
Also perform several improvements such as PEP8 cleanup,
writing complete docstrings, type checking the input arguments,
and deprecating the older call.

Update `Draft.py`, the Gui Command, the unit test, and test script
as well.
2020-06-15 10:01:04 +02:00
vocx-fc
f7e53eaab3 Draft: adjust the text size for Labels with format_object
This function, `draftutils.gui_utils.format_object`,
takes the value defined in the `DrafToolBar`, and uses it
to specify the `FontSize` for `Text` objects.

Now it specifies the `TextSize` for `Label` elements as well.
2020-06-15 09:59:57 +02:00