Commit Graph

2306 Commits

Author SHA1 Message Date
wmayer
c3d35c65fe dxf: [skip ci] Coverity: Buffer not null terminated 2020-09-14 14:37:20 +02:00
paul lee
be42d1b6cc [ DraftVecUtils.cloest ] Elaborate documentation 2020-09-09 16:01:39 +02:00
paul lee
ea16bb9394 [ DraftVecUtils.closet ] Could return the distance (no unit) of the tested point from the found closest point. 2020-09-09 16:01:39 +02:00
Yorik van Havre
dc97e31707 Draft: Small bugfix in DXF exporter 2020-09-09 14:38:16 +02:00
carlopav
6f2691631c Draft: fixed obj.TypeId output after utils.get_type() change
.


.
2020-09-09 14:13:29 +02:00
carlopav
28c00f8383 Draft: provide the possibility to implement support for Edit in objs
As suggested by @Vanuan. and already implemented in new experimental BIM Wall: 1084a4b0a9
Draft: updated Draft Edit

thanks to the suggestions by @Vanuan
Draft: further bugfixing and improvements in Draft_Edit


Draft: moved Draft_Edit preview code into respective GuiTools
2020-09-09 14:13:29 +02:00
carlopav
8e1bb66cf2 Draft: support experimental BIM wall in Draft_Edit 2020-09-09 14:13:29 +02:00
Roy-043
7f415b4b58 Update scale.py 2020-09-09 14:12:43 +02:00
Roy-043
2d11f16e9d Update gui_stretch.py 2020-09-09 13:16:23 +02:00
vocx-fc
5cf799dd85 Draft: rename svg parameter to fillspaces (lowercase) 2020-09-09 12:53:54 +02:00
vocx-fc
b835e5f29d Draft: replace FreeCAD with App for consistency 2020-09-09 12:53:54 +02:00
vocx-fc
7627d0b81a Draft: move getSVG to draftfunctions submodule
Small fixes where the `get_svg` function is used, for example,
in the (obsolete) `DrawingView` class and `Arch_SectionPlane`.

