Commit Graph

25585 Commits

Author SHA1 Message Date
Abdullah Tahiri
6cf2d39a24 Sketcher: white-space only commit - remove unnecessary indentation 2021-12-25 16:32:43 +01:00
Ajinkya Dahale
3bd2bcc72f [Sketcher] Constrain new B-spline pole weight only if equal to first
When new control points are created in a b-spline in a sketch, do not constrain
their weights to be equal to the first, unless they are already equal. This way
if we have unequal weights to begin with and OCC has computed the appropriate
weights so that the new spline is closer to the original, the weights are not
disturbed.
2021-12-25 08:42:18 +01:00
0penBrain
ba78b194b3 [Sketcher] Ensure reference angle constraint is always positive, fixes #4621 2021-12-25 08:21:34 +01:00
mwganson
32e0e427c0 [sketcher_mapsketch] prevent circular dependency by disallowing mapping a sketch to an object in the sketch's outlistrecursive, make the command active only when there is a selection, recompute after doing attachment 2021-12-25 08:09:54 +01:00
Uwe
0a27540479 [PD] refine helix intersection calculation 2021-12-24 01:40:25 +01:00
Uwe
3cff3202ef [PD] fix Helix creation bug
Helices with zero height and zero growth are valid as long as there are no more than 1.0 turns.
2021-12-24 01:10:21 +01:00
Zheng, Lei
4ca362df0a App: catch Base::Exception in ObjectIdentifier::getDep() 2021-12-23 15:35:22 +01:00
wmayer
53f24f4bc2 Sketcher: add unit test for sketch with expressions 2021-12-23 15:32:24 +01:00
luz paz
1653d26ffa Cam: translate doxygen from DE/FR to EN
For the purpose of making the source documentation uniform, source comments in this file were translated to english.
2021-12-22 15:20:17 +01:00
Zheng, Lei
afd003db78 App: fix Enumeration assignment and comparison 2021-12-21 21:41:02 -07:00
Zheng, Lei
ccf10b8867 Minor code changes according to suggestions 2021-12-21 21:41:02 -07:00
Zheng, Lei
35d7b71466 Spreadsheet: code style change 2021-12-21 21:41:02 -07:00
Zheng, Lei
75e639c94c App/Gui: add new ObjectStatus TouchOnColorChange
For triggering recompute on color changes
2021-12-21 21:41:02 -07:00
Zheng, Lei
b32369d185 App: insert UUID property to trace the source of copied object
A property _ObjectUUID will be added to an object before it is being to
copied, if the property does not exists. Anoter propert _SourceUUID
property will be added to any copied object, with value set to its
source objct's _ObjectUUID.
2021-12-21 21:41:02 -07:00
Zheng, Lei
d286a54fc1 PartDesign: show error on SubShapeBinder CopyOnChange failure
The failure is not obivous as it would have been occurred in a
hidden temporary document.
2021-12-21 21:41:02 -07:00
Zheng, Lei
f6c2688319 App: clarify documentation of PropertyContainer::getPropertyNamedList() 2021-12-21 21:41:02 -07:00
Zheng, Lei
715d67e2c3 Gui: do not prompt when closing view of temp document 2021-12-21 21:41:02 -07:00
Zheng, Lei
d0b7bf1669 App: fix property status restore 2021-12-21 21:41:02 -07:00
Zheng, Lei
0029f3206d Spreadsheet: improve copy/cut/paste cells
Add color bound around user copy/cut ranges. Do not touch Spreadsheet
object when cutting, only do so when pasting.
2021-12-21 21:41:02 -07:00
Zheng, Lei
2bd4404afb PartDesign: expose SubShapeBinderPython 2021-12-21 21:41:02 -07:00
Zheng, Lei
5f6b34ebad App: expose some property status bits to PropertyContainerPy 2021-12-21 21:41:02 -07:00
Zheng, Lei
39c04e4877 PartDesign: support CopyOnChange in SubShapeBinder 2021-12-21 21:41:02 -07:00
Zheng, Lei
99f199ad7e App: fix pending object remove on recomputing 2021-12-21 21:41:02 -07:00
Zheng, Lei
caa29060cf Spreadsheet: fix handling of absolute cell address 2021-12-21 21:41:02 -07:00
Zheng, Lei
0dcea9b2e1 App: warning on invalid cell offset in Expression 2021-12-21 21:41:02 -07:00
Zheng, Lei
a9895e4f04 Gui: expose 'Expression...' property editor menu action
For expression binding of all type of property. Previously this action
is only available if 'Show all' is activated.
2021-12-21 21:41:02 -07:00
Zheng, Lei
08cdd323b6 App: add Property::isSame() API
To compare if two property contains the same content. The default
implementation in Property uses the persistense interface to save both
properties to string and compares the content. This may not work at the
moment if the property saves content in separate file or in binary.

Various properties have cheaper implementation to direct compare their
internal values.
2021-12-21 21:41:02 -07:00
Zheng, Lei
51d4e5c2a9 Draft: support 'CopyOnChange' in Draft link array 2021-12-21 21:41:02 -07:00
Zheng, Lei
4f29e81d0c App: support CopyOnChange property in Link
New property status bit 'CopyOnChange' is added for any document object
to publish any property as a 'Configuration' option. When Link is
linked to any object with such property, it will duplicate those
properties and added it Link itself as dynamic properties. If the user
changes any of these dynamic properties, the Link will auto copy the
linked to object and apply the new configuration to it.

The Link has a new property 'LinkCopyOnChange' to allow user to
enable/disable this feature.

Spreadsheet's 'Configuration Table' feature will publish its
configuration property with 'CopyOnChange'.

