Commit Graph

48 Commits

Author SHA1 Message Date
Samuel Abels
cf2d1ae480 CAM: AssetManager now supports passing mutilple stores to all get_*() methods 2025-05-26 17:40:03 +02:00
Samuel Abels
6d11221461 CAM: Rename getBuiltinToolPath to getBuiltinAssetPath 2025-05-26 17:34:49 +02:00
Samuel Abels
f384656d87 CAM: Fix Gui test for ToolBitBrowserWidget 2025-05-19 21:02:54 +02:00
Samuel Abels
b14d8ff98e CAM: Replace complete tool management (PR 21425) 2025-05-19 20:27:28 +02:00
jffmichi
972a4908b9 CAM: add test for refactored postprocessor using dressups 2025-05-07 04:58:07 +02:00
jffmichi
6539f90e92 CAM: respect SHOW_OPERATION_LABELS in post-operation information 2025-05-07 04:56:08 +02:00
sliptonic
2b50357b45 Merge pull request #20928 from LarryWoestman/refactor
CAM:  Fix tool changes not correctly output in gcode in the refactored code base
2025-05-06 10:47:47 -05:00
sliptonic
2302645ace Merge pull request #20591 from jalapenopuzzle/jalapenopuzzle/cam_snapmaker_machine_types
CAM: snapmaker improve support for different machine variants and toolheads
2025-05-05 10:47:07 -05:00
Lawrence Woestman
778102c890 CAM: Fix tool change output errors, with tests 2025-04-22 14:57:45 -07:00
sliptonic
6732480f4c Merge pull request #18880 from dbtayl/adaptive_roughing
[CAM] Adaptive roughing/overhang detection
2025-04-21 09:21:13 -05:00
jalapenopuzzle
6e190328a8 CAM: Snapmaker use manufacturer's data table instead of calculating boundary offsets 2025-04-14 08:03:17 +10:00
pre-commit-ci[bot]
8f7488479c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-04-14 08:03:17 +10:00
jalapenopuzzle
89a0faf8ee CAM: snapmaker add --quick-swap and --bracing-kit options 2025-04-14 08:03:16 +10:00
jalapenopuzzle
e22eb3cce9 CAM: snapmaker clean output_header() 2025-04-14 08:03:16 +10:00
jalapenopuzzle
394046df36 CAM: snapmaker toolheads and spindle speeds
* Removed generic snapmaker machine and toolhead configuration. The idea of running a CNC code that is not matched to the machine's abilities and work area seems dangerous.
* --machine argument is required
* --toolhead argument is required when the selected machine is compatible with more than one toolhead. When the selected machine only supports one toolhead, it is selected as the default.
* --spindle-percent defaults according to the selected toolhead capabilities. If the toolhead can do RPM, then RPM is used, otherwise falls back to percent. This option now functions as an override.
* fixed a bug in convert_spindle() when RPM is selected. The gcode was not returned.
2025-04-14 08:03:14 +10:00
jalapenopuzzle
26c8aacc54 CAM: snapmaker --machine is a required option 2025-04-14 08:03:14 +10:00
jalapenopuzzle
f6e12966dc CAM: snapmaker machines separate T machines and capitalise names 2025-04-14 08:03:13 +10:00
jalapenopuzzle
cb5966371c CAM: snapmaker unit tests fix type lint
NOTE get_gcode() can return an argparse.Namespace if something goes wrong with parsing the arguments.
This is contrary to the str specification.
2025-04-14 08:03:11 +10:00
jalapenopuzzle
d8b4a5b3e6 CAM: snapmaker unit tests fix assertTrue() -> assertEqual()
The test was NOT functioning as required.
assert True does NOT compare the expected line with the generated GCode line.
After fixing this, the expected output was updated so that the unit tests pass.
2025-04-14 08:03:11 +10:00
jalapenopuzzle
ed29dc3ef0 CAM: snapmaker fix invalid escape sequences in regular expressions 2025-04-14 08:03:10 +10:00
sliptonic
ba1b864875 Merge pull request #20321 from phaseloop/array-dressup-2
[CAM] Replace Array operation with array dressup
2025-04-08 08:13:17 -05:00
Dan Taylor
3938617864 CAM: Adaptive: Rename tests with descriptive names; remove empty dummy test; minor test cleanups/comments/clarifications 2025-04-02 20:55:51 -05:00
Dan Taylor
2ff623e6ca CAM: Adaptive: Machine entire model if no faces/edges are selected ("adaptive roughing") 2025-04-02 20:55:21 -05:00
Dan Taylor
5c1e93759a CAM: Adaptive: Add Z stock to leave (separate from XY stock to leave) and order-by-region/order-by-depth cut ordering options 2025-04-02 20:47:44 -05:00
Dan Taylor
54116898da CAM: Adaptive: Make machined regions respect stock and model in 3D, not just the 2D projections of the stock and selected machining bounding box 2025-04-02 20:35:15 -05:00
Lawrence Woestman
22f73df97c CAM: Enabled coolant in the refactored_grbl post, with test 2025-03-27 07:31:13 +01:00
pre-commit-ci[bot]
7637041532 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-03-23 22:44:10 +00:00
PhaseLoop
3eb8552db5 unit tests for array dressup 2025-03-23 23:38:14 +01:00
Lawrence Woestman
e08f948661 CAM: Used inheritance to simplify the refactored postprocessors more
Updated the Masso tests now that it is using the new API.
2025-03-20 19:22:50 -07:00
Lawrence Woestman
1fecb21db7 CAM: Added three options to the refactored postprocessors
with tests.

