Commit Graph

20684 Commits

Author SHA1 Message Date
Russell Johnson
33a1804050 Path: Add icons to feature tabs
Add Base Geometry, Heights, Depths, and Operation icons on the tabs in the Tasks Window editor.
2020-06-18 15:54:14 -05:00
Russell Johnson
56f6736923 Path: Add icon reference to UI panel 2020-06-18 15:54:14 -05:00
wmayer
e1cfaf1298 Gui: [skip ci] handle case if an absolute path to a qss file is set 2020-06-18 12:34:43 +02:00
wmayer
87c0365add Cloud: [skip ci] add missing closing curly brace 2020-06-18 12:33:27 +02:00
Yorik van Havre
f05253f882 Draft: snapper.getPoint() does not return object anymore if no snapped object 2020-06-17 14:03:29 +02:00
Jean-Marie Verdun
575df24435 Retab 2020-06-17 13:05:01 +02:00
Jean-Marie Verdun
b393cf67df 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
94bfa8af9c Introduce ComputeDigestAmzS3v4 and BuildHeaderAmzS3v4
into the Cloud code (WIP)
2020-06-17 13:05:01 +02:00
Jean-Marie Verdun
cf230c930c Add SHA256 sum function 2020-06-17 13:05:01 +02:00
Jean-Marie Verdun
1883bf560f 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
96d81c77b2 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
4ef2063715 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
c042eb7454 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
2877870318 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
984de3b3da 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
e81ca586a2 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
9d0e4259c3 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
dd526ef40d 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
86dd7cbe05 Draft: adjust text of tooltip in arrays 2020-06-17 12:13:39 +02:00
vocx-fc
927379c175 Draft: fix small warning for the DraftLink class used in arrays 2020-06-17 12:13:39 +02:00
donovaly
ddf0cf3136 [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
d804eb6ec3 Arch: Added timing in IFC import 2020-06-16 13:39:21 +02:00
wmayer
76aac3a221 boost: [skip ci] fix for boost < 1.60 2020-06-15 21:33:56 +02:00
wandererfan
b7a448dadc [TD]fix 4335 section line pos on rotated base 2020-06-15 13:57:55 -04:00
wandererfan
8a9ea0caeb [TD]clear svg hatch on delete 2020-06-15 13:57:55 -04:00
wandererfan
c19fae2cbb [TD]Treat Imperial1/USCustomary as single value schema 2020-06-15 13:57:55 -04:00
wandererfan
6632921e38 [TD]change misleading prop name - Shape 2020-06-15 13:57:55 -04:00
wandererfan
9fb162f5ba [TD]missing prefix/suffix for compound schema 2020-06-15 13:57:55 -04:00
wmayer
f3b460e42e boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
02a4ba3bca boost: [skip ci] prepare fix for boost < 1.68 2020-06-15 19:16:19 +02:00
Yorik van Havre
1c7c3b3d9f Arch: Export wall axes to IFC 2020-06-15 17:11:21 +02:00
Yorik van Havre
15c9489885 Draft: Implemented annotation styles 2020-06-15 15:30:06 +02:00
donovaly
6632580aba get rid of unnecessary UI specifications 2020-06-15 08:05:05 -04:00
donovaly
b292194ccb [TD] remove frame from pref dialogs 2020-06-15 08:05:05 -04:00
donovaly
d2bc4a66b4 [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
4db7676940 FEM: gui tools, code formating 2020-06-15 11:44:20 +02:00
Bernd Hahnebach
69ad806635 FEM: gui tools, sort icons and menues 2020-06-15 11:44:15 +02:00
Bernd Hahnebach
2ef6f1049c FEM: constraint fluid boundary, add comment 2020-06-15 11:44:07 +02:00
carlopav
59ed708749 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
720b0b96d0 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
cf7c241cad [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
7cbed5235c Arch: importIFCHelper: Fix spurious message 2020-06-15 10:05:30 +02:00
vocx-fc
8679bdbdaf 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
466ae17a4a 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
bbdd9abcdc 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
d3d904e381 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
40e707ef4b 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
c7eab9c65e 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
a719859054 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
vocx-fc
2a15bd18f6 Draft: reset the list of strings in the Label viewprovider
When the value of the `Text` is changed, in the Coin node
only the first element in the list of strings is updated,
the other elements remain the same, resulting in an incorrect
label.

So we empty the value of the Coin string with `setValue("")`,
and then we can assign the new string list, producing the correct
expected result.
2020-06-15 09:59:57 +02:00