Commit Graph

2553 Commits

Author SHA1 Message Date
Roy-043
95428dfbe0 Draft: Fix Draft_PointArray and Draft_TwistedArray Count problems
Draft_PointArray and Draft_TwistedArray have Count problems:
1. Draft_PointArray: Count is always zero.
2. Draft_PathTwistedArray: Number of items is Count+1.
3. Draft_PathTwistedLinkArray: Count is increased whenever object is recomputed.

Also the first item in a twisted array should be unrotated.
2021-06-23 11:06:47 +02:00
Yorik van Havre
fe7f1ba1c3 Draft: Fixed working plane set on non-coin view 2021-06-22 16:12:59 +02:00
Yorik van Havre
5b6f56d55c Draft: Create Draft texts when using the C++ DXF importer 2021-06-22 13:00:58 +02:00
Yorik van Havre
27ede668e8 Draft: Fixed construction group name 2021-06-22 12:38:22 +02:00
Yorik van Havre
24362e9020 Merged crowdin translations 2021-06-17 16:04:02 +02:00
Yorik van Havre
d12702e588 Updated ts files 2021-06-17 15:49:33 +02:00
Yorik van Havre
b5ad89f0bc Merge pull request #4854 from luzpaz/typos
Fix source comment typos
2021-06-15 16:00:20 +02:00
Yorik van Havre
4722bda92c Merge pull request #4856 from marioalexis84/draft-make_wire
Draft: Use ordered vertexes to create Draft Wire from Part.Wire
2021-06-15 15:59:52 +02:00
marioalexis
22b157dbbf Draft: Check special characters using focused input field 2021-06-14 01:37:44 -03:00
marioalexis
4e9f94d9b1 Draft: Use ordered vertexes to create Draft Wire from Part.Wire 2021-06-12 18:09:45 -03:00
luz paz
19080b58b3 Fix source comment typos
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,apoints,ba,beginn,behaviour,bloaded,bottome,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,ontop,orgin,orginx,orginy,ot,pard,parms,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,./build/doc/SourceDocu`
2021-06-10 17:33:40 -04:00
Yorik van Havre
ee6a9b8c7d Merged crowdin translations 2021-06-10 12:24:24 +02:00
Yorik van Havre
78436e0f35 Updated ts files 2021-06-10 11:48:18 +02:00
Yorik van Havre
3317cf384d Merge pull request #4833 from carlopav/draft-fix-autogroup
Draft: fix Autogroup to fix Draft_OrthoArray crash when using active Std_Part.
2021-06-09 12:44:42 +02:00
Yorik van Havre
ecec1b1044 Merge pull request #4840 from marioalexis84/draft-wp
Draft: Improve alignToSelection method on WorkingPlane
2021-06-09 12:43:58 +02:00
Roy-043
a8ad89ae7c Draft: Fix wrong tree icon for Draft_PointArray 2021-06-08 14:29:03 +02:00
marioalexis
b5e154518f Draft: Check null shape in geometry.py functions 2021-06-06 21:30:20 -03:00
marioalexis
6f101761bb Draft: Improve alignToSelection method on WorkingPlane 2021-06-06 21:30:20 -03:00
carlopav
45aa103dd4 Draft: Autogroup, insert guard to prevent cyclic references
ref. Forum discussion: Draft_OrthoArray: Crash when using active Std_Part. https://forum.freecadweb.org/viewtopic.php?f=23&t=59155&p=508132#p508132

Autogroup try to add new created Draft Objects into the active Part, but if the Part is used as a Base for the new object this could create a cyclic reference. 
This behaviour is prevented by adding a check for " obj in active_part.InListRecursive"
2021-06-06 11:21:21 +02:00
carlopav
e0a6c34dcc Draft: Autogroup, rename variables to more readable names 2021-06-05 17:07:32 +02:00
Yorik van Havre
3e98ff41f9 Updated ts files 2021-06-04 18:30:30 +02:00
Yorik van Havre
1292398d9a Merge pull request #4827 from Roy-043/Draft_Fix_gui_stretch
Draft: Fix gui_stretch
2021-06-04 13:18:05 +02:00
Yorik van Havre
692789bcfe Merge pull request #4816 from luzpaz/typos
Fix misc. typos
2021-06-04 13:16:21 +02:00
Yorik van Havre
c11671f18f Merge pull request #4811 from carlopav/DraftEdit_Improvements
Draft: Edit improvements to context menu and code organization
2021-06-04 13:15:18 +02:00
luz paz
0f0c79c827 Arch: fix typo in translate() 2021-06-03 14:36:21 -04:00
Yorik van Havre
9f81ca933d merged crowdin translations 2021-06-03 15:43:34 +02:00
Yorik van Havre
441635aff0 updated ts files 2021-06-03 15:37:33 +02:00
Roy-043
64ee9f335c Draft: Fix gui_stretch
If a wire is created to replace a rectangle, the MakeFace property of the wire should match that of the rectangle.
2021-06-02 14:28:56 +02:00
carlopav
cdb3a1d7fd Draft: Edit, cleanup of new GuiTools.addPoint methods
In new splitted addPoint methods, getObjectsInfo and the consequent checks have been removed and moved to main DraftEdit module in a new get_specific_object_info method.
This method returns the info for the selected object at a given position and the 3d Vector of the point clicked on the object.
2021-06-01 23:21:12 +02:00
carlopav
d2d570f875 Draft: Edit, moved resetTrackers for context menu actions to main module
The wrapper allows to call resetTrackers in the main module after the callback to the GuiTools is executed.

This is the last commit, many thanks to @matthijskooijman for having menthored me :)

I think it's helpful to have @matthijskooijman explanation on this use of the wrapper:

This defines a new wrapper function, that calls the original callback and then calls resetTrackers. Note that this creates a new function for every loop iteration, so each of these wrapper functions captures potentially different callback, self and obj values so things work as expected. Note I did something weird with the callback value there: Since functions like these capture a variable, not its value at the time of function definition, and loop variables like label and callback are a single variable shared between all loop iterations, capturing callback directly ends up with all wrappers calling the last callback (i.e. they all capture the same variable and by the time the wrappers are called, that variable will contain the last of the callbacks). This is commonly solved by using a default value in the function definition, since such a default value uses the value of the (in this case) callback variable, not capturing the variable.
2021-06-01 23:20:41 +02:00
carlopav
4db4d1c34f Draft: Edit, Added reverse wire option to context menu
Now Draft Edit can reverse the order of the points of a Draft_Wire
2021-06-01 22:53:24 +02:00
carlopav
d3b524704f Draft: Edit, rewriting context menu system
get_edit_point_context_menu(self, edit_command, obj, node_idx)
get_edit_obj_context_menu(self, edit_command, obj, position)
that are called depending if the user is over an editpoint or over another part of the object.
2021-06-01 22:53:01 +02:00
carlopav
50a596f687 Draft: Edit, Split out addPoint in multiple methods in the GuiTools
Now Draft_Wire, Draft_BSpline, Draft_Bezcurve have their own methods to add points.
2021-06-01 21:57:38 +02:00
carlopav
2e36f8a832 Draft: Edit, change startEditing method to accept (obj, node_idx)
This enable to start editing also without an user click event, by just calling the method and specifying the object and the edit point index.
It is used for alternative edit mode (alt_edit_mode) by arc context menu
2021-06-01 21:47:37 +02:00
carlopav
aa7dddeecc Draft: Edit, Remove all the empty pass functions
Remove unused functions. Since GuiTools objects inherit from the GuiTools class, they do not need those placeholders.
2021-06-01 21:47:37 +02:00
Yorik van Havre
b51e321011 Merge pull request #4822 from marioalexis84/draft-fillet
Draft: Add shortcut to fillet command
2021-06-01 17:01:53 +02:00
Yorik van Havre
e2dd61119c Draft: Added ExclusionPoints property to shape2dview object 2021-06-01 11:30:04 +02:00
marioalexis
86d5cd0cfe Draft: Add shortcut to fillet command 2021-05-31 16:18:36 -03:00
Yorik van Havre
8ca7be83c8 Merge pull request #4820 from Roy-043/Draft_Fix_make_text
Draft: make_text fixed 3 small issues
2021-05-31 19:44:13 +02:00
Roy-043
5f77a5df89 Draft: make_text fixed 3 small issues
Fixed 3 small issues in make_text that came up while working on make_label (pull request #4801).
2021-05-30 19:53:02 +02:00
Yorik van Havre
077a4868bf Merge branch 'master' of github.com:FreeCAD/FreeCAD 2021-05-28 14:11:51 +02:00
Yorik van Havre
2ee8e4fdbb Merge pull request #4801 from Roy-043/draft_make_label_text_input
Draft: Fixed make_label to accept list of strings for custom_text
2021-05-28 13:46:10 +02:00
Yorik van Havre
dd1220b345 Merged crowdin translations 2021-05-27 14:51:33 +02:00
Yorik van Havre
4b7a5d2e98 Updated translation files 2021-05-27 14:44:40 +02:00
Roy-043
5121104a46 Merge branch 'master' into draft_make_label_text_input 2021-05-26 16:23:22 +02:00
Yorik van Havre
79f865ed28 Merge pull request #4804 from luzpaz/Crowdin-Draft
Crowdin: fix Draft mirror code typo
2021-05-25 15:07:28 +02:00
Yorik van Havre
dbc0a39ffa Merge pull request #4808 from matthijskooijman/movewithhost-link-exception
Draft: Do not move children of App::Link objects
2021-05-25 15:06:55 +02:00
Yorik van Havre
d0c67024e2 Merge pull request #4809 from matthijskooijman/draft-arch-simplifications
Draft & Arch: Python code simplifications
2021-05-25 15:05:46 +02:00
Roy-043
40eb62974e Update make_label.py
Brought back name=_name. Added type(custom_text) is list check.
2021-05-24 18:42:27 +02:00
Matthijs Kooijman
d928f37761 Draft: Fix "Show groups in layer list drop-down button" preference
The code that was intended to handle this preference looked inside
Mod/BIM instad of Mod/Draft for the preference. This seems to have been
broken since the preference was first introduced in commit 9976a5ece0
(Draft: Turned autogroup button into layers selector (added pref option
to restore old groups-based system)).

This also removes a stray "-" that was probably a leftover from a merge
conflict, introduced in commit 0547d23660 (Draft: move Draft_AutoGroup to
gui_groups module). Since -True is still true and -False is still false,
this did not actually break the code, though.

See https://forum.freecadweb.org/viewtopic.php?t=42018 for related
discussion.
2021-05-22 18:33:15 +02:00