Commit Graph

1690 Commits

Author SHA1 Message Date
Russell Johnson
81fdb6483a Path: Fix available inputs for engraver tool type 2020-06-16 02:01:30 -05:00
Russell Johnson
31ae323e73 Path: Add ShapeName property to ToolBit objects
The new `ShapeName` is the name of the FreeCAD shape file containing the 3D body of the cutter.
We might want to change the source of the `ShapeName` to the name of the first Body object in the shape file, rather than the name of the file itself.
2020-06-16 02:01:30 -05:00
luz.paz
720b0b96d0 Fix typos [skip ci]
Found via codespell v1.18.0.dev0  
```
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-06-15 10:11:22 +02:00
sliptonic
df2884f810 [PATH] make -custom- op compliant. Improve gcode_pre importer 2020-06-10 16:49:46 -05:00
GeneGH
5162f146d6 Path Simulator - Recognition of canned cycle cancellation
The Path Simulator was designed to handle canned cycle drilling operations, G81, G82, and G83, but it expects the industry standard continuous uninterrupted set of G8x commands until the operation is completed. A recent change to the Path Drilling operation adds commands that cancel each G8x command immediately after that command is used. This confuses the Path Simulation function and leads to visual artifacts when the simulation is performed.

G-code standards say that canned cycle cancellation can be accomplished by a specific G80 command or by any motion command in the set G0, G1, G2, or G3. This PR modifies PathSimulationGui.py to add recognition for canned cycle cancellation and resets the simulator to treat the next G8x command as the first element of a new series of canned cycles operations rather than a continuation of the previous series.
2020-06-10 13:51:09 -04:00
Gabriel Wicke
7c654878d0 Path: Fix for optimizeLinearSegments
Reduce cumulative error by holding onto the original point in a sequence
of linear optimizations. In testing, this fixes artifacts I have seen on
very finely sampled paths with very gradual curvature.

Further improvements are needed for this optimization, but at least this
change avoids a regression over the status quo.
2020-06-07 15:59:51 -07:00
Gabriel Wicke
0c69eebda4 Path: Use _optimizeLinearSegments utility in _planarSinglePassProcess
Slightly clean up the code by separating linear segment optimization
from gcode generation. While the current optimization is not very
effective once there is any kind of meshing noise, having a single
method performing the optimization will make it easier to tweak
tolerances or strategies.
2020-06-05 18:21:24 -07:00
Gabriel Wicke
84113fbd17 Path: More ambitious step-over and break optimizations
Extend the work from #3496 to allow the safe optimization of more
complex step transitions.

- Use the actual safePDC path for short step transitions and breaks,
  currently up to 2 cutter diameters. This value is chosen to cover
  basically all typical end step-overs, including those with heavy skew.
  Extending this much further (up to the break even point for a retract &
  rapid) will need some careful thinking for multi pass paths.
- Coordinate offset tolerances with per-operation tessellation
  tolerances, to avoid tessellation artifacts messing up paths by
  causing false retracts.  Such retracts can cause entire steps near
  vertical areas to be falsely skipped, which would cause a major
  deviation from the target model.  By considering per-job tolerances, we
  allow users to safely save computational resources by computing roughing
  operations with lower precision, or selectively increase precision for
  finish passes.
- Refine the default tessellation tolerance to GeometryTolerance / 4.
  This makes sure that the job GeometryTolerance is respected by
  operation defaults.
2020-06-05 18:21:24 -07:00
sliptonic
db74aa8cef Merge pull request #3561 from Russ4262/Profile_fixes
[Path] Profile: Fix `_makeIntersectionTags()` for very short edges
2020-06-05 09:09:48 -05:00
Russell Johnson
16a65cc720 Path: Add opUpdateDepths() method to fix FinalDepth guess 2020-06-05 00:11:43 -05:00
Russell Johnson
e78c1e6646 Path: Improve FindUnifiedRegion class
Improvements now identify cases where selected faces create a closed loop that creates an internal closed wire to not be processed.
Remove unnecessary comments.
Add debug statements.
2020-06-05 00:11:43 -05:00
Russell Johnson
a167f2229b Path: Fix vertical face handling; Correct if ... is not False usage 2020-06-04 20:40:26 -05:00
sliptonic
aac84ddf0f Merge pull request #3560 from Russ4262/Import_Base_Geometry_fix
Path: PathOpGui - Fix Base Geometry import feature
2020-06-04 13:17:28 -05:00
Russell Johnson
fabe64cbcd Path: Fix _makeIntersectionTags() for very short edges
The 0.25 constant used might need to be modified later.  Or, the entire `_makeIntersectionTags()` method might need to be improved if other micro-edge use cases cause failure.
2020-06-04 13:15:10 -05:00
Russell Johnson
08e3f0b0d7 Path: PathOpGui - Fix Base Geometry import feature
for pre-existing operations
2020-06-04 10:54:43 -05:00
Russell Johnson
c82dc128c3 Path: Fix for single selected non-planar face 2020-06-04 00:03:31 -05:00
Russell Johnson
0f4bb388bb Path: Fix error with multi-language usage of QComboBox inputs
The methods here might need to be applied throughout PathWB to allow language translations of GUI combobox inputs.
2020-06-03 21:24:18 -05:00
Russell Johnson
155f83baa7 Path: Fix duplication of gcode for Single-pass layer mode.. 2020-06-03 20:13:39 -05:00
Russell Johnson
9ca855476b Path: Clean up messaging and add translation() usage 2020-06-03 19:00:59 -05:00
Russell Johnson
4e139d5a1e Path: Fix failure to create model STL when selecting faces 2020-06-03 19:00:36 -05:00
Russell Johnson
1d35573917 Path: Fix paths through model
All cut patterns except Offset were cutting through model.
2020-06-03 18:59:46 -05:00
Russell Johnson
bebdf2d006 Path: Simplify creation of debug objects
Path: Improve debug messages
2020-06-03 18:59:46 -05:00
Russell Johnson
523089befa Path: Make missing connections between UI panel and operation 2020-06-03 18:59:46 -05:00
Russell Johnson
a1d7cffaee Path: Add missing cut patterns and organize the enumeration lists 2020-06-03 18:59:46 -05:00
sliptonic
9a8ed3b036 Merge pull request #3501 from gwicke/mesh_deflections
Path: Respect meshing tolerance settings for 3d surfaces
2020-06-03 15:46:08 -05:00
Gabriel Wicke
1acaa5eadf Path: Respect meshing tolerance settings for 3d surfaces
Meshing tolerance settings for 3d surface operations were ignored since
switching to directly using facets from the view tesselation. On complex
3d shapes, this could cause serious meshing artifacts in the generated
paths, serious enough to show up even in path previews.

Additionally, there were occasionally segfaults when a model was not
viewed and thus implicitly tessellated before starting an OCL operation.

This patch switches from using view tessellations to explicitly calling
`tessellate()`. While this is usually more expensive than using the
existing view tessellation, recent changes to parallelize tessellation
have reduced this additional cost significantly.

Note that this diff only restores the use of LinearDeflection, since
that is the main thing we care about in OCL use cases. Angular
deflection is still ignored, but I think this is a good thing for this
case since a highly refined mesh in tiny but heavily curved areas below
the linear deflection threshold just adds unnecessary cost. If there is
agreement on this point, then we can remove the preference for
AngularDeflection from the UI in a follow-up.
2020-06-02 20:54:20 -07:00
Russell Johnson
f50dc12939 Path: Fix reference to label in UI panel 2020-06-02 19:59:27 -05:00
Russell Johnson
254c03c29f Path: New feature - import base geometry from existing operations in Job
This feature allows the user to import base geometry from an existing operation in the same Job.  The imported geometry is still passed through the shape type filter as if it were manually selected in the viewport.
Path: Post-test updates
2020-06-01 11:18:22 -05:00
sliptonic
396de0868d Merge pull request #3534 from Russ4262/MillFace_Improvement
Path: MillFace - Add `Face Region` method to boundary shape options
2020-05-31 12:48:28 -05:00
sliptonic
bd58309cc3 Merge pull request #3512 from Russ4262/Waterline_coolant
Path: Waterline - Add missing `CoolantMode` input to GUI
2020-05-31 12:47:30 -05:00
Gabriel Wicke
cc84287515 Path: Opt into automatic git newline normalization
Avoid spurious diffs from inadvertent newline changes by letting git
normalize newlines in the path module as well, just as a list of other
modules including Draft already do.

This effectively standardizes all checked-in code to Unix newlines, but
checkouts might use CRLF if that is the user preference.
2020-05-31 08:33:29 -07:00
sliptonic
58b86ad9f8 Merge pull request #3496 from gwicke/transition_fixes
Path: Fix step transition optimizations
2020-05-31 09:47:52 -05:00
Russell Johnson
b77991018b Path: Add new Face Region boundary option.
New option allows access to previously inaccessible faces.
Corrected property label names in UI panel, and added `Face Region` option to boundary shape list.
2020-05-30 20:56:00 -05:00
Russell Johnson
4cd5191073 Path: Extend ClearEdges to Perimeter boundary usage. 2020-05-30 20:56:00 -05:00
Russell Johnson
024d23bf31 Path: Code cleanup
Fix `If ... is True:` clauses.
Remove unnecessary doc variables.
2020-05-30 20:56:00 -05:00
Russell Johnson
3b5d2d2e7f Path: Add missing Setup() properties; Visual organization 2020-05-30 20:56:00 -05:00
Russell Johnson
a337653d2b Path: Add missing CoolantMode input to GUI 2020-05-25 18:50:32 -05:00
sliptonic
30dcafc590 Merge pull request #3461 from Russ4262/3D_Surface_updates
Path:  3D Surface and Waterline updates and fixes.
2020-05-25 18:16:31 -05:00
sliptonic
388bfbdc81 Merge pull request #3502 from dubstar-04/fixes/op-visibility
[Path] - Don't reset the operations visibility state during document recompute
2020-05-25 12:33:23 -05:00
sliptonic
f1354fe01f Merge pull request #3500 from dubstar-04/feature/setOrigin
[Path] - Feature/Origin Selection
2020-05-25 12:32:57 -05:00
Daniel Wood
760685e2c7 only reset the Op visibility when the active state is toggled 2020-05-24 07:48:55 +01:00
Gabriel Wicke
4a87209cb5 Path: Safer step over optimization
- Only apply aggressive optimizations to short horizontal moves within
  cutter diameter. The safe model STL does not accurately reflect stock
  state, so using it for determining long distance move safe heights is
  not safe. There would be a high chance of hitting the stock at rapid
  speeds.

  Thankfully, the vast majority of step-overs tend to be short, so are
  still optimized.
- For short moves, only allow completely lift-free transitions when
  there is (almost) no Z change, and the min safe travel height does not
  rise above the same level.
  Otherwise, lift to the max of end points and min safe travel height
  first, then move horizontally. A future optimization would be to
  directly use the drop scan for transition path generation.
2020-05-23 20:18:37 -07:00
Daniel Wood
cd97f871a7 Enable the selection of circles, arcs and faces to set the job origin 2020-05-23 16:30:55 +01:00
Russell Johnson
786d96ae60 Path: Expose property creation process to user access; Code cleanup
Path: EOL syncs with source

PathSurface and PathWaterline modules have incorrect, Windows, line endings and need to be converted to Unix style.
2020-05-21 23:24:17 -05:00
Russell Johnson
8f9cae4a77 Path: Update for inter-panel visibility updates
Also, clear`singleStep` and `value` properties for `StepOver` spinBox in UI panel.
2020-05-21 23:24:17 -05:00
Russell Johnson
88661c1b92 Path: Add ProfileEdges and AvoidLastX_Faces inputs to GUI
Path: Set min & max values for `StepOver`
2020-05-21 23:24:17 -05:00
Russell Johnson
49853d5484 Path: LGTM cleanup and PEP8 2020-05-21 23:24:17 -05:00
Russell Johnson
562b834f54 Path: Relocate common 3D Surface and Waterline methods to support module 2020-05-21 23:24:17 -05:00
Russell Johnson
090fe69627 Path: Use lazyloader for importing some modules 2020-05-21 23:24:17 -05:00
Russell Johnson
a9ee9af710 Path: Improvements to user messages
Remove some messages.
Implement FreeCAD.Console.Print___() in place of PathLog.___().
Path: fixes
2020-05-21 23:24:17 -05:00