Commit Graph

22933 Commits

Author SHA1 Message Date
luz paz
b75cd3dd52 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
48365ecdbb Merge pull request #3974 from glhasson/glhasson-marlin_post.py
Path: Add marlin_post.py
2020-11-05 09:17:56 -06:00
wmayer
c8e46ee555 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
70eb263eb3 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
a5adc3eb8b README: minor nitpick [skip ci]
This commit didn't make it in to f33ca46076
2020-11-05 15:21:42 +01:00
wmayer
db537b8f90 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
9801b36e73 Sketcher: [skip ci] add method SketchObject::delGeometries 2020-11-05 12:37:07 +01:00
wmayer
a5b338630f Sketcher: [skip ci] minor optimization in SketchObject::delGeometry 2020-11-05 10:04:42 +01:00
GaryH
75b8ff3665 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
d632130831 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
0e0156a2c2 Add files via upload 2020-11-04 19:55:02 +01:00
luz paz
ff5f3799d8 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
19a5190243 Swap comma for period 2020-11-03 15:18:34 +01:00
Allan Nordhøy
70f4e523c2 Line 38 removed. 2020-11-03 15:18:34 +01:00
Allan Nordhøy
94ca8ac9af Requested suggestions added 2020-11-03 15:18:34 +01:00
Allan Nordhøy
f33ca46076 Typos and language in README 2020-11-03 15:18:34 +01:00
luz paz
396695240f 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
30e18cdbe0 Gui: [skip ci] support of translation in undo/redo dialog 2020-11-03 15:14:26 +01:00
Jean-Marie Verdun
50208b8bf1 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
f35d30bc58 Fix travis build for MacOS
Signed-off-by: Jean-Marie Verdun <jmverdun3@gmail.com>
2020-11-03 14:58:43 +01:00
donovaly
62f315df04 [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
44636aca2f Spreadsheet: Make all file headers uniform [skip-ci] 2020-11-03 14:52:53 +01:00
wmayer
c9923ab153 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
f4aceec54b Part: [skip ci] make arguments const references 2020-11-03 13:12:23 +01:00
wmayer
0324d2de64 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
709c0b546f Sketcher: Documentation editorial change 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
b0bc4b5dc6 Sketcher: Improve documentation of SketchGeometryFacade and ExternalGeometryFacade 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
79b192978e Sketcher: Restrict ability to create empty GeometryFacade and ExternalGeometryFacade objects to Python 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
7dcac46229 Sketcher: Facade for geometry and external geometry extension 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
4a166e0a50 Sketcher: Change GeometryFacadePy representation 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
93dee6ccd7 Sketcher: Separate ExternalGeometryExtension interface from class 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
10102f45f7 Sketcher: Utility functions to simplify common operations with GeometryFacade 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
284c4d93f7 Sketcher: Extend SketchObject Python Interface to get/set SketchGeometryExtension GeometryId (convenience interface) 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
0fd808dfc1 Sketcher: Geometry Facade interface for Geometry and SketchGeometryExtension 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
7bfec92bdf Sketcher: SketchGeometryExtension separation to interface 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
5b415f6d74 Part: Geometry extensions constness correction 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
33b4d00872 Part: Geometry - refactor py functions into class for code reuse 2020-11-03 12:01:22 +01:00
wmayer
e81482c7f9 Mesh: [skip ci] improve reading OFF mesh format 2020-11-03 11:15:37 +01:00
wmayer
ebb43351d1 Mesh: [skip ci] improve reading OFF mesh format 2020-11-02 16:36:07 +01:00
wmayer
9eb080488d PartDesign: [skip ci] minor cosmetic changes 2020-10-31 13:32:18 +01:00
M G Berberich
6d1b292280 [PartDesign] Dynamic hole cut-types
‣ Make countersink and counterbore on metric holes freely definable by user.

‣ Fixed the Naming of M1.6, M2, M2.5 and M3.5

‣ Added constructor for custom enums from Enums to PropertyEnumeration

‣ Put definitions of cut-types (counterbore/countersink) for
  screwtypes into json-files for easy modification.

‣ Allow users to put its own definitions in json-files in
  [UserDir]/Mod/PartDesign/Resources/Hole

‣ Contains several examples of cut-type definition json-files that are
  propably not production-ready.

This uses a local copy of nlohmann::json¹ to read json-files.

__________
¹ This is a very nice,header-only C++ library under the MIT License
  (https://github.com/nlohmann/json). I copied the single-file-version
  and the forward-declaration-header into …/PartDesign/App/ so no new
  dependencies arise.
2020-10-31 12:49:00 +01:00
M G Berberich
e84fa25c0b [PartDesign] Hole countersink for metric
fix a problem with counterbore and countersink in PartDesign Hole feature.

It was not possible to custom define counterbores or countersinks if a
metric thread hole was selected.

Handle the cut-types None, Counterbore and Countersink euqal
regardless of type of thread and let the user customize:
None:        none
Counterbore: diameter and depth
Countersink: diameter and angle
2020-10-31 12:49:00 +01:00
sliptonic
0a42189173 Merge pull request #4006 from dubstar-04/TurningPartOperation
[Path] Add selection gate and set default turning diameter
2020-10-30 09:44:54 -05:00
wmayer
462efdab37 Part: [skip ci] After removing a knot check if the B-spline is still valid 2020-10-30 13:55:31 +01:00
wmayer
6ebee86867 Sketcher: [skip ci] avoid possible memory leak 2020-10-30 13:21:51 +01:00
wmayer
53441613cc Part: [skip ci] handle OCCT exception in GeomBSplineCurve::copy() 2020-10-30 10:54:25 +01:00
Daniel Wood
9c296217e5 [Path] Tidy imports 2020-10-29 21:35:24 +00:00
Daniel Wood
c1302fb4fa [Path] PEP8 whitespace fixes 2020-10-29 21:29:25 +00:00
Daniel Wood
4f6c7797ab [Path] set the default max diameter 2020-10-29 21:27:32 +00:00
Daniel Wood
65e3476e20 [Path] PEP8 Formatting fixes 2020-10-29 19:55:45 +00:00