2024-01-20 19:16:41 +05:00
|
|
|
// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
|
2009-02-17 10:27:49 +05:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
2014-02-20 18:25:37 +06:00
|
|
|
// version 2.1 of the License, or (at your option) any later version.
|
2009-02-17 10:27:49 +05:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
2009-02-17 10:27:49 +05:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2009-02-17 10:27:49 +05:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
2009-02-17 10:27:49 +05:00
|
|
|
//
|
2012-08-09 16:03:55 +06:00
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
#ifndef LIBSMESH_SWIG_H
|
|
|
|
#define LIBSMESH_SWIG_H
|
|
|
|
|
2013-10-18 19:29:00 +06:00
|
|
|
#ifdef WIN32
|
2012-08-09 16:03:55 +06:00
|
|
|
#if defined SMESH_SWIG_EXPORTS || defined _libSMESH_Swig_EXPORTS
|
2018-04-17 18:50:41 +05:00
|
|
|
#define SMESH_SWIG_EXPORT __declspec(dllexport)
|
2009-02-17 10:27:49 +05:00
|
|
|
#else
|
2018-04-17 18:50:41 +05:00
|
|
|
#define SMESH_SWIG_EXPORT __declspec(dllimport)
|
2009-02-17 10:27:49 +05:00
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#define SMESH_SWIG_EXPORT
|
|
|
|
#endif
|
|
|
|
|
2015-07-22 20:13:50 +05:00
|
|
|
#include <SVTK_Selection.h>
|
2018-04-17 18:50:41 +05:00
|
|
|
#include <vector>
|
2015-07-22 20:13:50 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
// See SMESH_Actor.h
|
2017-08-02 17:10:31 +05:00
|
|
|
typedef enum
|
2017-03-22 20:56:47 +05:00
|
|
|
{
|
2018-04-17 18:50:41 +05:00
|
|
|
EntityNone = 0x00,
|
|
|
|
Entity0d = 0x01, // SMESH_Actor::e0DElements
|
|
|
|
EntityEdges = 0x02, // SMESH_Actor::eEdges
|
|
|
|
EntityFaces = 0x04, // SMESH_Actor::eFaces
|
|
|
|
EntityVolumes = 0x08, // SMESH_Actor::eVolumes
|
|
|
|
EntityBalls = 0x10, // SMESH_Actor::eBallElem
|
|
|
|
EntityAll = 0xff // SMESH_Actor::eAllEntity
|
|
|
|
} EntityMode;
|
|
|
|
|
|
|
|
// See SVTK_Selection.h
|
|
|
|
typedef enum
|
2017-03-22 20:56:47 +05:00
|
|
|
{
|
2018-04-17 18:50:41 +05:00
|
|
|
Undefined = -1,
|
|
|
|
Node = NodeSelection,
|
|
|
|
Cell = CellSelection,
|
|
|
|
EdgeOfCell = EdgeOfCellSelection,
|
|
|
|
Edge = EdgeSelection,
|
|
|
|
Face = FaceSelection,
|
|
|
|
Volume = VolumeSelection,
|
|
|
|
Actor = ActorSelection,
|
|
|
|
Elem0D = Elem0DSelection,
|
|
|
|
Ball = BallSelection
|
|
|
|
} SelectionMode;
|
|
|
|
|
|
|
|
// See SMESH_Actor.h
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
UndefinedMode = -1,
|
|
|
|
PointMode = 0, // SMESH_Actor::ePoint
|
|
|
|
EdgeMode, // SMESH_Actor::eEdge
|
|
|
|
SurfaceMode // SMESH_Actor::eSurface
|
|
|
|
} DisplayMode;
|
2017-03-22 20:56:47 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
struct ColorData
|
2017-03-22 20:56:47 +05:00
|
|
|
{
|
|
|
|
double r, g, b;
|
2018-04-17 18:50:41 +05:00
|
|
|
public:
|
|
|
|
ColorData();
|
|
|
|
};
|
2017-03-22 20:56:47 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
struct BicolorData
|
2017-03-22 20:56:47 +05:00
|
|
|
{
|
|
|
|
double r, g, b;
|
2018-04-17 18:50:41 +05:00
|
|
|
int delta;
|
|
|
|
public:
|
|
|
|
BicolorData();
|
|
|
|
};
|
2017-03-22 20:56:47 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
struct Properties
|
2017-03-22 20:56:47 +05:00
|
|
|
{
|
2018-04-17 18:50:41 +05:00
|
|
|
ColorData nodeColor;
|
|
|
|
int markerType;
|
|
|
|
int markerScale;
|
|
|
|
|
|
|
|
ColorData edgeColor;
|
|
|
|
int edgeWidth;
|
|
|
|
|
|
|
|
BicolorData surfaceColor;
|
|
|
|
BicolorData volumeColor;
|
|
|
|
|
|
|
|
ColorData elem0dColor;
|
|
|
|
int elem0dSize;
|
|
|
|
|
|
|
|
ColorData ballColor;
|
|
|
|
double ballScale;
|
|
|
|
|
|
|
|
ColorData outlineColor;
|
|
|
|
int outlineWidth;
|
|
|
|
|
|
|
|
ColorData orientationColor;
|
|
|
|
double orientationScale;
|
|
|
|
bool orientation3d;
|
|
|
|
|
|
|
|
double shrinkFactor;
|
2017-03-22 20:56:47 +05:00
|
|
|
double opacity;
|
2018-04-17 18:50:41 +05:00
|
|
|
|
|
|
|
public:
|
|
|
|
Properties();
|
2017-03-22 20:56:47 +05:00
|
|
|
};
|
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
typedef ColorData nodeColorStruct; // deprecated
|
|
|
|
typedef ColorData edgeColorStruct; // deprecated
|
|
|
|
typedef BicolorData surfaceColorStruct; // deprecated
|
|
|
|
typedef BicolorData volumeColorStruct; // deprecated
|
|
|
|
typedef Properties actorAspect; // deprecated
|
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
class SMESH_SWIG_EXPORT SMESH_Swig
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SMESH_Swig();
|
|
|
|
~SMESH_Swig();
|
|
|
|
|
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
// Initialization =============================================
|
2018-06-14 16:56:19 +05:00
|
|
|
|
|
|
|
void Init(); // deprecated
|
2018-04-17 18:50:41 +05:00
|
|
|
|
|
|
|
// Publishing =================================================
|
2009-02-17 10:27:49 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
const char* publish(const char*, const char* = 0);
|
|
|
|
void rename(const char*, const char*);
|
2009-02-17 10:27:49 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
const char* AddNewMesh(const char*, const char* = 0); // deprecated
|
|
|
|
const char* AddNewHypothesis(const char*, const char* = 0); // deprecated
|
|
|
|
const char* AddNewAlgorithm(const char*, const char* = 0); // deprecated
|
|
|
|
const char* AddNewAlgorithms(const char*, const char* = 0); // deprecated
|
2009-02-17 10:27:49 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
void SetShape(const char*, const char*); // deprecated
|
2009-02-17 10:27:49 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
void SetHypothesis(const char*, const char*); // deprecated
|
|
|
|
void SetAlgorithms(const char*, const char*); // deprecated
|
2009-02-17 10:27:49 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
void UnSetHypothesis(const char*); // deprecated
|
2009-02-17 10:27:49 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
const char* AddSubMesh(const char*, const char*, int, const char* = 0); // deprecated
|
|
|
|
const char* AddSubMeshOnShape(const char*, const char*, const char*, int, const char* = 0); // deprecated
|
2009-02-17 10:27:49 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
void SetName(const char*, const char*); // deprecated
|
2009-02-17 10:27:49 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
void SetMeshIcon(const char*, const bool, const bool); // deprecated
|
2009-02-17 10:27:49 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
// Visualization =============================================
|
2012-10-08 17:56:59 +06:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
void display(const char*, int = 0, bool = true);
|
|
|
|
void erase(const char*, int = 0, bool = true);
|
|
|
|
void update(const char*);
|
2017-12-19 20:56:16 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
Properties properties(const char*, int = 0);
|
|
|
|
void setProperties(const char*, const Properties&, int = 0);
|
2009-02-17 10:27:49 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
bool nodesNumbering(const char*, int = 0);
|
|
|
|
void setNodesNumbering(const char*, bool, int = 0);
|
|
|
|
bool elementsNumbering(const char*, int = 0);
|
|
|
|
void setElementsNumbering(const char*, bool, int = 0);
|
2017-03-22 20:56:47 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
DisplayMode displayMode(const char*, int = 0);
|
|
|
|
void setDisplayMode(const char*, DisplayMode, int = 0);
|
2017-08-02 17:10:31 +05:00
|
|
|
|
2018-04-17 18:50:41 +05:00
|
|
|
bool shrinkMode(const char*, int = 0);
|
|
|
|
void setShrinkMode(const char*, bool, int = 0);
|
|
|
|
|
|
|
|
double opacity(const char*, int = 0);
|
|
|
|
void setOpacity(const char*, double, int = 0);
|
|
|
|
|
|
|
|
bool isOrientationShown(const char*, int = 0);
|
|
|
|
void setOrientationShown(const char*, bool, int = 0);
|
|
|
|
|
|
|
|
int entitiesShown(const char*, int = 0);
|
|
|
|
void setEntitiesShown(const char*, int, int = 0);
|
|
|
|
bool isEntityShown(const char*, EntityMode, int = 0);
|
|
|
|
void setEntityShown(const char*, EntityMode, bool, int = 0);
|
|
|
|
|
|
|
|
void CreateAndDisplayActor(const char*); // deprecated
|
|
|
|
void EraseActor(const char*, const bool = false); // deprecated
|
|
|
|
void UpdateActor(const char* Mesh_Entry); // deprecated
|
|
|
|
|
|
|
|
actorAspect GetActorAspect(const char*, int = 0); // deprecated
|
|
|
|
void SetActorAspect(const actorAspect&, const char*, int = 0); // deprecated
|
|
|
|
|
|
|
|
// Selection =================================================
|
|
|
|
|
|
|
|
SelectionMode getSelectionMode(int = 0);
|
|
|
|
void setSelectionMode(SelectionMode, int = 0);
|
|
|
|
std::vector<int> getSelected(const char*);
|
|
|
|
std::vector<std::pair<int, int> > getSelectedEdgeOfCell(const char*);
|
|
|
|
|
|
|
|
void select(const char*, std::vector<int>, bool = false);
|
|
|
|
void select(const char*, int, bool = false);
|
|
|
|
void select(const char*, std::vector<std::pair<int,int> >, bool = false);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void init();
|
2015-07-22 20:13:50 +05:00
|
|
|
|
2009-02-17 10:27:49 +05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LIBSMESH_SWIG_H
|