View Issue Details

IDProjectCategoryView StatusLast Update
0002796PartDesignBugpublic2017-04-26 11:40
ReportergizmotronAssigned Toickby 
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionopen 
PlatformOSLinux 64bitOS VersionArch
Product Version0.17 
Target VersionFixed in Version 
Summary0002796: nested hierarchy of parts generate copies in view
DescriptionIf you have nested hierarchies of parts (more than two deep), freecad draws copies of the included objects if the placement is different.

This bug is introduced after the git commit a50bd5d (I think with the introduction of Extensions).
Steps To Reproduce1. Add a part
2. add a part and drop it on the first part
3. add a part and drop it on the second part
4. add a body in the third part
5. add a sketch and make a pad
6. alter the placement of the second part
7. alter the placement of the first part

--> the body is drawn two times in the view
Additional InformationCopy of the python console:
================================================
Python 2.7.12 (default, Jun 28 2016, 08:31:05)
[GCC 6.1.1 20160602] on linux2
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> App.newDocument("Unbenannt")
>>> App.setActiveDocument("Unbenannt")
>>> App.ActiveDocument=App.getDocument("Unbenannt")
>>> Gui.ActiveDocument=Gui.getDocument("Unbenannt")
>>> App.activeDocument().Tip = App.activeDocument().addObject('App::Part','Part')
>>> App.activeDocument().Part.Label = 'Part'
>>> Gui.activeView().setActiveObject('part', App.activeDocument().Part)
>>> App.ActiveDocument.recompute()
>>> App.activeDocument().Tip = App.activeDocument().addObject('App::Part','Part001')
>>> App.activeDocument().Part001.Label = 'Part001'
>>> Gui.activeView().setActiveObject('part', App.activeDocument().Part001)
>>> App.ActiveDocument.recompute()
>>> App.getDocument("Unbenannt").getObject("Part").addObject(App.getDocument("Unbenannt").getObject("Part001"))
>>> App.activeDocument().Tip = App.activeDocument().addObject('App::Part','Part002')
>>> App.activeDocument().Part002.Label = 'Part002'
>>> Gui.activeView().setActiveObject('part', App.activeDocument().Part002)
>>> App.ActiveDocument.recompute()
>>> App.getDocument("Unbenannt").getObject("Part001").addObject(App.getDocument("Unbenannt").getObject("Part002"))
>>> App.activeDocument().addObject('PartDesign::Body','Body')
>>> import PartDesignGui
>>> Gui.activeView().setActiveObject('pdbody', App.activeDocument().Body)
>>> Gui.Selection.clearSelection()
>>> Gui.Selection.addSelection(App.ActiveDocument.Body)
>>> App.activeDocument().Part002.addObject(App.ActiveDocument.Body)
>>> App.ActiveDocument.recompute()
>>> Gui.getDocument('Unbenannt').ActiveView.setActiveObject('pdbody', None)
>>> Gui.getDocument('Unbenannt').ActiveView.setActiveObject('part', App.getDocument('Unbenannt').getObject('Part'))
>>> Gui.getDocument('Unbenannt').ActiveView.setActiveObject('pdbody', App.getDocument('Unbenannt').getObject('Body'))
>>> App.activeDocument().addObject('Sketcher::SketchObject','Sketch')
>>> App.activeDocument().Sketch.Support = (App.activeDocument().XY_Plane003, [''])
>>> App.activeDocument().Sketch.MapMode = 'FlatFace'
>>> App.ActiveDocument.recompute()
>>> App.activeDocument().Body.addFeature(App.activeDocument().Sketch)
>>> Gui.activeDocument().setEdit('Sketch')
>>> Gui.activateWorkbench('SketcherWorkbench')
>>> import PartDesignGui
>>> import Show.TempoVis
>>> ActiveSketch = App.ActiveDocument.getObject('Sketch')
>>> tv = Show.TempoVis(App.ActiveDocument)
>>> if ActiveSketch.ViewObject.HideDependent:
>>> tv.hide_all_dependent(ActiveSketch)
>>> if ActiveSketch.ViewObject.ShowSupport:
>>> tv.show([ref[0] for ref in ActiveSketch.Support])
>>> if ActiveSketch.ViewObject.ShowLinks:
>>> tv.show([ref[0] for ref in ActiveSketch.ExternalGeometry])
>>> tv.hide(ActiveSketch)
>>> ActiveSketch.ViewObject.TempoVis = tv
>>> del(tv)
>>>
>>> ActiveSketch = App.ActiveDocument.getObject('Sketch')
>>> if ActiveSketch.ViewObject.RestoreCamera:
>>> ActiveSketch.ViewObject.TempoVis.saveCamera()
>>>
>>> geoList = []
>>> geoList.append(Part.Line(App.Vector(0.000000,0.000000,0),App.Vector(59.634876,0.000000,0)))
>>> geoList.append(Part.Line(App.Vector(59.634876,0.000000,0),App.Vector(59.634876,124.489372,0)))
>>> geoList.append(Part.Line(App.Vector(59.634876,124.489372,0),App.Vector(0.000000,124.489372,0)))
>>> geoList.append(Part.Line(App.Vector(0.000000,124.489372,0),App.Vector(0.000000,0.000000,0)))
>>> App.ActiveDocument.Sketch.addGeometry(geoList,False)
>>> conList = []
>>> conList.append(Sketcher.Constraint('Coincident',0,2,1,1))
>>> conList.append(Sketcher.Constraint('Coincident',1,2,2,1))
>>> conList.append(Sketcher.Constraint('Coincident',2,2,3,1))
>>> conList.append(Sketcher.Constraint('Coincident',3,2,0,1))
>>> conList.append(Sketcher.Constraint('Horizontal',0))
>>> conList.append(Sketcher.Constraint('Horizontal',2))
>>> conList.append(Sketcher.Constraint('Vertical',1))
>>> conList.append(Sketcher.Constraint('Vertical',3))
>>> App.ActiveDocument.Sketch.addConstraint(conList)
>>>
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',0,1,-1,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceX',1,2,59.634876))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceY',1,2,124.489372))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.setDatum(9,App.Units.Quantity('60.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.setDatum(10,App.Units.Quantity('100.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> Gui.getDocument('Unbenannt').resetEdit()
>>> ActiveSketch = App.ActiveDocument.getObject('Sketch')
>>> tv = ActiveSketch.ViewObject.TempoVis
>>> if tv:
>>> tv.restore()
>>> ActiveSketch.ViewObject.TempoVis = None
>>> del(tv)
>>>
>>> Gui.activateWorkbench('PartDesignWorkbench')
>>> App.getDocument('Unbenannt').recompute()
>>> App.activeDocument().addObject("PartDesign::Pad","Pad")
>>> App.activeDocument().Pad.Profile = App.activeDocument().Sketch
>>> App.activeDocument().Pad.Length = 10.0
>>> App.ActiveDocument.recompute()
>>> Gui.activeDocument().hide("Sketch")
>>> App.activeDocument().Body.addFeature(App.activeDocument().Pad)
>>> App.ActiveDocument.recompute()
>>> Gui.activeDocument().setEdit('Pad', 0)
>>> Gui.Selection.clearSelection()
>>> Gui.ActiveDocument.Pad.ShapeColor=Gui.ActiveDocument.Body.ShapeColor
>>> Gui.ActiveDocument.Pad.LineColor=Gui.ActiveDocument.Body.LineColor
>>> Gui.ActiveDocument.Pad.PointColor=Gui.ActiveDocument.Body.PointColor
>>> Gui.activeDocument().hide("Sketch")
>>> App.ActiveDocument.Pad.Length = 10.000000
>>> App.ActiveDocument.Pad.Length2 = 100.000000
>>> App.ActiveDocument.Pad.Type = 0
>>> App.ActiveDocument.Pad.UpToFace = None
>>> App.ActiveDocument.Pad.Reversed = 0
>>> App.ActiveDocument.Pad.Midplane = 0
>>> App.ActiveDocument.Pad.Offset = 0.000000
>>> App.ActiveDocument.recompute()
>>> Gui.activeDocument().resetEdit()
>>> FreeCAD.getDocument("Unbenannt").getObject("Part").Placement = App.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(0,0,1),9))
>>> FreeCAD.getDocument("Unbenannt").getObject("Part").Placement = App.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(0,0,1),90))
>>> FreeCAD.getDocument("Unbenannt").getObject("Part001").Placement = App.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(0,0,1),9))
>>> FreeCAD.getDocument("Unbenannt").getObject("Part001").Placement = App.Placement(App.Vector(0,0,0),App.Rotation(App.Vector(0,0,1),90))
>>> Gui.getDocument('Unbenannt').ActiveView.setActiveObject('part', App.getDocument('Unbenannt').getObject('Part002'))
>>> Gui.SendMsgToActiveView("Save")
>>> App.getDocument("Unbenannt").saveAs(u"/home/christian/Desktop/git/plasmatisch.git/Mechanik/bug-test.fcstd")
>>>
================================================

