Fix Cam and Assembly module

This commit is contained in:
wmayer
2012-04-07 17:00:12 +02:00
parent ef7c1d4b50
commit 4da08fc48d
4 changed files with 14 additions and 7 deletions

View File

@@ -65,7 +65,11 @@ SET(CamGui_SRCS
add_library(CamGui SHARED ${CamGui_SRCS})
target_link_libraries(CamGui ${CamGui_LIBS})
fc_copy_script("Mod/Cam" "CamGui" InitGui.py)
fc_target_copy_resource(CamGui
${CMAKE_SOURCE_DIR}/src/Mod/Cam
${CMAKE_BINARY_DIR}/Mod/Cam
InitGui.py)
if(MSVC)
set_target_properties(CamGui PROPERTIES SUFFIX ".pyd")

View File

@@ -899,7 +899,9 @@ void Cutting::zLevelCallback(void * ud, SoEventCallback * n)
if (!vp || !vp->getTypeId().isDerivedFrom(PartGui::ViewProviderPart::getClassTypeId()))
return;
PartGui::ViewProviderPart* vpp = static_cast<PartGui::ViewProviderPart*>(vp);
TopoDS_Shape sh = vpp->getShape(point);
std::string element = vpp->getElement(point->getDetail());
TopoDS_Shape sh = static_cast<Part::Feature*>(vpp->getObject())->
Shape.getShape().getSubShape(element.c_str());
if (!sh.IsNull())
{
// ok a shape was picked