OCL tests

This commit is contained in:
jriegel 2014-08-17 20:15:12 +02:00
parent 976511154c
commit ee64f54765
5 changed files with 53 additions and 37 deletions

View File

@ -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
@ -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)
@ -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

View File

@ -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

View File

@ -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"
@ -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 );
}

View File

@ -6,6 +6,8 @@ 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}
@ -13,6 +15,8 @@ include_directories(
set(Points_LIBS
FreeCADApp
${PCL_LIBRARIES}
${PCL_DEBUG_LIBRARIES}
)
generate_from_xml(PointsPy)

View File

@ -36,5 +36,6 @@ ParGrp.SetString("WorkBenchName", "Points Design")
# Append the open handler
FreeCAD.EndingAdd("Point formats (*.asc)","Points")
FreeCAD.EndingAdd("Ply points (*.ply)","Points")