Commit Graph

102 Commits

Author SHA1 Message Date
luzpaz
95070bded4 Draft: Fix 'testing inequality to None' syntax (#7275)
* Draft: Fix 'testing inequality to None' syntax 

- Substitute `is not None` for `!= None`
- Trim trailing whitespace on touched files
2022-07-30 00:26:56 +02:00
Yorik van Havre
2336fad83e Merge pull request #7141 from Roy-043/Draft-make_hatch.py-should-return-the-object
Draft: make_hatch.py should return the object
2022-07-18 10:48:07 +02:00
Roy-043
b92eff0aa8 Draft: Fix color handling in make_point.py 2022-07-17 12:32:08 +02:00
Roy-043
392423da14 Draft: make_hatch.py should return the object 2022-07-06 18:44:19 +02:00
Roy-043
8559de5dda Draft: Fix Placement in make_sketch 2022-06-22 12:11:47 +02:00
marioalexis84
aa2ebb9601 Draft: Make ShapeString editable by double-click - fixes #5885
* Draft: Make ShapeString editable - fixes #5885
2022-04-08 17:47:41 +02:00
Yorik van Havre
a8420f918b Draft: Restored cloning of arch objects 2022-03-21 15:16:53 +01:00
Roy
84b3003e8e Draft: Housekeeping: call 'make' functions with new name (4) 2022-02-20 22:31:08 -06:00
Roy
1566c00d35 Draft: Housekeeping: call 'make' functions with new name (3) 2022-02-13 11:01:15 +01:00
Roy
acfdfb9c2d Draft: Housekeeping: call 'make' functions with new name, continued 2022-02-12 19:34:57 +01:00
Roy
f59011bfea Draft: Housekeeping: call 'make' functions with new name 2022-02-10 16:44:37 +01:00
Roy
418ca4a235 Draft: Draft_Label fix label type list 2021-12-10 18:40:43 +01:00
luz paz
b90fefa1ca Refined code formatting for uniformity 2021-10-30 15:20:28 -04:00
luzpaz
fa7ea019f8 Add requested revision by @chennes
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2021-10-30 15:20:28 -04:00
luz paz
8aab47fb06 Draft: Fix superfluous whitespace in translations + misc. typos 2021-10-30 15:20:28 -04:00
Chris Hennes
34a7fc95d8 [Draft] Eliminate default value modification 2021-10-11 21:28:55 -05:00
Roy-043
eee7eb760a Draft: make_ellipse default value face should be None 2021-10-09 10:17:07 +02:00
Roy-043
9b634a2a75 Draft_Hatch_ViewProvider -> ViewProviderDraftHatch 2021-10-07 15:08:06 +02:00
Roy-043
5dd472aea0 Update make_hatch.py 2021-10-05 15:58:47 +02:00
luz paz
1f97dbc285 Draft: whitespace tweak 2021-09-08 10:22:26 -04:00
Yorik van Havre
2bf67f0191 Draft: Introduced Hatch command + object 2021-09-06 15:27:52 +02:00
marioalexis
4e9f94d9b1 Draft: Use ordered vertexes to create Draft Wire from Part.Wire 2021-06-12 18:09:45 -03: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
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
Roy-043
9ec9261fcd Update make_label.py
If custom_text is a string there is no need to put it in a list.
2021-05-22 16:33:12 +02:00
Roy-043
cbe5d9b219 Draft: Fixed make_label to accept list of strings for custom_text
The make_label function should accept a list of strings for custom_text. Compare the make_text function. The new code was mostly taken from there.
2021-05-18 21:08:02 +02:00
luz paz
d42cad2bba Crowdin: remove superfluous whitespace from translation
ref: https://crowdin.com/translate/freecad/548/en-en?filter=basic&value=2#6587168
2021-05-17 10:51:05 -04:00
Yorik van Havre
966906da96 Merge pull request #4557 from luzpaz/crowdin/whitespaces-substituted-into-code
Crowdin: represent whitespace in code instead of in string
2021-05-05 17:18:35 +02:00
Roy-043
86f3c4021a Update make_ellipse.py
Draft: Fixed make_ellipse.py: the face argument was not used and therefore "filled mode" did not work in the GUI.
2021-04-29 21:23:26 +02:00
luz paz
6f83a4a815 Crowdin: represent whitespace in code instead of string 2021-04-19 06:23:07 -04:00
luz paz
b94ee8b275 Crowdin: represent whitespace in code instead of in string [skip ci]
Removing possible whitespace from strings lead to more accurate translations
2021-04-19 06:16:09 -04:00
Yorik van Havre
abee35f38a Draft: Fixed broken translations everywhere 2021-02-12 14:44:58 +01:00
Chris Hennes
a7522c384e [DRAFT] Catch only Exception, not BaseException 2021-02-11 11:52:45 +01:00
luz paz
19d0e1123f Draft: fix LGTM 'Testing for None should use the 'is' operator' alerrts
https://lgtm.com/projects/g/FreeCAD/FreeCAD/alerts/?mode=tree&ruleFocus=7900090
2021-02-03 21:58:47 +01:00
Stefan Tröger
ec5ac30756 Remove ExtensionProxy and rely on default Python proxy for extensions. fixes #0004534 2021-01-30 16:00:48 +01:00
carlopav
f97e7aec3c Draft: change in default Draft.makeCopy
always copy with dependencies when copying App::Part and PartDesign::Body
.
2021-01-03 15:10:29 +01:00
luz paz
fc99ff2def Draft: fix header uniformity + trailing whitespace
[skip ci]
2020-12-11 13:19:49 +01:00
Yorik van Havre
583b59c29f Draft: Condensed the Draft toolbar style buttons into one with more options 2020-11-10 14:14:18 +01:00
luz paz
27fc4d6c7e Fix various typos [skip-ci] 2020-10-24 12:25:46 +02:00
luz paz
0b27eec4e2 Fix various typos
Found via `codespell v2.0.dev`  
```
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-10-21 16:20:08 +02:00
marioalexis
1ad7b9788b Improve make_sketch and geometric related functions 2020-10-19 13:15:14 +02:00
Zheng, Lei
e3e7686773 Draft: add support for point link array 2020-09-21 14:01:39 +02:00
vocx-fc
513c0e9eb4 Draft: new PathTwistedArray object
It takes a `Shape` and replicates it around a path, while at the
same time adding a rotation to each copy. This can be used to create
a twisted "ribcage" from a frame-like object, which can be used
in a more complicated `Shape`, for example, a tunnel or bridge
object.
2020-09-03 12:34:16 +02:00
vocx-fc
bd8432f1c6 Draft: makeLayer, small adjustments to keep compatibility
This follows from the migration of the Layer code
done in 99c6e20e69.

In the older `makeLayer` function, the parameters `drawstyle`
and `transparency` could be `None`; in the new `make_layer` function,
`drawstyle` must be an explicit string, and `transparency`
must be a number. If not provided, they use default values.
2020-08-11 11:08:48 +02:00
vocx-fc
ee11678a58 Draft: migrate Layer object and function to the new structure
Move `make_layer` to `draftmake`; `Layer` and `LayerContainer`
to `draftobjects`; `ViewProviderLayer` and `ViewProviderLayerContainer`
to `draftviewproviders`.

The make function and the classes are imported in `Draft.py`
to support the usage of the older `VisGroup`.
2020-07-20 14:21:15 +02:00
vocx-fc
a82d6b9801 Draft: add modules of draftmake to the proper Doxygen group
This includes `make_arc_3points`, `make_array`, `make_bezcurve`,
`make_block`, `make_bspline`, `make_circle`, `make_circulararray`,
`make_clone`, `make_copy`, `make_dimension`, `make_drawingview`,
`make_ellipse`, `make_facebinder`, `make_fillet`, `make_label`,
`make_line`, `make_orthoarray`, `make_patharray`, `make_point`,
`make_pointarray`, `make_polararray`, `make_polygon`,
`make_rectangle`, `make_shape2dview`, `make_shapestring`,
`make_sketch`, `make_text`, `make_wire`, `make_wpproxy`.

These are added to the `draftmake` Doxygen group
so that the functions contained in each module are listed
appropriately in the automatically generated documentation.
2020-07-17 13:01:45 +02:00
vocx-fc
1c65c7dc92 Draft: add Doxygen strings to the packages' __init__ files
The packages are `draftfunctions`, `draftgeoutils`, `draftguitools`,
`draftmake`, `draftobjects`, `drafttaskpanels`, `drafttests`,
`draftutils`, `draftviewproviders`.
2020-07-17 13:01:45 +02:00
vocx-fc
3a7751049b Draft: move the convertDraftTexts function to make_text
The old `convertDraftTexts` function was moved from the `Draft.py`
module to the `draftutils.utils` module; however, here it is
not possible to use because the `makeText` function
is not accessible. Therefore, the function is moved to
`draftmake.make_text`.
2020-07-13 14:35:38 +02:00
vocx-fc
b1fade6f9e Draft: clean up ViewProviderText class
Various improvements in style, PEP8, spacing, docstrings.

The list of strings is set to empty before being assigned again.
This solves a problem of the text not being updated correctly.

In the past some `try-except` blocks were there to catch and
ignore certain exceptions that apparently were caused by a
race condition, where certain properties are not assigned
to the object before they are used. These errors
don't seem to occur in v0.19, so we removed the exception
handling. We leave comments mentioning the issue
in case it re-appears.

The `DisplayMode` is swapped, so now `'2D text'` means that the
text always faces the camera, and `'3D text'` means that the
text can be positioned in different orientations in the 3D space.
This is consistent with the `Draft Label` behavior.

A function `draftutils.gui_utils.migrate_text_display_mode`
is provided to help migrate older objects of type `Text`
or `DraftText` to the new display mode.
2020-07-10 12:23:43 +02:00
carlopav
07745ef467 Draft: makeCopy support to reparent App::Part grouped objs 2020-07-07 10:12:49 +02:00