Arch: using basic object names for all arch objects

This commit is contained in:
Yorik van Havre
2018-07-07 14:40:10 -03:00
parent d7d4489da1
commit 5f63a7764b
12 changed files with 12 additions and 12 deletions

View File

@@ -198,7 +198,7 @@ def makeBuilding(objectslist=None,baseobj=None,name="Building"):
if not FreeCAD.ActiveDocument:
FreeCAD.Console.PrintError("No active document. Aborting\n")
return
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroupPython",name)
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroupPython","Building")
_Building(obj)
if FreeCAD.GuiUp:
_ViewProviderBuilding(obj.ViewObject)

View File

@@ -226,7 +226,7 @@ def makeComponent(baseobj=None,name="Component",delete=False):
if not FreeCAD.ActiveDocument:
FreeCAD.Console.PrintError("No active document. Aborting\n")
return
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Component")
obj.Label = translate("Arch",name)
ArchComponent.Component(obj)
if FreeCAD.GuiUp:

View File

@@ -58,7 +58,7 @@ def makeEquipment(baseobj=None,placement=None,name="Equipment"):
if not FreeCAD.ActiveDocument:
FreeCAD.Console.PrintError("No active document. Aborting\n")
return
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Equipment")
_Equipment(obj)
if baseobj:
if baseobj.isDerivedFrom("Mesh::Feature"):

View File

@@ -57,7 +57,7 @@ def makeFrame(baseobj,profile,name=translate("Arch","Frame")):
if not FreeCAD.ActiveDocument:
FreeCAD.Console.PrintError("No active document. Aborting\n")
return
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Frame")
obj.Label = translate("Arch",name)
_Frame(obj)
if FreeCAD.GuiUp:

View File

@@ -73,7 +73,7 @@ def makePanel(baseobj=None,length=0,width=0,thickness=0,placement=None,name="Pan
if not FreeCAD.ActiveDocument:
FreeCAD.Console.PrintError("No active document. Aborting\n")
return
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Panel")
obj.Label = translate("Arch",name)
_Panel(obj)
if FreeCAD.GuiUp:

View File

@@ -59,7 +59,7 @@ def makeRebar(baseobj=None,sketch=None,diameter=None,amount=1,offset=None,name="
FreeCAD.Console.PrintError("No active document. Aborting\n")
return
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Rebar")
obj.Label = translate("Arch",name)
_Rebar(obj)
if FreeCAD.GuiUp:

View File

@@ -60,7 +60,7 @@ def makeSite(objectslist=None,baseobj=None,name="Site"):
FreeCAD.Console.PrintError("No active document. Aborting\n")
return
import Part
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Site")
obj.Label = translate("Arch",name)
_Site(obj)
if FreeCAD.GuiUp:

View File

@@ -179,7 +179,7 @@ def makeSpace(objects=None,baseobj=None,name="Space"):
if not FreeCAD.ActiveDocument:
FreeCAD.Console.PrintError("No active document. Aborting\n")
return
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Space")
obj.Label = translate("Arch",name)
_Space(obj)
if FreeCAD.GuiUp:

View File

@@ -56,7 +56,7 @@ def makeStairs(baseobj=None,length=None,width=None,height=None,steps=None,name="
FreeCAD.Console.PrintError("No active document. Aborting\n")
return
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Stairs")
obj.Label = translate("Arch",name)
_Stairs(obj)
if FreeCAD.GuiUp:

View File

@@ -72,7 +72,7 @@ def makeStructure(baseobj=None,length=None,width=None,height=None,name="Structur
FreeCAD.Console.PrintError("No active document. Aborting\n")
return
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Structure")
obj.Label = translate("Arch",name)
_Structure(obj)
if FreeCAD.GuiUp:

View File

@@ -62,7 +62,7 @@ def makeWall(baseobj=None,length=None,width=None,height=None,align="Center",face
FreeCAD.Console.PrintError("No active document. Aborting\n")
return
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Wall")
obj.Label = translate("Arch",name)
_Wall(obj)
if FreeCAD.GuiUp:

View File

@@ -73,7 +73,7 @@ def makeWindow(baseobj=None,width=None,height=None,parts=None,name="Window"):
obj = Draft.clone(baseobj)
return obj
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Window")
obj.Label = translate("Arch",name)
_Window(obj)
if FreeCAD.GuiUp: