Arch: Added rounding property to rebars

This commit is contained in:
Yorik van Havre 2013-10-09 16:15:56 -03:00
parent cf2d437c73
commit 20358677aa
2 changed files with 7 additions and 1 deletions

View File

@ -118,6 +118,7 @@ class _Rebar(ArchComponent.Component):
obj.addProperty("App::PropertyDistance","Diameter","Arch","The diameter of the bar").Diameter = 6
obj.addProperty("App::PropertyDistance","Offset","Arch","The distance between the border of the beam and the bars (concrete cover).").Offset = 30
obj.addProperty("App::PropertyInteger","Amount","Arch","The amount of bars").Amount = 1
obj.addProperty("App::PropertyFloat","Rounding","Arch","The fillet to apply to the angle of the base profile. This value is multiplied by the bar diameter.").Rounding = 0
self.Type = "Component"
def getBaseAndAxis(self,obj):
@ -150,6 +151,12 @@ class _Rebar(ArchComponent.Component):
return
father = obj.InList[0]
wire = obj.Base.Shape.Wires[0]
if hasattr(obj,"Rounding"):
print obj.Rounding
if obj.Rounding:
radius = obj.Rounding * obj.Diameter
import DraftGeomUtils
wire = DraftGeomUtils.filletWire(wire,radius)
bpoint, bvec = self.getBaseAndAxis(obj)
if not bpoint:
return

View File

@ -199,7 +199,6 @@ class Snapper:
if self.dim2:
self.dim2.off()
print screenpos
point = self.getApparentPoint(screenpos[0],screenpos[1])
# setup a track line if we got a last point