Removed extra spaces in comments to work around auto-fix
removal of spaces at the end of lines in multi-line python strings.
2025-03-17 20:59:29 -05:00
clsergent
ea3d78c398 Added snapmaker postprocessor to CAM 2025-03-12 20:00:55 +01:00
Lawrence Woestman
033817f5fe CAM: Fixed F parameter handling for only rotary axes
with tests
      and the commit for converting the refactored*
      postprocessors to the new API
2025-02-17 11:10:40 -06:00
LarryWoestman
26e532bd10 CAM: converted the refactored* postprocessors to the new (more object-oriented) API (#19006)
* CAM:  converted the refactored* postprocessors to the new API

      with corresponding tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-02-10 10:37:57 -06:00
phaseloop
503e5dd091 CAM: Fix finishing pass (#17960)
* CAM: Fix finishing pass

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add finishing pass unit (by @baehr)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-27 18:03:43 +01:00
Lawrence Woestman
c16f04fdc8 CAM: Fixed script-style postprocessors getting the wrong __name__
Also added a test that the __name__ of the postprocessor is correct
2025-01-27 18:02:26 +01:00
CandL
65daa70c6b Addition of CAM postprocessor for the Masso controller (#18845)
* Mods to accommodate tool order in Gcode. Some controllers want T# M6 others want M6 T#. Masso wants T# M6.

Added file refactored_masso_g3_post.py (based on refactored_linuxcnc_post.py) and modified UtilsParse.py

* Added tests and additional comments

* Working on the testing framework

* Tried to make refactored linux and masso as compatable line by line to support fil diffing

* A space in the file name caused all sorts of grief ... Thanks Larry

* added files to , swapped tool order in testrefactored_masso

* Added note regarding how files are "clones" of one another

* Added space in comment line for consistent formatting.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Updated formatting and comments

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-27 17:41:18 +01:00
luzpaz
b0a29fde31 Fix various typos 2024-12-22 08:47:13 -05:00
LarryWoestman
c98b0eaa4a CAM: fixed A, B, and C axis handling; added relevant tests (#18103)
* CAM:  fixed A, B, and C axis handling; added relevant tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-13 10:55:47 -06:00
luzpaz
09be35359e Fix various typos
Found via `codespell -q 3 -L aci,addmin,ake,aline,alle,alledges,alocation,als,ang,anid,anormal,aply,apoints,ba,beginn,behaviour,bloaded,bottome,brushin,bu,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,documentin,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,findn,fle,freez,graphin,hist,iff,incrementin,indexin,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,itsel,kilometre,leadin,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,recurrance,renderin,rin,ro,rougly,sectionin,seperator,serie,shs,sinc,siz,som,strack,substraction,te,technic,thist,thru,tread,tru,ue,uint,unter,uptodate,vas,vertexes,vew,wallthickness,whitespaces -S "./.git,*.po,*.ts,*.pdf,./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,./src/Base/StackWalker.cpp,./build/doc/SourceDoc,./tools/build/WindowsInstaller/lang,./src/Mod/TechDraw/Templates/locale"`
2024-12-10 15:09:51 +01:00
lorenz
faa5711016 cam: remove imghdr import (#18081) 2024-12-06 11:27:36 -06:00
Dan Henderson
5cf757eae9 Path: Add G84/G74 Tapping Operation (#8069) 2024-12-06 11:21:49 -06:00
Jonas Bähr
dda53d6e67 CAM: Configure Helix via CutMode, not Direction (#14314)
To harmonize the various CAM operations, the helical drill shall also be
configured using the cut mode (Climb/Conventional) just like Pocket or
FaceMill.
This means, the path direction (CW/CCW) is now a hidden read-only output
property, calculated from the side (Inside/OutSide) and the here newly
introduced cut mode.
The spindle direction is not yet taken into account and is always assumed
to be "Forward".
The GUI strings are kept compatible with what RP#14364 introduced becasue
of the v1.0 release string freeze. They need revision once back on the
main branch.
2024-11-24 09:18:23 +01:00
Jonas Bähr
61d6492418 Revert "CAM: Rename CW/CCW to Climb/Conventional for consistency (#14364)"
This reverts commit 232bed5b44749b098d9f7599b717548243cc7bea and adapts
to the in between commits where necessary.
 - CAM: apply precommit eb53ed3cefb9444a4473bdd4c89116796ec94b4b
 - CAM: rename "Tests" to "CAMTests" 2ff4914fd8

Motivations for the revert:
 - Instead of actually implementing #14364 only a search and replace in
   the enums values has been performed. But this does not mean the
   feature is there, becasue "climb"/"conventional" milling depends not
   only on the path's direction, but also on the spindle direction and
   whether the milled feature is "inside" or "outside".
 - In half of the cases of every changed operation or dressup, depending
   on whether we mill "inside" or "outside", we now get the wrong results.
 - In the (rarer) case of a reversed spindle direction, the "other half"
   is wrong.
 - Files created with previous versions of FreeCAD cannot be recomputed
   any longer because there were no precautions on document restore.
 - In files created with previous versions of FreeCAD one cannot change
   the broken operation as the choices are now invalid.
 - The original search/replace was incomplete.
 - Only property values have been changed, the property names are still
   inconsistent ("Direction" vs "Cutting Mode").
 - The original search/replace also changed internal APIs where the
   "climb"/"conventional" wording is not applicable as there is no
   notation of "inside"/"outside" or "forward"/"reverse". If only the
   path's direction is concerned, "CW"/"CCW" fits better.
2024-11-24 09:18:23 +01:00
Jonas Bähr
a41f9dedfd CAM: Fix and enable TestPathHelix again
Since the fixture in use has holes smaller than the default tool dimeter,
executing a helix operation with default parameters (i.e. all holes)
used to fail with an exception. Some tests work around this by actively
chaning the tool diameter, and this fix is now moved into the global
setup where the respective fixture is loaded.

The reason why the tests got disabled in the first place is unclear.
2024-11-24 09:18:23 +01:00
Jonas Bähr
548325c503 CAM: Add tests loading a helical path created with v0.21
This demonstrates a regression introduced with PR #14364, where documents
containing helix operations cannot be recomputed any more (see #15643).
This is in preparation for a fix and to ensure we don't break it again.
The fixture has been created with the official mac build of FreeCAD-0.21.1
2024-11-24 09:18:23 +01:00
luzpaz
a633be7342 Fix various typos
Found via codespell.
2024-11-15 20:18:46 +01:00
Chris Mayo
cf8355ccb3 BIM,CAM: Resolve Python invalid escape sequence warnings 2024-11-05 17:18:50 -05:00
Adrian Insaurralde Avalos
06ba57b7ae CAM: rename "Tests" to "CAMTests" to avoid python name conflicts 2024-11-04 17:36:21 +01:00