From e9540eadccbb37056c7d534555c4cfe4e5467189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Thu, 24 Oct 2013 19:22:24 +0200 Subject: [PATCH] let assembly part numbering use standart freecad sheme --- src/Mod/Assembly/AssemblyLib.py | 6 +++--- src/Mod/Assembly/Gui/Command.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/Assembly/AssemblyLib.py b/src/Mod/Assembly/AssemblyLib.py index b08eeb257..fd05b7dcb 100644 --- a/src/Mod/Assembly/AssemblyLib.py +++ b/src/Mod/Assembly/AssemblyLib.py @@ -66,11 +66,11 @@ else: def importAssembly(FileName,DestItem): for i in Part.read(FileName).Solids: - po = FreeCAD.activeDocument().addObject('Assembly::ItemPart','STP-Part_1') + po = FreeCAD.activeDocument().addObject('Assembly::ItemPart','STP-Part') DestItem.Items = DestItem.Items + [po] - bo = FreeCAD.activeDocument().addObject('PartDesign::Body','STP-Body_1') + bo = FreeCAD.activeDocument().addObject('PartDesign::Body','STP-Body') po.Model = bo - so = FreeCAD.activeDocument().addObject('PartDesign::Solid','STP-Solid_1') + so = FreeCAD.activeDocument().addObject('PartDesign::Solid','STP-Solid') bo.Model = so bo.Tip = so so.Shape = i diff --git a/src/Mod/Assembly/Gui/Command.cpp b/src/Mod/Assembly/Gui/Command.cpp index 29b255b89..d711a7493 100644 --- a/src/Mod/Assembly/Gui/Command.cpp +++ b/src/Mod/Assembly/Gui/Command.cpp @@ -137,7 +137,7 @@ void CmdAssemblyAddNewComponent::activated(int iMsg) } openCommand("Insert Component"); - std::string CompName = getUniqueObjectName("Product.0"); + std::string CompName = getUniqueObjectName("Product"); doCommand(Doc,"App.activeDocument().addObject('Assembly::ItemAssembly','%s')",CompName.c_str()); if(dest){ std::string fatherName = dest->getNameInDocument();