Commit Graph

156 Commits

Author SHA1 Message Date
luzpaz
a3d445e1c9 Path: fix typo in source comments
[skip ci]
2023-06-24 23:49:04 -04:00
Christian Mesh
e74559097b Allow XYZ rotation in placement applied to path
Also fixes an issue with path export where _TempObject (no Placement)
would throw an exception.
2023-02-13 10:41:41 -05:00
Christian Mesh
55f9e4d1dd Apply Placement to simulated/exported GCode
This changed is inspired by (and slightly refactors) the Array Path modifier.

It currently takes the Placement XYZ and Z Angle into consideration.
Future work could also implement rotating the path around the X and Y
axes.
2023-02-13 10:41:41 -05:00
mlampert
1c530b2634 PATH: Feature/dogbone ii (#7660)
* Start of new dogbone dressup

* Added Instruction and tangents support for G2/3 moves

* Added Maneuver class to represent a set of moves and process them coherently

* Created kinks and verify their creation.

* Added dogbone detection and verification

* Simplified gcode strings

* Added horizontal t-bones generation

* Added support for vertical t-bone

* Consolidated t-bone creation

* Added support for pathLength

* Added support for tbone on short edge

* Added support for long edges

* Added support for dogbones

* Fixed dogbone for non-horizontal lead-in

* Horizontal bone adaptive length tests

* Fixed dogbone angle and adaptive length

* Some code cleanup

* Added adaptive length tests for dogbones

* Split base data classes into their own PathLanguage module.

* Splitting dogboneII implementation into its constituents

* Moved adaptive length into DogbonII module

* Separate dogboneII generator test cases and changed interface to allow for dynamic length calculations

* Unit tests for length calculation

* Initial DogboneII unit test

* Unit tests and fixes for plunge move handling

* Unit tests for the remaining styles and incision strategies

* Basic DogboneII gui

* Added support for markers

* Better color and selection scheme for markers

* Cleaned up import statements

* Added DogboneII to Path WB init

* Support for dogbone on dogbone and fixed t-bone generation

* Fixed t-bone on short leg bones

* Fixed tbone on short edge when short edge is m1

* Fixed t-bone on long edge for m0/m1 and CW/CCW

* Removed redundant code

* Removed redundant 'Dress-up' from menu entries

* black code formatting

* added generator to cmake

* Fixed typos
2022-11-02 15:25:09 -05:00
Markus Lampert
6b55f34abe Moved remaing files out of PathScripts 2022-10-11 21:43:09 -07:00
Markus Lampert
998347e97f Started moving base classes into Path.Base module 2022-10-11 21:43:09 -07:00
Markus Lampert
29a7dc144e Removed deprecated and obsolete Path.Tool and Path.Tooltable 2022-10-11 21:43:08 -07:00
Markus Lampert
6da2c338df Moved all Path operations with model and gui into Path.Op module 2022-10-11 21:43:08 -07:00
Markus Lampert
a5a284b148 Moved PathLog to Path.Log and import it by default 2022-10-11 21:43:08 -07:00
sliptonic
553554f936 Merge pull request #6612 from mlampert/bugfix/bag-of-minor-isssues
PATH: Bugfix/bag of minor isssues
2022-03-21 08:34:23 -05:00
Markus Lampert
d52fc71663 Blanket black formatting for Path python files 2022-03-20 13:23:48 -07:00
Russell Johnson
95cffaf502 Path: Simplify changes per developer conversations
Also update TestPathDepthParams.py to reflect simplification of changes.
Remove some comments.
Employ `sorted()` function per MLampert suggestion
2022-03-20 14:25:17 -05:00
sliptonic
afb3262118 simpler way to filter roughly equal depth values 2022-03-20 14:25:16 -05:00
Russell Johnson
3e6d542cd7 Path: Fix roughly equal depth entries
Add code block to remove first of any two consecutive, roughly equal depth values (twin values).

Add two unit tests to support new code block and use cases.
2022-03-20 14:25:14 -05:00
Markus Lampert
934b0aaa07 Consistent black formatting of all Path python files 2022-02-28 21:06:16 -08:00
Markus Lampert
8583894284 Remove pylint annotations and script 2022-02-28 21:02:45 -08:00
markus
09c10dada0 Gracefully handle op creation abort when no TC is available or selected. 2022-02-15 13:44:13 -08:00
sliptonic
752d8cf964 Remove unnecessary third argument from translate() calls 2022-01-31 14:27:11 -06:00
sliptonic
7121032f1b cleanup imports
Remove py2 test for Queue.
2022-01-16 13:16:23 -06:00
sliptonic
b42b689a95 Remove deprecated code 2022-01-16 13:06:33 -06:00
sliptonic
4d91ea271d rename function.
'job' has a meaning in Path.  sort_jobs doesn't sort jobs, it sorts hole locations.
2022-01-16 12:57:49 -06:00
sliptonic
e601b60469 Refactor filter arcs.
Slightly more readable.  Avoids error with missing variable.
2022-01-16 12:39:39 -06:00
sliptonic
fc2d6c172b Make CircularHoleBase use drillableLib
debugs

remove deprecated PathUtils.isDrillable

drillableLib cmake

make PathProfile use new drillableLib
2022-01-15 15:34:17 -06:00
sliptonic
c19e971368 Translation cleanup PathUtils/PathUtil 2022-01-03 10:48:39 -06:00
sliptonic
2a22ead350 black reformat
black reformat for PathCommands

Black reform PathCopy

Black reform PathComment

Black reformat PathCustom/gui

Black reformat PathUtil/PathUtils

Black reformat PathHop

Black reformat PathGeom

Black reformat

Black reformat

Black reformat

Black reformat

Black reformat

black reformat

Black reformat

black
2022-01-03 10:48:39 -06:00
sliptonic
8e6c5a497b make sure depthparams handles negative steps and finish step correctly
revised test
2021-11-26 13:27:44 -06:00
Daniel Wood
034d9ec21a use toolbits with tooltip calculation 2021-05-04 15:56:45 +01:00
mlampert
254505e83c Merge branch 'master' into feature/job-tool-group 2021-01-03 18:12:41 -08:00
Markus Lampert
c077672add Check for CuttingEdgeAngle existance before using it for drill tip calculation. 2021-01-01 20:53:28 -08:00
Markus Lampert
8e6f964e0d Renamed ToolTable group to Tools in order to (not) set expectations. 2020-12-31 18:40:23 -08:00
Markus Lampert
121152deb9 Use job.ToolTable.Group instead of job.ToolController. 2020-12-31 15:38:18 -08:00
Markus Lampert
9684d820df Replaced print messages with PathLog statements 2020-12-15 20:05:42 -08:00
markus
d5beaf806d Filter all TCs for suitability for a given op. 2020-12-03 18:15:36 -08:00
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
c8712b83f8 more pythonic params (thanks plaes) 2020-10-16 13:49:47 -05:00
sliptonic
015910448a add RtoIJ function to PathUtils. fixes #2606
function is unused at this time.  It should be used by preprocessor scripts like gcode_pre to
convert radius mode arcs to IJ mode.
2020-10-16 11:02:29 -05:00
Gabriel Wicke
5c6de6dd14 Path: Area based unified projection implementation
Generalize the `extractFaceOffset` method to `getOffsetArea`, which can
handle both face offsetting and projection. Another difference is that
the new method exposes Area's ability to preserve internal holes,
defaulting to preserving. The method is moved to the PathUtils module,
reflecting its generality and fairly wide used across Path.

This method is then used to provide a drop-in alternative to
`FindUnifiedRegions` via a small wrapper in PathSurfaceSupport. The Area
implementation is generally quick, but can fail (throw) in some cases,
so the wrapper is trying the Area method as an optimization first, and
falls back to the full `FindUnifiedRegions` logic if that fails.
2020-07-21 18:34:09 -07:00
Gabriel Wicke
6b3815a766 [path] Implement Ramer-Douglas-Peucker line simplification
Implement an iterative version of the Ramer-Douglas-Peucker line
simplification algorithm
(https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm),
which reduces line complexity to a limited linear deviation from the
original polyline. The ability to reason about linear deflection is the
key improvement over the previous linear implementation.

Worst case complexity is O(n^2), but expected complexity for typical
cases is O(n log n). A potentially faster alternative would be to call
out to libclipper, treating the line as a closed polygon. However, in
practice, performance of this implementation seems good enough. A
complex 3d surface operation optimizes in a few seconds, and reduces
output gcode size from about 220MB with the previous implementation to
10MB.
2020-06-17 20:10:18 -07:00
Eric Trombly
070099daa4 fix some typos in recent lazyloader implementation 2020-04-15 12:32:48 -05:00
Eric Trombly
7fe094ac02 add lazyloader support
lazy_loader is copied to Ext now, modified external imports to lazy_load

add a few more imports to be lazy loaded, think the install path is correct now

[TD]"<" symbol embedded in html

revert changes to path modules for testing

use lazyloader in PathAreaOp.py

add back in deferred loading

temp change to print error message in tests

temp change to print error message in tests

add _init__.py to lazy_loader

make install in CMakeLists.txt one line
2020-04-13 21:14:34 -05:00
luz.paz
180805c55e Fix typos
Found via  
```
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-03-06 14:50:35 +01:00
Markus Lampert
81f809cfcf Removed dead code for debugging shortcut warnings. 2020-01-03 23:13:55 -08:00
mlampert
ee937d52b1 Merge branch 'master' into feature/tool-bit-poc 2019-12-03 18:56:16 -08:00
luz.paz
379d041664 Fix typos and some trailing whitespace
Found via:  
```
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,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
```
2019-12-03 12:22:59 +01:00
Markus Lampert
296058d6dd Added ToolController creation 2019-11-28 17:31:35 -08:00
Markus Lampert
221893eeeb Fixed PathHelix assert statements 2019-08-22 18:02:49 +02:00
Markus Lampert
f34ac89266 switched to pylint3 and fixed additional warnings 2019-07-01 15:32:54 -07:00
Markus Lampert
4e46bbf811 Fixed pylint warnings for PathUtil family 2019-07-01 15:32:54 -07:00
sliptonic
b55c210f39 remove unnecessary imports. normalize debug log levels 2019-06-21 13:01:01 -05:00
sliptonic
4a984de243 Path: normalize proxy stratements
remove bare exceptions
2019-06-21 13:01:01 -05:00