Categories:
-
3d 96 articles
-
animations 16 articles
-
architecture 47 articles
-
blender 98 articles
-
bédé 19 articles
-
techdrawing 24 articles
-
freecad 190 articles
-
gaming 1 articles
-
idsampa 8 articles
-
inthepress 8 articles
-
linux 57 articles
-
music 1 articles
-
nativeifc 31 articles
-
opensource 267 articles
-
orange 4 articles
-
photo 16 articles
-
projects 35 articles
-
receitas 176 articles
-
saopaulo 18 articles
-
sketches 163 articles
-
talks 25 articles
-
techdrawing 24 articles
-
textes 7 articles
-
trilhas 3 articles
-
urbanoids 1 articles
-
video 47 articles
-
webdesign 7 articles
-
works 151 articles
Archives:
-
2007 22 articles
-
2008 32 articles
-
2009 66 articles
-
2010 74 articles
-
2011 74 articles
-
2012 47 articles
-
2013 31 articles
-
2014 38 articles
-
2015 28 articles
-
2016 36 articles
-
2017 41 articles
-
2018 46 articles
-
2019 59 articles
-
2020 18 articles
-
2021 20 articles
-
2022 7 articles
-
2023 25 articles
-
2024 15 articles
Would you check the function makeDimension of the file Draft.py please,
Would you check the function makeDimension of the file Draft.py please,
Following script, for example:
import Part, math, Drawing, Draftfrom FreeCAD import BaseApp.newDocument()Circle= Part.makeCircle(100,Base.Vector(0,0,0),Base.Vector(0,0,1),0,115)obj= App.activeDocument().addObject('Part::Feature','Circle')obj.Shape= Circlerdim= Draft.makeDimension(obj,0,"radius",obj.Shape.Vertexes[0].Point)
outputs:
--------------------Traceback (most recent call last): File "input", line 1, in File "/usr/lib/freecad/Mod/Draft/Draft.py", line 465, in makeDimension obj.ViewObject.Override = "rdim"AttributeError: 'Gui.ViewProviderPythonFeature' object has no attribute 'Override'--------------------
Commeting out both the lines 465 and 468 works fine. Furthermore, makeDimension(p1,p2,p3,p4) does not work for each p4, in case p3== "radius" or p3=="diameter". For example:
rdim= Draft.makeDimension(obj,0,"radius")
outputs:
-----------------------Traceback (most recent call last): File "input", line 1, in File "/usr/lib/freecad/Mod/Draft/Draft.py", line 471, in makeDimension p3 = p2.sub(p1)AttributeError: 'int' object has no attribute 'sub'-----------------------
or with the script:
rdim= Draft.makeDimension(obj,0,"radius",Base.Vector(0,0,0))
no dim can displayed (it is greyed out). Thanks.
anh
Dell Latitude D430 Ubuntu 10.04 FreeCAD 0.13R0784 Release date: 25.03.2012, 13:38:32
Read next:
Hi anh,:
Hi anh,