Commit Graph

1652 Commits

Author SHA1 Message Date
Russell Johnson
33a1804050 Path: Add icons to feature tabs
Add Base Geometry, Heights, Depths, and Operation icons on the tabs in the Tasks Window editor.
2020-06-18 15:54:14 -05:00
Russell Johnson
521b0e46c0 Path: Add operation's label to task panel window title 2020-06-18 01:39:26 -05:00
Russell Johnson
b110ea2818 Path: Cleanup and simplify code 2020-06-18 01:39:26 -05:00
Russell Johnson
939ac2e115 Path: Add ExpandProfile feature
Two new properties, `ExpandProfile` (length) and `ExpandProfileStepOver` (percent) added for new feature.
New feature converts the normal single offset profile into a compound profile containing multiple increasing/decreasing offsets.
The new feature clears a each layer completely before stepping down to the next layer.
Adjust sorting procedure in PathAreaOp due to `ExpandProfile` modifications to open edges code.
2020-06-18 01:39:26 -05:00
Russell Johnson
0f393e2095 Path: Add operation's label to task panel window title 2020-06-18 01:36:54 -05:00
Russell Johnson
0a91704949 Path: Fix error when selection includes vertical faces. 2020-06-18 01:36:54 -05:00
Russell Johnson
86a182c2b8 Path: Add opUpdateDepths() method as in 3D Surface 2020-06-18 01:36:54 -05:00
Russell Johnson
26d121de00 Path: Fix broken InternalFeaturesCut processing 2020-06-18 01:36:54 -05:00
Russell Johnson
1ef278b061 Path: Fix initial guess for FinalDepth with no Base Geometry 2020-06-18 01:36:54 -05: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
Russell Johnson
33d1d281ec Path: Convert SetupProperties() to dynamic code
This method will always synchronize with operation's class properties.
2020-06-16 02:01:30 -05:00
Russell Johnson
f4e522c95b Path: Initialize OCL_Tool class and implement in OCL-based operations
The purpose of this class is to properly translate both, Legacy and ToolBit, tools into OCL tool types where possible.
message fix
2020-06-16 02:01:30 -05:00
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