Copy of the console:

================================================
Run Gui init script
Init: Running FreeCADGuiInit.py start script...
Init: Searching modules...
Init: Initializing /usr/Mod/Sketcher... done
Init: Initializing /usr/Mod/Fem... done
Init: Initializing /usr/Mod/MeshPart... done
Init: Initializing /usr/Mod/Web... done
Init: Initializing /usr/Mod/Spreadsheet... done
Init: Initializing /usr/Mod/Material... done
Init: Initializing /usr/Mod/Show(InitGui.py not found)... ignore
Init: Initializing /usr/Mod/Robot... done
Init: Initializing /usr/Mod/Mesh... done
Init: Initializing /usr/Mod/PartDesign... done
Init: Initializing /usr/Mod/Start... done
Init: Initializing /usr/Mod/Part... done
Init: Initializing /usr/Mod/Draft... done
Init: Initializing /usr/Mod/TechDraw... done
Init: Initializing /usr/Mod/Path... done
Init: Initializing /usr/Mod/Test... done
Init: Initializing /usr/Mod/Import... done
Init: Initializing /usr/Mod/Idf(InitGui.py not found)... ignore
Init: Initializing /usr/Mod/Measure(InitGui.py not found)... ignore
Init: Loading FreeCAD GUI
Init: Running FreeCADGuiInit.py start script... done
Init: Activating default workbench StartWorkbench
Module: Part
Loading Part module... done
Loading Sketcher module... done
Loading GUI of Part module... done
Loading GUI of Sketcher module... done
Loading GUI of PartDesign module... done
Loading PartDesign module... done
Init: Showing main window
Main window restored
Show main window
Toolbars restored
Connected to spacenav daemon
Init: Entering event loop
Init: Processing command line files
Unhandled std::exception caught in GUIApplication::notify.
The error message is: Keine Berechtigung
The event type 43 was sent to Gui::MainWindow
Object tree:
    Gui::MainWindowSketcher::setUpSketch()-T:0
