From: azv Date: Thu, 24 Sep 2015 06:29:00 +0000 (+0300) Subject: Make workplane and its parameters external X-Git-Tag: 1.4.0_demo1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=788c0cd3fc7de0b3d91ab9c8bc6e1ee2243f09fc;p=modules%2Fshaper.git Make workplane and its parameters external --- diff --git a/src/SketchSolver/SketchSolver_Group.cpp b/src/SketchSolver/SketchSolver_Group.cpp index cc60f0c25..aeac2ebea 100644 --- a/src/SketchSolver/SketchSolver_Group.cpp +++ b/src/SketchSolver/SketchSolver_Group.cpp @@ -76,7 +76,7 @@ private: static Slvs_hGroup myGroupIndex; ///< index of the group }; -Slvs_hGroup GroupIndexer::myGroupIndex = 0; +Slvs_hGroup GroupIndexer::myGroupIndex = SLVS_G_OUTOFGROUP; static void sendMessage(const char* theMessageName) @@ -500,13 +500,13 @@ bool SketchSolver_Group::updateWorkplane() std::vector::iterator aParIter = aParams.begin(); for (; aParIter != aParams.end(); aParIter++) { aParIter->h = SLVS_E_UNKNOWN; // the ID should be generated by storage - aParIter->group = myID; + aParIter->group = SLVS_G_OUTOFGROUP; aParIter->h = myStorage->addParameter(*aParIter); } std::vector::iterator anEntIter = anEntities.begin(); for (; anEntIter != anEntities.end(); anEntIter++) { anEntIter->h = SLVS_E_UNKNOWN; // the ID should be generated by storage - anEntIter->group = myID; + anEntIter->group = SLVS_G_OUTOFGROUP; anEntIter->wrkpl = myWorkplaneID; for (int i = 0; i < 4; i++) if (anEntIter->param[i] != SLVS_E_UNKNOWN) diff --git a/src/SketchSolver/SketchSolver_Solver.h b/src/SketchSolver/SketchSolver_Solver.h index f90d71fd2..52ac18f98 100644 --- a/src/SketchSolver/SketchSolver_Solver.h +++ b/src/SketchSolver/SketchSolver_Solver.h @@ -34,6 +34,8 @@ typedef unsigned int UINT32; #define SLVS_E_UNKNOWN 0 // Unknown group #define SLVS_G_UNKNOWN 0 +// Group ID to store external objects +#define SLVS_G_OUTOFGROUP 1 /** * The main class that performs the high-level operations for connection to the SolveSpace.