Commit Graph

22925 Commits

Author SHA1 Message Date
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
Abdullah Tahiri
36e58956c3 Sketcher: Change GeometryFacadePy representation 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
868c2ada73 Sketcher: Separate ExternalGeometryExtension interface from class 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
74ff589fd0 Sketcher: Utility functions to simplify common operations with GeometryFacade 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
063e0a6767 Sketcher: Extend SketchObject Python Interface to get/set SketchGeometryExtension GeometryId (convenience interface) 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
d994e2fe3b Sketcher: Geometry Facade interface for Geometry and SketchGeometryExtension 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
e4f7d0f068 Sketcher: SketchGeometryExtension separation to interface 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
88e542b345 Part: Geometry extensions constness correction 2020-11-03 12:01:22 +01:00
Abdullah Tahiri
5c492f727c Part: Geometry - refactor py functions into class for code reuse 2020-11-03 12:01:22 +01:00
wmayer
2b50e59d48 Mesh: [skip ci] improve reading OFF mesh format 2020-11-03 11:15:37 +01:00
wmayer
53e440497c Mesh: [skip ci] improve reading OFF mesh format 2020-11-02 16:36:07 +01:00
wmayer
c9c9ab9a6b PartDesign: [skip ci] minor cosmetic changes 2020-10-31 13:32:18 +01:00
M G Berberich
7f328ac376 [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
c66a6be944 [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
8e4bc39194 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
eefa7dd798 Part: [skip ci] After removing a knot check if the B-spline is still valid 2020-10-30 13:55:31 +01:00
wmayer
50b38cca84 Sketcher: [skip ci] avoid possible memory leak 2020-10-30 13:21:51 +01:00
wmayer
e425a6bfe5 Part: [skip ci] handle OCCT exception in GeomBSplineCurve::copy() 2020-10-30 10:54:25 +01:00
Daniel Wood
6be4352ea7 [Path] Tidy imports 2020-10-29 21:35:24 +00:00
Daniel Wood
e22de3bde1 [Path] PEP8 whitespace fixes 2020-10-29 21:29:25 +00:00
Daniel Wood
eb3fbc0f94 [Path] set the default max diameter 2020-10-29 21:27:32 +00:00
Daniel Wood
4ea4ad84ce [Path] PEP8 Formatting fixes 2020-10-29 19:55:45 +00:00
Daniel Wood
8418c014f5 [Path] Add TurnPart selection 2020-10-29 19:55:05 +00:00
Roy-043
bbddf0501c Draft: Draft_Dimension_linked_geometry_fix
Linked geometry was not handled if the selected edge started or ended at vertex zero.
2020-10-29 19:26:55 +01:00
Yorik van Havre
687f55e94f Arch: Added Text settings to SectionPlanes 2020-10-29 18:28:35 +01:00
wmayer
e22286f5b4 Base: [skip ci] expose Type::createInstance and Type::createInstanceByName to Python 2020-10-29 17:18:10 +01:00
sliptonic
4aca75d396 Merge pull request #4003 from dubstar-04/feature/jobsetupplane
[Path] Enable Face selection for axis alignment (JobSetUp)
2020-10-29 08:53:33 -05:00
Daniel Wood
13e76e32e0 Merge branch 'master' into feature/jobsetupplane 2020-10-28 17:19:10 +00:00
Daniel Wood
91f5f470f4 Reorder imports to match PEP8 guidance 2020-10-28 17:10:51 +00:00
Daniel Wood
766bfe9398 silence lgtm warnings 2020-10-28 17:09:49 +00:00