Skip to content

Commit

Permalink
+ check if pcl is built opennurbs support
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Nov 4, 2015
1 parent 6495005 commit 38ca335
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp
Expand Up @@ -61,6 +61,8 @@ class Module : public Py::ExtensionModule<Module>
add_varargs_method("triangulate",&Module::triangulate,
"triangulate(PointKernel,searchRadius[,mu=2.5])."
);
#endif
#if defined(HAVE_PCL_OPENNURBS)
add_keyword_method("fitBSpline",&Module::fitBSpline,
"fitBSpline(PointKernel)."
);
Expand Down Expand Up @@ -198,6 +200,8 @@ class Module : public Py::ExtensionModule<Module>

return Py::asObject(new Mesh::MeshPy(mesh));
}
#endif
#if defined(HAVE_PCL_OPENNURBS)
Py::Object fitBSpline(const Py::Tuple& args, const Py::Dict& kwds)
{
PyObject *pcObj;
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/ReverseEngineering/App/BSplineFitting.cpp
Expand Up @@ -22,7 +22,7 @@


#include "PreCompiled.h"
#if defined(HAVE_PCL_SURFACE)
#if defined(HAVE_PCL_OPENNURBS)
#ifndef _PreComp_
# include <Geom_BSplineSurface.hxx>
# include <TColgp_Array2OfPnt.hxx>
Expand Down Expand Up @@ -236,4 +236,4 @@ Handle(Geom_BSplineSurface) BSplineFitting::perform()
return Handle_Geom_BSplineSurface();
#endif
}
#endif // HAVE_PCL_SURFACE
#endif // HAVE_PCL_OPENNURBS
4 changes: 2 additions & 2 deletions src/Mod/ReverseEngineering/App/BSplineFitting.h
Expand Up @@ -24,7 +24,7 @@
#ifndef REEN_BSPLINEFITTING_H
#define REEN_BSPLINEFITTING_H

#if defined(HAVE_PCL_SURFACE)
#if defined(HAVE_PCL_OPENNURBS)
#include <Handle_Geom_BSplineSurface.hxx>
#include <Base/Vector3D.h>
#include <vector>
Expand Down Expand Up @@ -58,6 +58,6 @@ class BSplineFitting

}

#endif // HAVE_PCL_SURFACE
#endif // HAVE_PCL_OPENNURBS

#endif // REEN_BSPLINEFITTING_H
4 changes: 4 additions & 0 deletions src/Mod/ReverseEngineering/App/CMakeLists.txt
Expand Up @@ -6,6 +6,10 @@ endif(MSVC)

if (PCL_SURFACE_FOUND AND PCL_FEATURES_FOUND)
add_definitions(-DHAVE_PCL_SURFACE)

if(EXISTS "${PCL_INCLUDE_DIRS}/pcl/surface/on_nurbs/fitting_surface_tdm.h")
add_definitions(-DHAVE_PCL_OPENNURBS)
endif()
endif ()

include_directories(
Expand Down

0 comments on commit 38ca335

Please sign in to comment.