Commit Graph

22954 Commits

Author SHA1 Message Date
wmayer
b9e373b9b2 Part: make view provider for helix and spiral inherit from primitive and use spline extension 2020-11-08 12:19:57 +01:00
wmayer
e5c63bc3d0 Part: [skip ci] implement extension ViewProviderSplineExtension 2020-11-08 12:18:44 +01:00
wmayer
7fa3488aa9 smesh: [skip ci] comment out call of std::set_unexpected that has been removed in C++17 2020-11-08 10:47:08 +01:00
wmayer
f49ae11976 Part: [skip ci] properly handle transactions when editing primitives 2020-11-08 10:43:04 +01:00
wmayer
dbd14fe2b9 Part: [skip ci] implement live preview for box and cylinder 2020-11-08 10:26:07 +01:00
donovaly
7460cd5ebc [part] remove a now misleading comment
I added this comment when I read the dialog state fro the index of the type combobox, now we read the primitive's TypeID so the comment is misleading
2020-11-08 06:43:16 +01:00
Abdullah Tahiri
0a83c8d6f3 Sketcher: Fix select associated constraints when drawhandler active 2020-11-07 20:18:14 +01:00
Chris Hennes
4daf73c61a Release handler in commands where not needed
Fixes #0004478: Active constraint tool blocks sidebar tasks from working.

Many commands are interrupted by the existence of a handler. Rather than having these commands silently cancel, purge the handler if a command executes that does not need it.

When right-clicking on an item in the Constraint Task sidebar, any current operation is cancelled and the FreeCAD selection is synced with the selected items in the constraints QListWidget. This allows all of the menu items in the context menu to function properly: if the selection is not synced, anything that relies on the FreeCAD selection (like Delete) will sillently fail.
2020-11-07 20:17:19 +01:00
sgrogan
508d98e07a set -DBUILD_ENABLE_CXX_STD='C++17' 2020-11-07 19:48:31 +01:00
sgrogan
9f780b0f9a increase osx timeout limit 2020-11-07 19:48:31 +01:00
wmayer
0d352cba43 smesh: [skip ci] comment out call of std::set_unexpected that has been removed in C++17 2020-11-07 19:47:11 +01:00
wmayer
f644846dcc Part: [skip ci] add missing export macro 2020-11-07 10:17:34 +01:00
wmayer
266ca1ad28 Part: allow to edit primitives via dialog 2020-11-06 23:12:40 +01:00
Daniel Wood
34e9a571df [Path] Fix Typo - Stock object requires uppercase 'S' 2020-11-06 20:01:56 +01:00
wmayer
677ce69873 [Part] allow to edit helices via a dialog
+ add class ViewProviderPrimitive to avoid to re-implement setEdit/unsetEdit methods for each sub-class separately
+ avoid using global variables
+ when editing a feature directly pass it to the dialogs
+ when editing a feature then do not use active document as this could point to the wrong object
+ fix undo/redo message
+ re-add '3D View' button to location dialog
2020-11-06 19:59:14 +01:00
wmayer
ca5d4d5f72 Part: [skip ci] fix build failure due to missing class declarations 2020-11-06 13:46:38 +01:00
donovaly
18c1364d1d [Part] allow to edit helices via a dialog
fixes https://tracker.freecadweb.org/view.php?id=3857

Currently primitives of the Part WB can only be created suing a dialog. Editing is not possible that way.

This PR makes the first step in achieving this:

- Helices can now be edited using the same dialog ans when created

- New location dialog. The Gui::LocationWidget used there is not aware of the rotation angle and it treats the rotation axis as direction. To fix this, I set changed the dialog so that one can define every parameter as in the PartDesign attacher dialog (Placement, rotation axis and rotation angle separately). Another reason for this change was that one could not use the location dialog, fill it with the placement properties of the object, and close the dialog without any change. Because of the missing angle info the objects was then always rotated despite nothing was changed.

If this PR goes in, I will extend it for the other primitives.

Todo for the future: allow a preview of the changes made in the dialog. (I could not find out how this is done.)
2020-11-06 13:27:03 +01:00
donovaly
da2e8f1aba [TD] change RichAnnos's linestyle to the one of other TD components
we already use enumerations for line styles for other components of TD and also the preferences. It seems I just have overseen this occurrence.
2020-11-06 12:14:18 +01:00
wmayer
27070858f0 Base: [skip ci] fix several -Wunused-parameter warnings 2020-11-06 08:15:44 +01:00
wmayer
42a723d172 Base: [skip ci] fix several -Wunused-parameter warnings 2020-11-06 08:14:00 +01:00
tomate44
0ffa0279c6 Surface: prevent GeomFillSurface to produce C0 rational BSpline surface 2020-11-06 07:52:40 +01:00
luz paz
60c055e62d Path: Fix header uniformity and remove trailing whitespace
This PR fixes header uniformity across all Path files. It also removes all trailing whitespace.
2020-11-05 19:57:21 +01:00
sliptonic
06a32299d8 Merge pull request #3974 from glhasson/glhasson-marlin_post.py
Path: Add marlin_post.py
2020-11-05 09:17:56 -06:00
wmayer
7ae13688bf PartDesign: [skip ci] do not write error but log message when reading thread definitions of hole feature 2020-11-05 15:40:49 +01:00
M G Berberich
7e11afabb9 fixes bug not enabling ui-elements
see:
https://forum.freecadweb.org/viewtopic.php?p=445186&sid=45bd75e3ab8c4d830decf91e946f7391#p443362
2020-11-05 15:35:05 +01:00
luz paz
14e80d78f5 README: minor nitpick [skip ci]
This commit didn't make it in to 21bb62d3fcc8
2020-11-05 15:21:42 +01:00
wmayer
47d470d3db Sketcher: [skip ci] use delGeometries to delete all superfluous geometry in one go after changing multiplicity 2020-11-05 15:19:39 +01:00
wmayer
12cb99513f Sketcher: [skip ci] add method SketchObject::delGeometries 2020-11-05 12:37:07 +01:00
wmayer
bc3b50744e Sketcher: [skip ci] minor optimization in SketchObject::delGeometry 2020-11-05 10:04:42 +01:00
GaryH
b0fcac8ddc Modify code format to PEP8
Add --marlin-config argument
  Marlin requires certain configuration settings in order to work well
  with FreeCAD. Those configuration settings will be added to the
  end of the gcode file as comments, when --marlin-config is entered
  as a post processor argument.
  For PEP8 conformity:
      Change some double-quotes to single-quotes.
      Change sequence of import statements.

