View Issue Details

IDProjectCategoryView StatusLast Update
0003571Part[FreeCAD] Bugpublic2019-02-21 15:27
ReporterJLienard Assigned Towmayer  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version[FreeCAD] 0.17 
Target VersionFixed in Version[FreeCAD] 0.18 
Summary0003571: Offset3D of volumes intersection is not solid
Description-Intersection of two cubes
-Offset3D of the result
-Union of the result with another cube = > error "Performing union on non-solids is not possible"

Steps To Reproduceexecute the code of the attached file, then make union of "Offset" and "Cube002"
Additional InformationOS: Ubuntu 16.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
TagsNo tags attached.
FreeCAD Information

Relationships

related to 0003703 closedwmayer Part->3D-Offset should warn if resulting object is not a solid 

Activities

JLienard

2018-08-30 15:13

reporter  

bug0ffset3D.py (2,007 bytes)
App.newDocument("Unnamed")
App.setActiveDocument("Unnamed")
App.ActiveDocument=App.getDocument("Unnamed")
Gui.ActiveDocument=Gui.getDocument("Unnamed")
App.ActiveDocument.addObject("Part::Box","Box")
App.ActiveDocument.ActiveObject.Label = "Cube"
App.ActiveDocument.recompute()
Gui.SendMsgToActiveView("ViewFit")
App.ActiveDocument.addObject("Part::Box","Box")
App.ActiveDocument.ActiveObject.Label = "Cube"
App.ActiveDocument.recompute()
Gui.SendMsgToActiveView("ViewFit")
App.getDocument("Unnamed").Box001.Placement=App.Placement(App.Vector(-3,0,0), App.Rotation(App.Vector(0,0,1),0), App.Vector(0,0,0))
App.activeDocument().addObject("Part::Common","Common")
App.activeDocument().Common.Base = App.activeDocument().Box
App.activeDocument().Common.Tool = App.activeDocument().Box001
Gui.activeDocument().hide("Box")
Gui.activeDocument().hide("Box001")
Gui.ActiveDocument.Common.ShapeColor=Gui.ActiveDocument.Box.ShapeColor
Gui.ActiveDocument.Common.DisplayMode=Gui.ActiveDocument.Box.DisplayMode
App.ActiveDocument.addObject("Part::Box","Box")
App.ActiveDocument.ActiveObject.Label = "Cube"
App.ActiveDocument.recompute()
Gui.SendMsgToActiveView("ViewFit")
App.ActiveDocument.addObject("Part::Offset","Offset")
App.ActiveDocument.Offset.Source = App.ActiveDocument.Common
App.ActiveDocument.Offset.Value = 1.0
App.ActiveDocument.recompute()
Gui.ActiveDocument.Common.DisplayMode = 'Wireframe'
Gui.ActiveDocument.setEdit('Offset')
from FreeCAD import Base
import Part
Gui.ActiveDocument.Offset.ShapeColor=Gui.ActiveDocument.Common.ShapeColor
Gui.ActiveDocument.Offset.LineColor=Gui.ActiveDocument.Common.LineColor
Gui.ActiveDocument.Offset.PointColor=Gui.ActiveDocument.Common.PointColor
App.ActiveDocument.Offset.Value = 1.000000
App.ActiveDocument.Offset.Value = 1.000000
App.ActiveDocument.Offset.Mode = 0
App.ActiveDocument.Offset.Join = 0
App.ActiveDocument.Offset.Intersection = False
App.ActiveDocument.Offset.SelfIntersection = False
App.ActiveDocument.recompute()
Gui.ActiveDocument.resetEdit()


bug0ffset3D.py (2,007 bytes)

Kunda1

2018-08-31 06:43

administrator   ~0011673

@JLienard Can you please test this on 0.18dev

JLienard

2018-08-31 07:12

reporter   ~0011674

The bug remains on :
OS: Ubuntu 16.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14495 (Git) AppImage
Build type: None
Branch: master
Hash: c717d1121d888fe6cfbd8971b5f59311a34b37bc
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)

Kunda1

2018-08-31 07:52

administrator   ~0011675

@JLienard Thank you. Please open a forum thread in https://forum.freecadweb.org/viewforum.php?f=3 to discuss the issue with the community (as per our bug submission guidelines)
Please post the link to said forum thread in the ticket for future reference.

normandc

2018-09-02 19:35

manager   ~0011683

The produced Offset is not a solid, it's a shell. Not sure why. This is not the place to ask, the forum is more suited, but your script shows an extremely convoluted method to get a shape. Why couldn't you create a box right from the start? Offsetting a cube produces a valid solid. Is this some simplification of a use case?

normandc

2018-09-02 19:42

manager  

Part_Offset3D_from_Common.fcstd (19,321 bytes)

normandc

2018-09-02 19:42

manager   ~0011684

It appears that Offset3D based on a shape resulting from a Part Common operation does not create a solid, but a shell. Here is a more proper file that shows the issue, with two cubes that share no co-planar faces (something that should be avoided as much as possible when applying Boolean operations).

normandc

2018-09-02 19:48

manager   ~0011685

Actually, any Offset3D applied to a solid resulting from a Part Boolean operation (fuse, cut, common) will produce a shell rather than a solid. This is possibly only an oversight. Offsetting a PartDesign Body comprising of a pad and a pocket produces a solid.

Chris_G

2018-09-30 16:56

developer   ~0011879

The solid that results from Common operation is encapsulated into a compound.
If I apply the Offset directly on the solid, the result IS a valid solid.
So, this "Compound encapsulation" may explain the bug.

wmayer

2018-09-30 20:41

administrator   ~0011880

https://github.com/FreeCAD/FreeCAD/commit/c3a8348861372b055c2446a09f0fc49a6cd7a2ef

Issue History

Date Modified Username Field Change
2018-08-30 15:13 JLienard New Issue
2018-08-30 15:13 JLienard Tag Attached: py
2018-08-30 15:13 JLienard File Added: bug0ffset3D.py
2018-08-31 06:43 Kunda1 Status new => feedback
2018-08-31 06:43 Kunda1 Note Added: 0011673
2018-08-31 07:12 JLienard Note Added: 0011674
2018-08-31 07:12 JLienard Status feedback => new
2018-08-31 07:52 Kunda1 Status new => feedback
2018-08-31 07:52 Kunda1 Note Added: 0011675
2018-09-02 19:35 normandc Note Added: 0011683
2018-09-02 19:42 normandc File Added: Part_Offset3D_from_Common.fcstd
2018-09-02 19:42 normandc Note Added: 0011684
2018-09-02 19:48 normandc Note Added: 0011685
2018-09-30 16:56 Chris_G Note Added: 0011879
2018-09-30 20:41 wmayer Assigned To => wmayer
2018-09-30 20:41 wmayer Status feedback => closed
2018-09-30 20:41 wmayer Resolution open => fixed
2018-09-30 20:41 wmayer Fixed in Version => 0.18
2018-09-30 20:41 wmayer Note Added: 0011880
2019-01-13 11:12 Kunda1 Tag Detached: py
2019-02-21 15:27 wmayer Relationship added related to 0003703