Skip to content

Commit

Permalink
OCL tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jriegel committed Aug 17, 2014
1 parent 9765111 commit ee64f54
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 37 deletions.
59 changes: 22 additions & 37 deletions cMake/UseLibPack10x.cmake
Expand Up @@ -32,7 +32,7 @@ set(Boost_LIBRARIES
optimized boost_program_options-vc110-mt-1_55.lib
optimized boost_regex-vc110-mt-1_55.lib
optimized boost_signals-vc110-mt-1_55.lib
#optimized boost_thread-vc110-mt-1_55.lib
optimized boost_thread-vc110-mt-1_55.lib
)
set(Boost_DEBUG_LIBRARIES
debug boost_filesystem-vc110-mt-gd-1_55.lib
Expand All @@ -41,7 +41,7 @@ set(Boost_DEBUG_LIBRARIES
debug boost_program_options-vc110-mt-gd-1_55.lib
debug boost_regex-vc110-mt-gd-1_55.lib
debug boost_signals-vc110-mt-gd-1_55.lib
#debug boost_thread-vc110-mt-gd-1_55.lib
debug boost_thread-vc110-mt-gd-1_55.lib
)
set(Boost_FOUND TRUE)

Expand Down Expand Up @@ -311,41 +311,26 @@ set(NGLIB_DEBUG_LIBRARIES
debug nglibd
)

# OCC
#set(OCC_INCLUDE_DIR C:/Projects/LibPack/oce-0.10.0/include/oce)
#set(OCC_LIBRARY_DIR C:/Projects/LibPack/oce-0.10.0/Win64/lib)
#set(OCC_LIBRARIES
# ${OCC_LIBRARY_DIR}/TKFillet.lib
# ${OCC_LIBRARY_DIR}/TKMesh.lib
# ${OCC_LIBRARY_DIR}/TKernel.lib
# ${OCC_LIBRARY_DIR}/TKG2d.lib
# ${OCC_LIBRARY_DIR}/TKG3d.lib
# ${OCC_LIBRARY_DIR}/TKMath.lib
# ${OCC_LIBRARY_DIR}/TKIGES.lib
# ${OCC_LIBRARY_DIR}/TKSTL.lib
# ${OCC_LIBRARY_DIR}/TKShHealing.lib
# ${OCC_LIBRARY_DIR}/TKXSBase.lib
# ${OCC_LIBRARY_DIR}/TKBool.lib
# ${OCC_LIBRARY_DIR}/TKBO.lib
# ${OCC_LIBRARY_DIR}/TKBRep.lib
# ${OCC_LIBRARY_DIR}/TKTopAlgo.lib
# ${OCC_LIBRARY_DIR}/TKGeomAlgo.lib
# ${OCC_LIBRARY_DIR}/TKGeomBase.lib
# ${OCC_LIBRARY_DIR}/TKOffset.lib
# ${OCC_LIBRARY_DIR}/TKPrim.lib
# ${OCC_LIBRARY_DIR}/TKSTEP.lib
# ${OCC_LIBRARY_DIR}/TKSTEPBase.lib
# ${OCC_LIBRARY_DIR}/TKSTEPAttr.lib
# ${OCC_LIBRARY_DIR}/TKHLR.lib
# ${OCC_LIBRARY_DIR}/TKFeat.lib
#)
#set(OCC_OCAF_LIBRARIES
# ${OCC_LIBRARY_DIR}/TKCAF.lib
# ${OCC_LIBRARY_DIR}/TKXCAF.lib
# ${OCC_LIBRARY_DIR}/TKLCAF.lib
# ${OCC_LIBRARY_DIR}/TKXDESTEP.lib
# ${OCC_LIBRARY_DIR}/TKXDEIGES.lib
#)

# Pointscloud library
set(PCL_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/pcl-1.7)
set(PCL_LIBRARIES
optimized pcl_common_release.lib
optimized pcl_kdtree_release.lib
optimized pcl_octree_release.lib
optimized pcl_io_release.lib
optimized pcl_io_ply_release.lib
)
set(PCL_DEBUG_LIBRARIES
debug pcl_common_debug.lib
debug pcl_kdtree_debug.lib
debug pcl_octree_debug.lib
debug pcl_io_debug.lib
debug pcl_io_ply_debug.lib
)
set(PCL_FOUND TRUE)


set(OCC_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include/oce-0.15)
set(OCC_LIBRARY_DIR ${FREECAD_LIBPACK_DIR}/lib)
set(OCC_LIBRARIES
Expand Down
2 changes: 2 additions & 0 deletions src/Mod/Part/App/AppPart.cpp
Expand Up @@ -97,6 +97,8 @@ void PartExport initPart()
str << OCC_VERSION_MAJOR << "." << OCC_VERSION_MINOR << "." << OCC_VERSION_MAINTENANCE;
App::Application::Config()["OCC_VERSION"] = str.str();

Base::Console().Log("Module: Part\n");

// This is highly experimental and we should keep an eye on it
// if we have mysterious crashes
// The argument must be 'Standard_False' to avoid FPE caused by
Expand Down
24 changes: 24 additions & 0 deletions src/Mod/Points/App/AppPointsPy.cpp
Expand Up @@ -34,6 +34,13 @@
#include <App/DocumentObject.h>
#include <App/Property.h>

// PCL test

#include <iostream>
#include <pcl/io/ply_io.h>
#include <pcl/point_types.h>


#include "Points.h"
#include "PointsPy.h"
#include "PointsAlgos.h"
Expand Down Expand Up @@ -63,6 +70,23 @@ open(PyObject *self, PyObject *args)
Points::Feature *pcFeature = (Points::Feature *)pcDoc->addObject("Points::Feature", file.fileNamePure().c_str());
Points::PointKernel pkTemp;
pkTemp.load(Name);
pcFeature->Points.setValue( pkTemp );

}
else
if (file.hasExtension("ply")) {
// create new document import
App::Document *pcDoc = App::GetApplication().newDocument("Unnamed");
Points::Feature *pcFeature = (Points::Feature *)pcDoc->addObject("Points::Feature", file.fileNamePure().c_str());
Points::PointKernel pkTemp;

// pcl test
pcl::PointCloud<pcl::PointXYZRGB> cloud_in;
pcl::io::loadPLYFile<pcl::PointXYZRGB>(Name,cloud_in);




pcFeature->Points.setValue( pkTemp );

}
Expand Down
4 changes: 4 additions & 0 deletions src/Mod/Points/App/CMakeLists.txt
Expand Up @@ -6,13 +6,17 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${PCL_INCLUDE_DIRS}
${PYTHON_INCLUDE_PATH}
${XERCESC_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR}
)

set(Points_LIBS
FreeCADApp
${PCL_LIBRARIES}
${PCL_DEBUG_LIBRARIES}
)

generate_from_xml(PointsPy)
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Points/Init.py
Expand Up @@ -36,5 +36,6 @@

# Append the open handler
FreeCAD.EndingAdd("Point formats (*.asc)","Points")
FreeCAD.EndingAdd("Ply points (*.ply)","Points")


0 comments on commit ee64f54

Please sign in to comment.