Modify code format to PEP8
  Indentation and line length meet PEP8 requirements.
  Other aspects of PEP8 are partially implemented.

Add code to remove embedded comments
  Also, minor tweaks throughout

Change outstring to outList for clarity
  Change format_outstring to format_outList
  Change: if PathUtil.opProperty(obj, 'Active') is False:
    To: if PathUtil.opProperty(obj, 'Active') == False:

Format file to PEP8 standard
  Format first pass using:
    autopep8 --in-place --aggressive --aggressive
  Manually adjust format for better appearance
  Recheck format using http://pep8online.com/
  Change code related to pythonopen into with open() code
  Minor refactoring
2020-11-04 19:55:02 +01:00
GaryH
ef386cf85c Refactor marlin_post.py
Change G4 P to G4 S for Marlin
  Marlin uses P for milliseconds, S for seconds.
  FreeCAD uses P for seconds, so change P to S.

Remove code for G20 inch mode and G91 relative mode
  Due to the fundamentals of the FreeCAD pre-processor,
  this post processor can only operate in the following modes:
  G90 Absolute positions
  G21 Metric units (mm)
  G17 XY plane (3 axis vertical milling only)

Expand RETURN_TO option to float values for XYZ
  The RETURN_TO option previously only accepted integer values, and
  only for X and Y.
  This change allows float values for XY and optionally Z.

Add class: "Drill" within drill_translate()
  The nested functions within drill_translate() need to modify the
  variable that was named trBuff. To allow this, trBuff was changed
  to class: "Drill" with property "gcode".
  Within drill_translate(), including within the nested functions,
  modifying "trBuff" is now replaced with modifying "Drill.gcode".

Merge in updated portions of grbl_post.py
  Prior verson was derived from an older grbl_post.py.
  Merge in the portions of the newer grbl that seem improved.
  Refactor overall after the merge.

Add options for partial comments
  Add option:  --no-finish-comments
  Add option:  --no-path-comments
2020-11-04 19:55:02 +01:00
GaryH
3e223e242b Add files via upload 2020-11-04 19:55:02 +01:00
luz paz
f839820817 Fix various typos [skip-ci]
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-11-04 10:18:30 +01:00
luz paz
c5b6a8d9d1 Swap comma for period 2020-11-03 15:18:34 +01:00
Allan Nordhøy
dbe1cd3371 Line 38 removed. 2020-11-03 15:18:34 +01:00
Allan Nordhøy
b13a51f299 Requested suggestions added 2020-11-03 15:18:34 +01:00
Allan Nordhøy
402ddf1534 Typos and language in README 2020-11-03 15:18:34 +01:00
luz paz
fc1085d4dc Issue #4473: Expose openCommand() CommandConstraints.cpp to translation
`Sketcher/Gui/CommandConstraints.cpp` will now be parsed for translation. Based on https://github.com/FreeCAD/FreeCAD/pull/3993#issuecomment-715906238  
( ref. Issue #4473 )
2020-11-03 15:15:16 +01:00
wmayer
556afa0438 Gui: [skip ci] support of translation in undo/redo dialog 2020-11-03 15:14:26 +01:00
Jean-Marie Verdun
21fdc2825b Remove installation in the case of timeout during build
Signed-off-by: Jean-Marie Verdun <jmverdun3@gmail.com>
2020-11-03 14:58:43 +01:00
Jean-Marie Verdun
8e507b3c96 Fix travis build for MacOS
Signed-off-by: Jean-Marie Verdun <jmverdun3@gmail.com>
2020-11-03 14:58:43 +01:00
donovaly
722e4ed3c0 [PD] hole - fix typo
- also update profile changing method since fraction diameters no longer end with a '0' in profile ISO coarse
2020-11-03 14:54:01 +01:00
luz paz
068997112c Spreadsheet: Make all file headers uniform [skip-ci] 2020-11-03 14:52:53 +01:00
wmayer
ed62c73ca2 Gui: [skip ci] Revert workaround to avoid to handle wheel events twice inside the 3d view
This workaround caused a regression with Qt 5.15. For more details see: https://forum.freecadweb.org/viewtopic.php?f=3&t=50231
2020-11-03 14:50:06 +01:00
wmayer
f384202b93 Part: [skip ci] make arguments const references 2020-11-03 13:12:23 +01:00
wmayer
3094348ad4 Gui: [skip ci] when closing document via context-menu ask the user first how to continue
See also forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=51746
2020-11-03 12:09:28 +01:00
Abdullah Tahiri
916526b866 Sketcher: Documentation editorial change 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
947cd64b8b Sketcher: Improve documentation of SketchGeometryFacade and ExternalGeometryFacade 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
fb5e76992f Sketcher: Restrict ability to create empty GeometryFacade and ExternalGeometryFacade objects to Python 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
e9e8724cb1 Sketcher: Facade for geometry and external geometry extension 2020-11-03 12:01:22 +01:00