Commit Graph

1587 Commits

Author SHA1 Message Date
Russell Johnson
27482c7eb0 Path: Fix initial guess for FinalDepth with no Base Geometry 2020-06-18 01:36:54 -05:00
luz.paz
29cba68da9 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
Gabriel Wicke
191e5532a8 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
ef223fc71c 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
72524e9056 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
1d2b2f20f0 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
452f1d6d9d Path: Add opUpdateDepths() method to fix FinalDepth guess 2020-06-05 00:11:43 -05:00
Russell Johnson
3c87e48b3b 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
c53435cc91 Path: Fix vertical face handling; Correct if ... is not False usage 2020-06-04 20:40:26 -05:00
sliptonic
e3b985e900 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
d231382f02 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
fcd934b498 Path: PathOpGui - Fix Base Geometry import feature
for pre-existing operations
2020-06-04 10:54:43 -05:00
Russell Johnson
1d18ad5e0a Path: Fix for single selected non-planar face 2020-06-04 00:03:31 -05:00
Russell Johnson
c8f654e7a1 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
c7222a51a7 Path: Fix duplication of gcode for Single-pass layer mode.. 2020-06-03 20:13:39 -05:00
Russell Johnson
4b9b1e3c76 Path: Clean up messaging and add translation() usage 2020-06-03 19:00:59 -05:00
Russell Johnson
2fe53c58bf Path: Fix failure to create model STL when selecting faces 2020-06-03 19:00:36 -05:00
Russell Johnson
7ba218f417 Path: Fix paths through model
All cut patterns except Offset were cutting through model.
2020-06-03 18:59:46 -05:00
Russell Johnson
d94ae6e813 Path: Simplify creation of debug objects
Path: Improve debug messages
2020-06-03 18:59:46 -05:00
Russell Johnson
7fd047a9be Path: Make missing connections between UI panel and operation 2020-06-03 18:59:46 -05:00
Russell Johnson
3e83b1d8e5 Path: Add missing cut patterns and organize the enumeration lists 2020-06-03 18:59:46 -05:00
sliptonic
ddc7f43934 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
29b136815f 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
e9f511e4e6 Path: Fix reference to label in UI panel 2020-06-02 19:59:27 -05:00
Russell Johnson
cf26f7bb4c 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
29b77b2857 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
3436a8be93 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
86cd9f2124 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
2a2182e4d1 Merge pull request #3496 from gwicke/transition_fixes
Path: Fix step transition optimizations
2020-05-31 09:47:52 -05:00
Russell Johnson
dd1e731abc 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
0ed96d6a0f Path: Extend ClearEdges to Perimeter boundary usage. 2020-05-30 20:56:00 -05:00
Russell Johnson
2f1b44997d Path: Code cleanup
Fix `If ... is True:` clauses.
Remove unnecessary doc variables.
2020-05-30 20:56:00 -05:00
Russell Johnson
9ee49e389f Path: Add missing Setup() properties; Visual organization 2020-05-30 20:56:00 -05:00
Russell Johnson
171b780202 Path: Add missing CoolantMode input to GUI 2020-05-25 18:50:32 -05:00
sliptonic
e56c4acb69 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
d688b978e3 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
73682ebf49 Merge pull request #3500 from dubstar-04/feature/setOrigin
[Path] - Feature/Origin Selection
2020-05-25 12:32:57 -05:00
Daniel Wood
40cdf68491 only reset the Op visibility when the active state is toggled 2020-05-24 07:48:55 +01:00
Gabriel Wicke
1f22269be0 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
ccadfd1673 Enable the selection of circles, arcs and faces to set the job origin 2020-05-23 16:30:55 +01:00
Russell Johnson
00c1038ffd 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
3a04e06cfa 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
e8c9483201 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
691c3900c1 Path: LGTM cleanup and PEP8 2020-05-21 23:24:17 -05:00
Russell Johnson
374df7838a Path: Relocate common 3D Surface and Waterline methods to support module 2020-05-21 23:24:17 -05:00
Russell Johnson
64d1a21b24 Path: Use lazyloader for importing some modules 2020-05-21 23:24:17 -05:00
Russell Johnson
c9782a3b69 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
Russell Johnson
52e0b04cbf Path: new FindUnifiedRegions class
Improve `HandleMultipleFeatures` processing when set to `Collectively` by implementing new class to refine the processing area, attempting to remove common edges between connected face regions.
2020-05-21 23:24:17 -05:00
Russell Johnson
edda808c3c Path: Improve open-edges, messaging, Final Depth initial guess and more
Open-edges will now work in simple cases where user selects bottom edge, without requiring adjustment to Final Depth.  This will speed up procedural usage of the operation for open edges by re-enabling the `select-edge_create_OK` work flow.
The guessing procedure for Final Depth based on Base Geometry selected is fixed in `UpdateDepths()` method.
Improvements to user messages.
Remove unnecessary code and comments.
Improve debugging feedback.
2020-05-21 22:44:50 -05:00
sliptonic
cb6c6705ac Merge pull request #3477 from gwicke/pathops_ui_fix
[path] Small fix in PathOpGui
2020-05-18 09:44:21 -05:00