Code: Select all
class _Structure(ArchComponent.Component):
。。。
if not "Nodes" in pl:
obj.addProperty("App::PropertyVectorList","Nodes","Structure",QT_TRANSLATE_NOOP("App::Property","The structural nodes of this element"))
。。。
1. 我们简单拷贝Nodes两行代码,改成NodesGCS如下:
Code: Select all
if not "NodesGCS" in pl:
obj.addProperty("App::PropertyVectorList","NodesGCS","Structure",QT_TRANSLATE_NOOP("App::Property","The structural points of this element in GCS"))
2. 在class _CommandStructure:里有个def getPoint(self,point=None,obj=None):
找到其中 # metal profile一段,对# horizontal分支,把:
Code: Select all
#FreeCADGui.doCommand('s = Arch.makeStructure(p,length='+str(self.Length)+')')
Code: Select all
FreeCADGui.doCommand('s = Arch.makeStructure(p,length='+str(self.Length)+',bjpoints='+DraftVecUtils.toString(point)+')')
3. 修改:
Code: Select all
def makeStructure(baseobj=None,length=None,width=None,height=None,name="Structure"):
Code: Select all
def makeStructure(baseobj=None,length=None,width=None,height=None,name="Structure",bjpoints=None):
Code: Select all
obj.NodesGCS=bjpoints