ArchPipe objects named as "Rail"
Discussion:
https://forum.freecadweb.org/viewtopic.php?f=23&t=29358&p=259085#p259085
5f63a7764b (diff-fb9ac48ea14ab86d0e964fee1f4e4838)
This commit is contained in:
@@ -164,7 +164,9 @@ def makeRailing(stairs):
|
||||
stairs0OutlineWireLR = "OutlineWireRight"
|
||||
stairOutlineWireLR = "OutlineWireRight"
|
||||
if outlineLR or OutlineLRAll:
|
||||
lrRail = ArchPipe.makePipe()
|
||||
|
||||
lrRail = ArchPipe.makePipe(baseobj=None,diameter=0,length=0,placement=None,name="Rail")
|
||||
|
||||
if OutlineLRAll:
|
||||
lrRailWire = Draft.makeWire(OutlineLRAll)
|
||||
lrRail.Base = lrRailWire
|
||||
@@ -327,6 +329,7 @@ class _Stairs(ArchComponent.Component):
|
||||
if not "Align" in pl:
|
||||
obj.addProperty("App::PropertyEnumeration","Align","Stairs",QT_TRANSLATE_NOOP("App::Property","The alignment of these stairs on their baseline, if applicable"))
|
||||
obj.Align = ['Left','Right','Center']
|
||||
|
||||
# TODO - To be combined into Width when PropertyLengthList is available
|
||||
if not "WidthOfLanding" in pl:
|
||||
obj.addProperty("App::PropertyFloatList","WidthOfLanding","Stairs",QT_TRANSLATE_NOOP("App::Property","The width of a Landing (2nd edge and after - 1st edge follow Width property"))
|
||||
@@ -601,13 +604,12 @@ class _Stairs(ArchComponent.Component):
|
||||
print (i)
|
||||
if i > 0:
|
||||
try:
|
||||
if obj.WidthOfLanding[i-1] > 0: # Float has no .Value
|
||||
if obj.WidthOfLanding[i-1] > 0:
|
||||
netWidthI = obj.WidthOfLanding[i-1] - offsetHLeft.Value - offsetHRight.Value #2*offsetH
|
||||
except:
|
||||
pass
|
||||
if netWidthI == 0:
|
||||
netWidthI = obj.Width.Value - offsetHLeft.Value - offsetHRight.Value #2*offsetH
|
||||
|
||||
vWidth.append(DraftVecUtils.scaleTo(vLength[i].cross(Vector(0,0,1)),netWidthI))
|
||||
|
||||
vBase.append(edges[i].Vertexes[0].Point)
|
||||
|
||||
Reference in New Issue
Block a user