View Issue Details

IDProjectCategoryView StatusLast Update
0004301DraftBugpublic2020-04-04 10:56
Reporterclifcox Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version0.19 
Summary0004301: Draft Pattern problem
DescriptionGreetings,
There seems to be a regression here between 0.18 (where it works) and 0.19 (where it doesn't). I was following the the draft WB tutorial in the manual when I noticed the problem. Here is the forum discussion:

https://forum.freecadweb.org/viewtopic.php?f=22&t=17628&start=20
Steps To ReproduceWhen I run the example code:


import Draft
pl = FreeCAD.Placement()
pl.Rotation.Q = (0.0,0.0,0.0,1.0)
pl.Base = FreeCAD.Vector(-3.46933150291,0.713757812977,0.0)
rect = Draft.makeRectangle(length=4.00172472,height=-1.73174029589,placement=pl,face=True,support=None)
rect.MakeFace = True
App.ActiveDocument.recompute()
rect.ViewObject.Pattern = "simple"

I do get the rectangle filled with the simple pattern in 0.18. If I save that file and try to view it in 0.19 I only get a solid grey filled one, no matter what pattern I try. If I then delete that one and run the python script again (in 0.19), I just get a plain empty rectangle, though the relevant properties are set correctly.
Additional InformationThe error message seems to come from Coin (pivy), as if the necessary method "removeChild" was removed in a new version of Coin. Or maybe Draft's code was changed.


Traceback (most recent call last):
  File "/opt/freecad-build-debug-vocx/Mod/Draft/Draft.py", line 3240, in onChanged
    r.removeChild(self.texture)
  File "/usr/lib/python3/dist-packages/pivy/coin.py", line 4746, in __getattr__
    raise e
  File "/usr/lib/python3/dist-packages/pivy/coin.py", line 4738, in __getattr__
    return SoBase.__getattribute__(self, name)
<class 'AttributeError'>: 'SoPolygonOffset' object has no attribute 'removeChild'
Tags#pending-forum
FreeCAD InformationOS: Debian GNU/Linux 10 (buster)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.
Build type: Release
Python version: 2.7.16rc1
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: C/Default (C)

AND:

OS: Debian GNU/Linux 10 (buster) (MATE/lightdm-xsession)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20325 (Git)
Build type: Release
Branch: master
Hash: 7c9d5fe57c94eeec0289317e6be8a99bdceea11f
Python version: 3.7.3
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: C/Default (C)

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-04-03 17:11 clifcox New Issue
2020-04-04 10:56 Kunda1 Tag Attached: #pending-forum