From ea57c041178eb38ec38d7a69d19a567d0ede66bd Mon Sep 17 00:00:00 2001 From: jriegel Date: Fri, 6 Apr 2012 16:19:11 +0200 Subject: [PATCH] fix in Plane and Placement visual --- src/Mod/Assembly/App/ItemAssembly.cpp | 4 +++- src/Mod/Assembly/Gui/Command.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/Assembly/App/ItemAssembly.cpp b/src/Mod/Assembly/App/ItemAssembly.cpp index e6210ca3b..159a11abb 100644 --- a/src/Mod/Assembly/App/ItemAssembly.cpp +++ b/src/Mod/Assembly/App/ItemAssembly.cpp @@ -60,7 +60,9 @@ App::DocumentObjectExecReturn *ItemAssembly::execute(void) std::vector::iterator it; for (it = obj.begin(); it != obj.end(); ++it) { if ((*it)->getTypeId().isDerivedFrom(Assembly::Item::getClassTypeId())) { - s.push_back(static_cast(*it)->Shape.getValue()); + TopoDS_Shape aShape = static_cast(*it)->Shape.getValue(); + if (!aShape.IsNull()) + s.push_back(aShape); } } diff --git a/src/Mod/Assembly/Gui/Command.cpp b/src/Mod/Assembly/Gui/Command.cpp index b626b2e66..65d004f72 100644 --- a/src/Mod/Assembly/Gui/Command.cpp +++ b/src/Mod/Assembly/Gui/Command.cpp @@ -82,7 +82,7 @@ void CmdAssemblyAddNewPart::activated(int iMsg) Command::addModule(App,"PartDesign"); Command::addModule(Gui,"PartDesignGui"); -#if 1 // test code for children nesting +#if 0 // test code for children nesting Command::addModule(App,"Part"); std::string BodyName = getUniqueObjectName("Box"); doCommand(Doc,"App.activeDocument().addObject('Part::Box','%s')",BodyName.c_str());