OCL tests
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user