View Issue Details

IDProjectCategoryView StatusLast Update
0002484PathBugpublic2017-02-15 18:48
Reportersliptonic Assigned Toyorik  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionreopened 
PlatformAllOSAllOS VersionAll
Target Version0.17Fixed in Version0.17 
Summary0002484: Empty Paths not correctly rendered
DescriptionIf a Path operation has all commands removed, it will continue to show the old backplot and cannot be cleared.

Steps To ReproduceThis affects all path types but is easy to reproduce by creating a path based on custom gcode.
1) start the path workbench.
2) click the path based on custom gcode
3) Edit the gcode text and put in a couple movement commands
   G0 X10 Y10
   G1 X15 Y15
4) Save the commands
5) refresh the document and see the backplot.
6) reedit the gcode and delete the commands.
7) refresh the document.
You will expect the backplot to disappear but it does not.
Only adding new commands will change the display.
Additional InformationThis wasn't a problem before because we never had paths with empty base objects. With the taskpanels I'm building to allow user to modify base without deleting the operation it is likely and confusing.

I've even tried replacing the commands with a comment command: (here is a comment) but this doesn't cause backplot to be re-rendered.
TagsNo tags attached.
FreeCAD Information

Activities

yorik

2016-03-30 14:58

administrator   ~0006936

this should be easy to fix

sliptonic

2016-11-03 22:45

manager   ~0007439

This issues still occurs related to compound (Job) view if there are no operations left active.

Easy to reproduce:
1) Create a job.
2) Create an operation (ie profile from face) so a path is displayed on the screen
3) Delete the operation or toggle it inactive.
4) The path backplot is still shown. If there are other active operations in the job, the backplot is redrawn but if not, the old one remains.

Kunda1

2017-01-16 08:14

administrator   ~0007808

Forum thread: http://forum.freecadweb.org/viewtopic.php?f=10&t=19938

Kunda1

2017-01-28 13:35

administrator   ~0008056

sliptonic writes in gitter.im
> ... It's more annoying than anything and the solution is in the C++ so I'm not qualified. Maybe @mlampert can take a look when his day gig lightens up a bit.

sliptonic

2017-02-15 15:54

manager   ~0008308

Last edited: 2017-02-15 15:56

Another clue I noticed about this:
If you've got a Path Compound that has a child that generates gcode but no moves (ie, maybe a couple commands with comments or tool changes but no g0/g1/g2/g3 moves, then it doesn't correctly update. The compound continues to show whatever moves it was showing before.

However, If the compound is truly empty, ie the Path has zero commands in it, then it updates correctly.

Here's a macro that shows the effect easily. After you run the macro, you'll still see the old backplot from the compound. But set the compound Path=emptypath and it clears:

import Path
snippet = '''p1 = Path.Path("G1X1")
o1 = App.ActiveDocument.addObject("Path::Feature","path1")
o1.Path=p1
p2 = Path.Path("G1Y1")
o2 = App.ActiveDocument.addObject("Path::Feature","path2")
o2.Path=p2

p3 = Path.Path('(empty comment)')
o3 = App.ActiveDocument.addObject("Path::Feature","nonmove")
o3.Path=p3

compound = App.ActiveDocument.addObject("Path::FeatureCompound","compound")
compound.Group=[o1,o2,o3]
emptypath = Path.Path()
App.ActiveDocument.recompute()
print(compound.Path.toGCode())
o1.Path = emptypath
o2.Path = emptypath
App.ActiveDocument.recompute()
print(compound.Path.toGCode())
'''
FreeCADGui.doCommand(snippet)

Related Changesets

FreeCAD: master 40b00e55

2016-10-01 00:35:26

yorik

Details Diff
Path: remove old dislay if path becomes empty - fixes 0002484 Affected Issues
0002484
mod - src/Mod/Path/Gui/ViewProviderPath.cpp Diff File

FreeCAD: master c1dad1bd

2017-02-15 17:40:25

yorik

Details Diff
Path: Fixed wrong display of non-displayable paths - fixes 0002484 Affected Issues
0002484
mod - src/Mod/Path/Gui/ViewProviderPath.cpp Diff File

Issue History

Date Modified Username Field Change
2016-03-30 00:55 sliptonic New Issue
2016-03-30 14:58 yorik Note Added: 0006936
2016-03-30 14:59 yorik Assigned To => yorik
2016-03-30 14:59 yorik Status new => assigned
2016-09-30 22:35 yorik Changeset attached => FreeCAD Master master 40b00e55
2016-09-30 22:35 yorik Status assigned => closed
2016-09-30 22:35 yorik Resolution open => fixed
2016-11-03 22:45 sliptonic Note Added: 0007439
2016-11-03 22:45 sliptonic Status closed => feedback
2016-11-03 22:45 sliptonic Resolution fixed => reopened
2017-01-16 08:14 Kunda1 Note Added: 0007808
2017-01-28 13:35 Kunda1 Note Added: 0008056
2017-02-15 15:54 sliptonic Note Added: 0008308
2017-02-15 15:54 sliptonic Status feedback => assigned
2017-02-15 15:54 sliptonic Note Edited: 0008308
2017-02-15 15:56 sliptonic Note Edited: 0008308
2017-02-15 17:40 yorik Changeset attached => FreeCAD Master master c1dad1bd
2017-02-15 17:40 yorik Status assigned => closed
2017-02-15 18:48 Kunda1 Fixed in Version => 0.17
2017-02-15 18:48 Kunda1 Target Version => 0.17