INCLUDE_DIRECTORIES(${SLVS_ROOT_DIR}/include)
LINK_DIRECTORIES(${SLVS_ROOT_DIR}/lib)
-SET(SLVS_LIBRARIES ${SLVS_ROOT_DIR}/lib/slvs.lib)
+#SET(SLVS_LIBRARIES ${SLVS_ROOT_DIR}/lib/slvs.lib)
export LD_LIBRARY_PATH=${QT4_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
##
#------ boost ------
-#export BOOST_ROOT_DIR=${PDIR}/boost-1.52.0
-#export LD_LIBRARY_PATH ${BOOST_ROOT_DIR}/lib
+export BOOST_ROOT_DIR=${PDIR}/boost-1.52.0
+export LD_LIBRARY_PATH ${BOOST_ROOT_DIR}/lib
##
#------ swig ------
export SWIG_ROOT_DIR=${PDIR}/swig-2.0.8
#include <TDataStd_Name.hxx>
#include <climits>
+#ifndef WIN32
+#include <sys/stat.h>
+#endif
#ifdef WIN32
# define _separator_ '\\'
TDF_Label anObjLab = aGroupLab.NewChild();
TCollection_ExtendedString aName(theFeature->data()->getName().c_str());
TDataStd_Name::Set(anObjLab, aName);
- AddToRefArray(aGroupLab.FindChild(1), anObjLab); // reference to names is on the first sub
+ TDF_Label aGrLabChild = aGroupLab.FindChild(1);
+ AddToRefArray(aGrLabChild, anObjLab); // reference to names is on the first sub
// event: feature is added
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_CREATED);
#include <PartSet_OperationSketchBase.h>
#include <SketchPlugin_Feature.h>
-#include <Model_Object.h>
+#include <ModelAPI_Object.h>
#include <V3d_View.hxx>
boost::shared_ptr<SketchPlugin_Feature> aFeature =
boost::dynamic_pointer_cast<SketchPlugin_Feature>(theFeature);
if (!aFeature) { // if it is reference to a object feature
- boost::shared_ptr<Model_Object> anObj =
- boost::dynamic_pointer_cast<Model_Object>(theFeature);
+ boost::shared_ptr<ModelAPI_Object> anObj =
+ boost::dynamic_pointer_cast<ModelAPI_Object>(theFeature);
if (anObj)
aFeature = boost::dynamic_pointer_cast<SketchPlugin_Feature>(anObj->featureRef());
}
boost::shared_ptr<ModelAPI_Feature> PartSet_OperationSketchBase::createFeature()
{
boost::shared_ptr<ModelAPI_Feature> aFeature = ModuleBase_Operation::createFeature();
- emit featureConstructed(aFeature, FM_Activation);
+ if (aFeature)
+ emit featureConstructed(aFeature, FM_Activation);
return aFeature;
}
mySketch = 0;
}
-void SketchPlugin_Feature::setData(boost::shared_ptr<ModelAPI_Data> theData)
-{
- ModelAPI_Feature::setData(theData);
-
- // find sketch that references to this feature
- int aSketches = document()->size("Construction");
- for(int a = 0; a < aSketches && !mySketch; a++) {
- boost::shared_ptr<SketchPlugin_Sketch> aSketch =
- boost::dynamic_pointer_cast<SketchPlugin_Sketch>(document()->feature("Construction", a));
- if (aSketch) {
- std::list<boost::shared_ptr<ModelAPI_Feature> > aList =
- aSketch->data()->reflist(SKETCH_ATTR_FEATURES)->list();
- std::list<boost::shared_ptr<ModelAPI_Feature> >::iterator aSub = aList.begin();
- for(; aSub != aList.end(); aSub++) {
- if ((*aSub)->data()->isEqual(theData)) {
- mySketch = aSketch.get();
- break;
- }
- }
- }
- }
-}
+//void SketchPlugin_Feature::setData(boost::shared_ptr<ModelAPI_Data> theData)
+//{
+// ModelAPI_Feature::setData(theData);
+//
+// // find sketch that references to this feature
+// int aSketches = document()->size("Construction");
+// for(int a = 0; a < aSketches && !mySketch; a++) {
+// boost::shared_ptr<SketchPlugin_Sketch> aSketch =
+// boost::dynamic_pointer_cast<SketchPlugin_Sketch>(document()->feature("Construction", a));
+// if (aSketch) {
+// std::list<boost::shared_ptr<ModelAPI_Feature> > aList =
+// aSketch->data()->reflist(SKETCH_ATTR_FEATURES)->list();
+// std::list<boost::shared_ptr<ModelAPI_Feature> >::iterator aSub = aList.begin();
+// for(; aSub != aList.end(); aSub++) {
+// if ((*aSub)->data()->isEqual(theData)) {
+// mySketch = aSketch.get();
+// break;
+// }
+// }
+// }
+// }
+//}
void SketchPlugin_Feature::setPreview(const boost::shared_ptr<GeomAPI_Shape>& theShape)
{
/// initializes mySketch
SketchPlugin_Feature();
/// Sets the data manager of an object and here initializes mySketch field
- SKETCHPLUGIN_EXPORT virtual void setData(boost::shared_ptr<ModelAPI_Data> theData);
+ SKETCHPLUGIN_EXPORT virtual void setData(boost::shared_ptr<ModelAPI_Data> theData)
+ {}
friend class SketchPlugin_Sketch;
// Need to be defined before including SolveSpace to avoid additional dependances on Windows platform
#if defined(WIN32) && !defined(HAVE_C99_INTEGER_TYPES)
typedef unsigned int UINT32;
+#else
+#include <stdint.h>
#endif
#include <string.h>
#include <slvs.h>