Sketcher::Solve()-DogLeg-T:0
Sketcher::setUpSketch()-T:0
Sketcher::Solve()-BFGS-T:0
EigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 16, Constr: 14, Rank: 14
Sketcher::setUpSketch()-T:0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
Sketcher::Solve()-BFGS-T:0
EigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 16, Constr: 14, Rank: 14
Sketcher::setUpSketch()-T:0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
Sketcher::Solve()-BFGS-T:0
EigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 16, Constr: 15, Rank: 15
Sketcher::setUpSketch()-T:0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
Sketcher::Solve()-BFGS-T:0
EigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 16, Constr: 16, Rank: 16
Sketcher::setUpSketch()-T:0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
Sketcher::Solve()-BFGS-T:0
EigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 16, Constr: 16, Rank: 16
Sketcher::setUpSketch()-T:0.001
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
Sketcher::Solve()-BFGS-T:0
EigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 16, Constr: 16, Rank: 16
Sketcher::setUpSketch()-T:0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0.365124
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
Sketcher::Solve()-BFGS-T:0.001
EigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 16, Constr: 16, Rank: 16
Sketcher::setUpSketch()-T:0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
Sketcher::Solve()-BFGS-T:0
EigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 16, Constr: 16, Rank: 16
Sketcher::setUpSketch()-T:0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 24.4894
Sketcher::Solve()-BFGS-T:0
EigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 16, Constr: 16, Rank: 16
Sketcher::setUpSketch()-T:0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
BFGS: convergence: 1e-10, xsize: 1, maxIter: 100
BFGS Converged!!: , err: 0, h_norm: 0
Sketcher::Solve()-BFGS-T:0
================================================
TagsNo tags attached.

