[Breaking change] Renames of some properties

This commit is contained in:
DeepSOIC 2015-10-27 22:19:03 +03:00
parent 18b1b99ac1
commit 871d4b342e
4 changed files with 33 additions and 33 deletions

View File

@ -92,7 +92,7 @@ class LatticeFeature():
self.Type = "latticeFeature"
prop = "NumElements"
obj.addProperty("App::PropertyInteger",prop,"Lattice","Number of placements in the array")
obj.addProperty("App::PropertyInteger",prop,"Lattice","Info: number of placements in the array")
obj.setEditorMode(prop, 1) # set read-only
obj.addProperty("App::PropertyLength","MarkerSize","Lattice","Size of placement markers (set to zero for automatic).")
@ -151,8 +151,8 @@ class LatticeFeature():
def derivedExecute(self,obj):
'''For overriding by derived class. If this returns a list of placements,
it's going to be used to build the shape. If returns None, it is assumed that
derivedExecute has already assigned the shape, and no further actions are needed.'''
it's going to be used to build the shape. If returns None, it is assumed that
derivedExecute has already assigned the shape, and no further actions are needed.'''
return []
def verifyIntegrity(self,obj):

View File

@ -48,24 +48,24 @@ class Compose(latticeBaseFeature.LatticeFeature):
def derivedInit(self,obj):
self.Type = "LatticeCompose"
obj.addProperty("App::PropertyEnumeration","Operation","Compose","Operation to perform between pairs of shapes")
obj.addProperty("App::PropertyEnumeration","Operation","Lattice Compose","Operation to perform between pairs of shapes")
obj.Operation = Compose.operList
obj.addProperty("App::PropertyLink","Base","Base Compound","Base object. Usually a compound of generic shapes.")
obj.addProperty("App::PropertyLink","Base","LatticeCompose Base","Base object. Usually a compound of generic shapes, but can be a lattice too.")
obj.addProperty("App::PropertyBool","BaseLoopSequence","Base Compound","If index goes out of range, apply modulo math.")
obj.addProperty("App::PropertyBool","LoopSequence","LatticeCompose Base","If index goes out of range, apply modulo math.")
obj.addProperty("App::PropertyBool","BaseFlattenHierarchy","Base Compound","Unpack subcompounds, to use all shapes, not just direct children.")
obj.addProperty("App::PropertyBool","FlattenBaseHierarchy","LatticeCompose Base","Unpack subcompounds, to use all shapes, not just direct children.")
obj.addProperty("App::PropertyBool","BaseKeepPosOfFirst","Base Compound","Makes the result pass through the first element of Base.")
obj.BaseKeepPosOfFirst = True
obj.addProperty("App::PropertyBool","KeepBaseFirstItemPos","LatticeCompose Base","Apply extra transform, so that first item doesn't move.")
obj.KeepBaseFirstItemPos = True
obj.addProperty("App::PropertyLink","Tool","Tool Compound","Tool object. Usually a lattice object.")
obj.addProperty("App::PropertyLink","Tool","LatticeCompose Tool","Tool object. Must be a lattice object. Contains placements to be applied.")
obj.addProperty("App::PropertyBool","ToolFlattenHierarchy","Tool Compound","Unpack subcompounds, to use all shapes, not just direct children.")
obj.ToolFlattenHierarchy = True
obj.addProperty("App::PropertyBool","FlattenToolHierarchy","LatticeCompose Tool","Unpack subcompounds, to use all shapes, not just direct children.")
obj.FlattenToolHierarchy = True
def derivedExecute(self,obj):
@ -73,7 +73,7 @@ class Compose(latticeBaseFeature.LatticeFeature):
base = obj.Base.Shape
if base.ShapeType != 'Compound':
base = Part.makeCompound([base])
if obj.BaseFlattenHierarchy:
if obj.FlattenBaseHierarchy:
baseChildren = LCE.AllLeaves(base)
else:
baseChildren = base.childShapes()
@ -81,7 +81,7 @@ class Compose(latticeBaseFeature.LatticeFeature):
tool = obj.Tool.Shape
if tool.ShapeType != 'Compound':
tool = Part.makeCompound([tool])
if obj.BaseFlattenHierarchy:
if obj.FlattenBaseHierarchy:
toolChildren = LCE.AllLeaves(tool)
else:
toolChildren = tool.childShapes()
@ -112,7 +112,7 @@ class Compose(latticeBaseFeature.LatticeFeature):
# early test for termination
if iBase > len(baseChildren)-1:
if obj.BaseLoopSequence:
if obj.LoopSequence:
iBase = 0
else:
FreeCAD.Console.PrintWarning(obj.Name+': There are '+str(len(toolChildren)-len(baseChildren))+
@ -130,7 +130,7 @@ class Compose(latticeBaseFeature.LatticeFeature):
#prepare alignment placement
if bFirst:
bFirst = False
if obj.BaseKeepPosOfFirst:
if obj.KeepBaseFirstItemPos:
plmMatcher = toolPlm.inverse()
#mode logic

View File

@ -45,14 +45,14 @@ class LatticePlacement(latticeBaseFeature.LatticeFeature):
def derivedInit(self,obj):
self.Type = "LatticePlacement"
obj.addProperty("App::PropertyEnumeration","PlacementChoice","Placement","Choose one of standard placements here.")
obj.addProperty("App::PropertyEnumeration","PlacementChoice","Lattice Placement","Choose one of standard placements here.")
obj.PlacementChoice = self._PlacementChoiceList
obj.addProperty("App::PropertyLength","Offset","Placement","Offset from oigin for XY/XZ/YZ plane modes")
obj.addProperty("App::PropertyLength","Offset","Lattice Placement","Offset from oigin for XY/XZ/YZ plane modes")
obj.addProperty("App::PropertyBool","FlipZ","Placement","Set to true to flip Z axis (also flips Y)")
obj.addProperty("App::PropertyBool","FlipZ","Lattice Placement","Set to true to flip Z axis (also flips Y)")
obj.addProperty("App::PropertyBool","Invert","Placement","Invert the placement")
obj.addProperty("App::PropertyBool","Invert","Lattice Placement","Invert the placement")
def updateReadOnlyness(self, obj):
m = obj.PlacementChoice

View File

@ -41,37 +41,37 @@ class PolarArray(latticeBaseFeature.LatticeFeature):
"The Lattice PolarArray object"
def derivedInit(self,obj):
self.Type = "LatticePolarArray"
obj.addProperty("App::PropertyEnumeration","Mode","Array","")
obj.addProperty("App::PropertyEnumeration","Mode","Lattice Array","")
obj.Mode = ['SpanN','StepN','SpanStep','Spreadsheet']
obj.Mode = 'SpanN'
obj.addProperty("App::PropertyFloat","AngleSpanStart","Array","starting angle for angular span")
obj.addProperty("App::PropertyFloat","AngleSpanStart","Lattice Array","starting angle for angular span")
obj.AngleSpanStart = 0
obj.addProperty("App::PropertyFloat","AngleSpanEnd","Array","ending angle for angular span")
obj.addProperty("App::PropertyFloat","AngleSpanEnd","Lattice Array","ending angle for angular span")
obj.AngleSpanEnd = 360
obj.addProperty("App::PropertyBool","EndInclusive","Array","Determines if the last occurence is placed exactly at the ending angle of the span, or the ending angle is super-last.")
obj.addProperty("App::PropertyBool","EndInclusive","Lattice Array","Determines if the last occurence is placed exactly at the ending angle of the span, or the ending angle is super-last.")
obj.EndInclusive = False
obj.addProperty("App::PropertyFloat","AngleStep","Array","")
obj.addProperty("App::PropertyFloat","AngleStep","Lattice Array","")
obj.addProperty("App::PropertyInteger","NumberPolar","Array","Number of occurences.")
obj.addProperty("App::PropertyInteger","NumberPolar","Lattice Array","Number of occurences.")
obj.NumberPolar = 5
obj.addProperty("App::PropertyFloat","Offset","Array","Offset of the first item, expressed as a fraction of angular step.")
obj.addProperty("App::PropertyFloat","Offset","Lattice Array","Offset of the first item, expressed as a fraction of angular step.")
obj.addProperty("App::PropertyLength","Radius","Geometric","Radius of the array (set to zero for just rotation).")
obj.addProperty("App::PropertyLength","Radius","Lattice Array","Radius of the array (set to zero for just rotation).")
obj.Radius = 3 #temporary, to see the array (because marker display mode is not implemented yet)
obj.addProperty("App::PropertyVector","AxisDir","Geometric","Vector that defines axis direction")
obj.addProperty("App::PropertyVector","AxisDir","Lattice Array","Vector that defines axis direction")
obj.AxisDir = App.Vector(0,0,1)
obj.addProperty("App::PropertyVector","AxisPoint","Geometric","Center of rotation")
obj.addProperty("App::PropertyVector","AxisPoint","Lattice Array","Center of rotation")
obj.addProperty("App::PropertyLink","AxisLink","Geometric","Link to the axis (Edge1 is used for the axis).")
obj.addProperty("App::PropertyLink","AxisLink","Lattice Array","Link to the axis (Edge1 is used for the axis).")
obj.addProperty("App::PropertyBool","AxisLinkIgnoreDir","Geometric","If True, AxisDir is not updated based on the link.")
obj.addProperty("App::PropertyBool","AxisLinkIgnorePoint","Geometric","If True, AxisPoint is not updated based on the link.")
obj.addProperty("App::PropertyBool","AxisLinkIgnoreDir","Lattice Array","If True, AxisDir is not updated based on the link.")
obj.addProperty("App::PropertyBool","AxisLinkIgnorePoint","Lattice Array","If True, AxisPoint is not updated based on the link.")
obj.addProperty("App::PropertyLink","SpreadSheet","SpreadSheet mode","Link to spreadsheet")
obj.addProperty("App::PropertyString","CellStart","SpreadSheet mode","Starting cell of list of angles")