Also update the unit tests accordingly.
2020-09-09 12:53:54 +02:00
Roy-043
db947e3513 Draft: Fix wire placement issue if Copy=False. 2020-09-08 16:16:16 +02:00
Roy-043
4c0bd797fe Update gui_snapper.py 2020-09-08 16:13:02 +02:00
luz paz
5cd408687b Fix typos in various files [skip-ci]
Found via `codespell 2.0.dev0`  
```
codespell -q 2 -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,currenty,dof,doubleclick,dum,eiter,elemente,feld,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-09-04 10:10:31 +02:00
vocx-fc
e477283ffc 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
4b8ebccc7d Draft: improve style and indentation of getSVG function
Also rename `getSVG` to `get_svg`.

Instead of testing `obj.isDerivedFrom('Part::Feature')`
we test for a Shape, `hasattr(obj, 'Shape')`.
This is to support the SVG generation of `App::Links`.
2020-09-03 11:40:50 +02:00
vocx-fc
4bf665a6fd Draft: move format_point out of getSVG function 2020-09-03 11:40:50 +02:00
vocx-fc
775c4d0a97 Draft: move getText out of getSVG function 2020-09-03 11:40:50 +02:00
vocx-fc
67c0af7b53 Draft: move getOvershoot out of getSVG function 2020-09-03 11:40:50 +02:00
vocx-fc
f240972ffa Draft: move getArrow out of getSVG function 2020-09-03 11:40:50 +02:00
vocx-fc
6eccf47848 Draft: move getEllipse out of getSVG function 2020-09-03 11:40:50 +02:00
vocx-fc
4c498e132e Draft: move getCircle out of getSVG function 2020-09-03 11:40:50 +02:00
vocx-fc
04afa25f91 Draft: move getPath out of getSVG function 2020-09-03 11:40:50 +02:00
vocx-fc
3e12316977 Draft: rename getPattern to get_pattern 2020-09-03 11:40:50 +02:00
vocx-fc
cfce1a8ad2 Draft: rename getDiscretized to get_discretized 2020-09-03 11:40:50 +02:00
vocx-fc
e61efd9e6d Draft: rename getProj to get_proj 2020-09-03 11:40:50 +02:00
vocx-fc
8b5e922e05 Draft: improve initial code of getSVG
Improve also the docstrings, and minor adjustments in PEP8 style
and spacing.
2020-09-03 11:40:50 +02:00
vocx-fc
ee58279b3e Draft: use draftutils.utils module in getSVG 2020-09-03 11:40:50 +02:00
luz paz
30c07083a1 Draft: Fix typo in variable name 2020-08-29 19:14:13 +02:00
Vanuan
b53326b38c High DPI support: Scale Draft cursor to device pixel ratio 2020-08-19 19:59:13 +02:00
Vanuan
024ae4dd9f Fix a typo in draft snapping 2020-08-11 11:59:52 +02:00
vocx-fc
72ec8445f2 Draft: Offset save and restore the value of OCC checkbox 2020-08-11 11:57:35 +02:00
SurajDadral
f97d27cb56 Fix placement of rebar wires in Draft.getSVG.py 2020-08-11 11:25:07 +02:00
paul lee
102cfb4a71 [Draft - geotuils.offsets] Fix To Work with Sketch
Forum Discussion - https://forum.freecadweb.org/viewtopic.php?f=23&t=48852&p=419209#p419209
2020-08-11 11:10:42 +02:00
paul lee
7a41078624 [Draft - geoutils.offsets] Fix Circle and Arc Offset Direction
Forum Discussion - https://forum.freecadweb.org/viewtopic.php?f=23&t=48852#p418903
2020-08-11 11:10:42 +02:00
vocx-fc
d51955f658 Draft: makeLayer, small adjustments to keep compatibility
This follows from the migration of the Layer code
done in 831e517717.

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
luz paz
59e3ea096e Crowdin: Merge new translations [skip-ci] 2020-08-07 17:17:35 +02:00
wmayer
47d570716c LGTM: [skip ci] fix: Non-virtual destructor in base class 2020-07-24 19:30:12 +02:00
wmayer
1a16cde1f5 Coverity: Structurally/Logically dead code 2020-07-20 17:34:28 +02:00
wmayer
433ec2d6e4 Coverity: Copied into fixed size buffer 2020-07-20 17:34:25 +02:00
vocx-fc
d106be0b9b Draft: add Draft Layer unit tests
Also create a test `Layer` in the `draft_test_objects` script.
2020-07-20 14:21:15 +02:00
vocx-fc
831e517717 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
cdc6c5f541 Draft: move GuiCommand for Draft Layer to its own module 2020-07-20 14:21:15 +02:00
vocx-fc
7566bd1343 Draft: add module getSVG to the proper Doxygen group
Only one module `getSVG` added to the `getSVG` Doxygen group.

Probably at some point the module will be broken into smaller
modules to organize the code better.
2020-07-17 13:01:45 +02:00
vocx-fc
08069a89eb Draft: add modules of draftviewproviders to the proper Doxygen group
This includes `view_array`, `view_base`, `view_bezcurve`,
`view_bspline`, `view_circulararray`, `view_clone`, `view_dimension`,
`view_draft_annotation`, `view_draftlink`, `view_facebinder`,
`view_fillet`, `view_label`, `view_orthoarray`, `view_point`,
`view_polararray`, `view_rectangle`, `view_text`, `view_wire`,
`view_wpproxy`.

These are added to the `draftviewproviders` Doxygen group
so that the functions and classes contained in each module
are listed appropriately in the automatically generated
documentation.
2020-07-17 13:01:45 +02:00
vocx-fc
6a3de864e7 Draft: add modules of draftutils to the proper Doxygen group
This includes `gui_utils`, `init_draft_statusbar`, `init_tools`,
`messages`, `todo`, `translate`, `utils`.

These are added to the `draftutils` 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
f9d92f3f93 Draft: add modules of drafttests to the proper Doxygen group
This includes `auxiliary`, `draft_test_objects`, `test_airfoildat`,
`test_creation`, `test_dwg`, `test_dxf`, `test_import`,
`test_import_gui`, `test_import_tools`, `test_modification`,
`test_oca`, `test_pivy`, `test_svg`.

These are added to the `drafttests` Doxygen group
so that the functions and classes contained in each module
are listed appropriately in the automatically generated
documentation.
2020-07-17 13:01:45 +02:00
vocx-fc
d70a194dc7 Draft: add modules of drafttaskpanels to the proper Doxygen group
This includes `task_circulararray`, `task_orthoarray`,
`task_polararray`, `task_scale`, `task_selectplane`,
`task_shapestring`.

These are added to the `drafttaskpanels` Doxygen group
so that the functions and classes contained in each module
are listed appropriately in the automatically generated
documentation.
2020-07-17 13:01:45 +02:00
vocx-fc
42599838f4 Draft: add modules of draftobjects to the proper Doxygen group
This includes `array`, `base`, `bezcurve`, `block`, `bspline`,
`circle`, `clone`, `dimension`, `draft_annotation`, `draftlink`,
`drawingview`, `ellipse`, `facebinder`, `fillet`, `label`,
`patharray`, `point`, `pointarray`, `polygon`, `rectangle`,
`shape2dview`, `shapestring`, `text`, `wire`, `wwproxy`.

These are added to the `draftobjects` Doxygen group
so that the functions and classes contained in each module
are listed appropriately in the automatically generated
documentation.
2020-07-17 13:01:45 +02:00