Currently, once the linked object is copied, it will be independent with
the original object. There is no mechanism to auto sync changes back to
the copy.
2021-12-21 21:41:02 -07:00
Zheng, Lei
1f604ec632 Gui: fix property view linked property highlight 2021-12-21 21:41:02 -07:00
Zheng, Lei
bd201c82ce Spreadsheet: add menu action 'Configuration table...'
To make it easy for user to create dynamically switchable configuration
tables using spreadsheet.
2021-12-21 21:41:02 -07:00
Zheng, Lei
7d23d5b984 Spreadsheet: support mapping protocol in PropertySheetPy
Read only mapping protocol support to retrieve a range of cell values.
Expects the key to be a string of either a single cell address or a
range.
2021-12-21 21:41:02 -07:00
Chris Hennes
82759f6203 Spreadsheet: Compilation fixes for cherry-picked commits 2021-12-21 21:41:02 -07:00
Zheng, Lei
2a3951ca32 Spreadsheet: change alias handling
No longer add dynamic property for alias, simply rely on
get(Dynamic)PropertyByName() to check for aliases.

Add new API PropertyContainer::getPropertyNamedList() so that
ExpressionCompleter can discover properties with aliases.
2021-12-21 21:41:02 -07:00
Chris Hennes
79cda0a1b7 Spreadsheet: Compilation fixes for cherry-picked commits 2021-12-21 21:41:02 -07:00
Zheng, Lei
68fca40983 Spreadsheet: support cell binding
Cell binding allows one to bind a range of cells of one sheet to another
range of cells of an arbitary sheet, including any empty cells in the
range.

The binding is implemented with PropertyExpressionEngine and
PropertySheet::setPathValue(), which binds a special path of
PropertySheet, such as

    .cells.Bind.A1.D1

to an expression, such as

     tuple(.cells, <<A2>>, <<A5>>)

The A1 and D1 in the example above specifies the binding start and end
cell address. And <<A2>> and <<A5>> are the range of cells to bind to.
Note that you can use any expression that evalutes to string for the
binding destination, e.g. <<A%d>> % B1, which uses the value inside B1
to construct the binding destination. The '.cells' in the tuple shown
above is an example to bind cells of the same PropertySheet. It can be
change to to reference to any other spreadsheet, even those outside the
current document, e.g. Document#Spreadsheet001.cells
2021-12-21 21:41:02 -07:00
Zheng, Lei
3d1b9f5c90 Spreadsheet: support paste into cell range
For single range copy, the range selection when pasting determines the
start cell and the number of duplications.

For example, when copying a range A1:B2 (i.e. a 2x2 square) and pasting
into a selection of C1:C5 (i.e. a 5x1 vertical line), the square will be
duplicated once in horizontal, but twice in vertical, resulting new
cells range from C1:D4. This logic is borrowed from google sheet.

For multi-ranged copy, no multi duplication is intended. If more than
one selection range exists before pasting, only the top left cell of
the last selected range is used to determine the starting cell for
pasting. The cells will be copied with the exact cell layout keeping any
empty cells in between. This logic is different from google sheet, where
it disallows unalligned multi-ranged copy, and will condense and
eliminate any empty cells for aligned multi-range copy.
2021-12-21 21:41:02 -07:00
Zheng, Lei
b76509bfea Gui: handle exception in property item display 2021-12-21 21:41:02 -07:00
Zheng, Lei
df6a7e4a56 App: add expression build-in href() for backward compatibility
As deprecated alias for hiddenref()
2021-12-21 21:41:02 -07:00
Uwe
fa50122c33 [PD] fix a hole thread issue
- The thread must not be deeper than the hole.
  (One could see that if one used a thread depth dimension and set
  it to the same value than the hole depth, the thread was too deep.)
2021-12-22 02:54:49 +01:00
Uwe
c5f87d8ea8 [PD] hole dialog improvements
- no keyboard tracking
- don't disable labels since we don't do this for the other dialog labels
- avoid a doubled word in subsequent labels
- further UI file changes are by Qt's Designer
2021-12-22 02:46:07 +01:00
luz paz
a40c57786c Base: translate doxygen from DE/FR to EN
For the purpose of making the source documentation uniform, source comments in this file were translated to english.
2021-12-22 01:17:06 +01:00
luz paz
9c74c0afb1 Mesh: translate doxygen from DE to EN
For the purpose of making the source documentation uniform, source comments in this file were translated to english.
2021-12-22 01:09:52 +01:00
Uwe
9770449be7 [PD] fix several hole thread issues
- actually use specified thread depth, fixes issue reported here: https://github.com/FreeCAD/FreeCAD/pull/4274#issuecomment-997787744
- fixes 2 UI enabling issues
- the thread depth cannot be longer than the hole depth
- the hole cannot be deeper than the through-all depth
2021-12-22 01:09:06 +01:00
Chris Hennes
f429a3630e Addon Manager: Fix github macro update code 2021-12-21 17:23:02 -06:00
Chris Hennes
b371487224 Addon Manager: Correct macro installation location 2021-12-21 14:48:35 -06:00
wmayer
427fe5d1e1 Part: handle removal of function HLRBRep_PolyAlgo::Angle in OCC 7.5 2021-12-21 21:26:00 +01:00
wmayer
ea85cf5e36 Part: expose Poly HLR algorithm to Python 2021-12-21 19:45:01 +01:00
Chris Hennes
4c303e339e Addon Manager: Correct proxy default 2021-12-21 11:19:21 -06:00
Yorik van Havre
283b0a6382 Merge pull request #5243 from paullee0/ArchEquipment_2_SketchArch_UpdateAttachmentObject_support_take3
[ArchEquipment] add SketchArch attachment support (3rd attempt)
2021-12-21 11:47:22 +01:00