Activities

2016-11-27 11:45gizmotronNew Issue
2016-11-27 11:45gizmotronFile Added: bug-test.fcstd

gizmotron

2016-11-27 11:45

reporter  

bug-test.fcstd (13,432 bytes)

gizmotron

2016-11-27 12:42

reporter   ~0007492

OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9067 (Git)
Build type: Unknown
Branch: master
Hash: debc35f4ae111805b8744eca77ed0e869c81303a
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 7.0.0
2016-11-29 14:15ickbyAssigned To => ickby
2016-11-29 14:15ickbyStatusnew => assigned

gizmotron

2017-01-29 19:58

reporter   ~0008092

Can someone make this bug public? I accidentaly selected "private".

Kunda1

2017-01-29 21:41

manager   ~0008094

> Can someone make this bug public? I accidentaly selected "private".
Done
2017-01-29 21:41Kunda1View Statusprivate => public
2017-01-30 01:10Kunda1Summarynested hirarchy of parts generate copies in view => nested hierarchy of parts generate copies in view
2017-01-30 01:10Kunda1Description UpdatedView Revisions

poserge

2017-04-02 00:23

reporter   ~0008745

I can't reproduce this bug

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10672 (Git)
Build type: Debug
Branch: master
Hash: 1bde45172ea49a618299dd9003784d5c69fc3ff9
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0

Kunda1

2017-04-26 11:37

manager   ~0008774

@NormandC wrote:
I can't reproduce it either on

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10807 (Git)
Build type: None
Branch: master
Hash: b32e9806e1b075c745c0c9692e81aea1dcab81e4
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0

Drag&drop makes a mess of the PartOrigin objects in the tree but that's another issue...

Kunda1

2017-04-26 11:40

manager   ~0008775

@chrisb can you weigh in on this bug?
@NormandC is there a bug open for Drag&Drop PartOrigin bug ?

Issue History

Date Modified Username Field Change
2016-11-27 11:45 gizmotron New Issue
2016-11-27 11:45 gizmotron File Added: bug-test.fcstd
2016-11-27 12:42 gizmotron Note Added: 0007492
2016-11-29 14:15 ickby Assigned To => ickby
2016-11-29 14:15 ickby Status new => assigned
2017-01-29 19:58 gizmotron Note Added: 0008092
2017-01-29 21:41 Kunda1 Note Added: 0008094
2017-01-29 21:41 Kunda1 View Status private => public
2017-01-30 01:10 Kunda1 Summary nested hirarchy of parts generate copies in view => nested hierarchy of parts generate copies in view
2017-01-30 01:10 Kunda1 Description Updated View Revisions
2017-04-02 00:23 poserge Note Added: 0008745
2017-04-26 11:37 Kunda1 Note Added: 0008774
2017-04-26 11:40 Kunda1 Note Added: 0008775