X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=idl%2FSMESH_BasicHypothesis.idl;h=eb46c3c788bbe3b947224249daf112153538f72e;hb=127761db37b8866d7d3125f2a3cbfbdcf2cdb740;hp=798475b30318eb0a013fc77ebdabaccfd1c90f38;hpb=7b33bc39fd54725e6444d8814129c6fffd826617;p=modules%2Fsmesh.git diff --git a/idl/SMESH_BasicHypothesis.idl b/idl/SMESH_BasicHypothesis.idl index 798475b30..eb46c3c78 100644 --- a/idl/SMESH_BasicHypothesis.idl +++ b/idl/SMESH_BasicHypothesis.idl @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // 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 -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -26,10 +26,11 @@ #ifndef _SMESH_BASICHYPOTHESIS_IDL_ #define _SMESH_BASICHYPOTHESIS_IDL_ +#include "GEOM_Gen.idl" + #include "SALOME_Exception.idl" #include "SMESH_Hypothesis.idl" #include "SMESH_Mesh.idl" - /*! * StdMeshers: interfaces to standard hypotheses and algorithms */ @@ -127,40 +128,66 @@ module StdMeshers double GetFineness(); }; + /*! + * Common interface of 1D hypotheses that can be reversed + */ + interface Reversible1D + { + /*! + * Set list of edges to reverse + */ + void SetReversedEdges( in SMESH::long_array list ); + + /*! + * Returns list of edges to reverse + */ + SMESH::long_array GetReversedEdges(); + + /*! + * Set entry of the main object + */ + void SetObjectEntry( in string entry ); + + /*! + * Get the entry of the main object + */ + string GetObjectEntry(); + }; + /*! * StdMeshers_NumberOfSegments: interface of "Nb. Segments" hypothesis */ - interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis + interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis, Reversible1D { /*! * Builds and returns point distribution according to passed density function */ - SMESH::double_array BuildDistributionExpr( in string func, in long nbSeg, in long conv ) + SMESH::double_array BuildDistributionExpr( in string func, in long nbSeg, in long conv ) raises (SALOME::SALOME_Exception); - SMESH::double_array BuildDistributionTab( in SMESH::double_array func, in long nbSeg, in long conv ) + SMESH::double_array BuildDistributionTab( in SMESH::double_array func, in long nbSeg, in long conv ) raises (SALOME::SALOME_Exception); /*! * Sets parameter value */ - void SetNumberOfSegments(in long segmentsNumber) + void SetNumberOfSegments(in SMESH::smIdType segmentsNumber) raises (SALOME::SALOME_Exception); /*! * Returns parameter value */ - long GetNumberOfSegments(); + long GetNumberOfSegments(); /*! * Sets parameter value */ - void SetDistrType(in long typ) + void SetDistrType(in long typ) raises (SALOME::SALOME_Exception); /*! * Returns parameter value */ - long GetDistrType(); + long GetDistrType(); /*! * Sets parameter value @@ -201,40 +228,20 @@ module StdMeshers /*! * Sets parameter value for functional distributions */ - void SetConversionMode(in long conv ) + void SetConversionMode(in long conv ) raises (SALOME::SALOME_Exception); /*! * Returns parameter value for functional distributions */ - long ConversionMode() + long ConversionMode() raises (SALOME::SALOME_Exception); - - /*! - * Set list of edges to reverse - */ - void SetReversedEdges( in SMESH::long_array list ); - - /*! - * Returns list of edges to reverse - */ - SMESH::long_array GetReversedEdges(); - - /*! - * Set entry of the main object - */ - void SetObjectEntry( in string entry ); - - /*! - * Get the entry of the main object - */ - string GetObjectEntry(); }; /*! * StdMeshers_Arithmetic1D: interface of "Arithmetic 1D" hypothesis */ - interface StdMeshers_Arithmetic1D : SMESH::SMESH_Hypothesis + interface StdMeshers_Arithmetic1D : SMESH::SMESH_Hypothesis, Reversible1D { /*! * Sets or parameter value @@ -260,26 +267,36 @@ module StdMeshers * Returns or parameter value */ double GetLength(in boolean isStartLength); - + + }; + + /*! + * StdMeshers_Arithmetic1D: interface of "Geometric 1D" hypothesis + */ + interface StdMeshers_Geometric1D : SMESH::SMESH_Hypothesis, Reversible1D + { /*! - * Set list of edges to reverse + * Sets length of the first segment */ - void SetReversedEdges( in SMESH::long_array list ); - + void SetStartLength(in double length) + raises (SALOME::SALOME_Exception); + /*! - * Returns list of edges to reverse + * Sets value of Common Ratio */ - SMESH::long_array GetReversedEdges(); - + void SetCommonRatio(in double factor) + raises (SALOME::SALOME_Exception); + /*! - * Set entry of the main object + * Returns length of the first segment */ - void SetObjectEntry( in string entry ); - + double GetStartLength(); + /*! - * Get the entry of the main object + * Returns value of Common Ratio */ - string GetObjectEntry(); + double GetCommonRatio(); + }; /*! @@ -307,19 +324,19 @@ module StdMeshers /*! * Sets parameter value */ - void SetMode(in long mode) + void SetMode(in long mode) raises (SALOME::SALOME_Exception); /*! * Returns parameter value */ - long GetMode(); + long GetMode(); }; /*! * StdMeshers_StartEndLength: interface of "Start and End Length" hypothesis */ - interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis + interface StdMeshers_StartEndLength : SMESH::SMESH_Hypothesis, Reversible1D { /*! * Sets or parameter value @@ -346,25 +363,6 @@ module StdMeshers */ double GetLength(in boolean isStartLength); - /*! - * Set list of edges to reverse - */ - void SetReversedEdges( in SMESH::long_array list ); - - /*! - * Returns list of edges to reverse - */ - SMESH::long_array GetReversedEdges(); - - /*! - * Set entry of the main object - */ - void SetObjectEntry( in string entry ); - - /*! - * Get the entry of the main object - */ - string GetObjectEntry(); }; @@ -388,7 +386,7 @@ module StdMeshers /*! * StdMeshers_FixedPoints1D: interface of "Fixed points 1D" hypothesis */ - interface StdMeshers_FixedPoints1D : SMESH::SMESH_Hypothesis + interface StdMeshers_FixedPoints1D : SMESH::SMESH_Hypothesis, Reversible1D { /*! * Sets some points on edge using parameter on curve from 0 to 1 @@ -398,7 +396,7 @@ module StdMeshers */ void SetPoints(in SMESH::double_array listParams) raises (SALOME::SALOME_Exception); - void SetNbSegments(in SMESH::long_array listNbSeg) + void SetNbSegments(in SMESH::smIdType_array listNbSeg) raises (SALOME::SALOME_Exception); /*! @@ -409,27 +407,8 @@ module StdMeshers /*! * Returns list of numbers of segments */ - SMESH::long_array GetNbSegments(); - - /*! - * Set list of edges to reverse - */ - void SetReversedEdges( in SMESH::long_array list ); - - /*! - * Returns list of edges to reverse - */ - SMESH::long_array GetReversedEdges(); - - /*! - * Set entry of the main object - */ - void SetObjectEntry( in string entry ); - - /*! - * Get the entry of the main object - */ - string GetObjectEntry(); + SMESH::smIdType_array GetNbSegments(); + }; /*! @@ -483,7 +462,8 @@ module StdMeshers }; /*! - * StdMeshers_Propagation: interface of "Propagation" hypothesis. + * StdMeshers_Propagation: interface of "Propagation of 1D Hyp. on + * Opposite Edges" hypothesis. * Presence of this hypothesis on any edge propagates any other 1D * hypothesis from this edge on all edges, opposite to it. * It concerns only edges of quadrangle faces. @@ -492,6 +472,17 @@ module StdMeshers { }; + /*! + * StdMeshers_Propagation: interface of "Propagation of Node + * Distribution on Opposite Edges" hypothesis. + * Presence of this hypothesis on any edge propagates distribution of nodes + * from this edge on all edges, opposite to it. + * It concerns only edges of quadrangle faces. + */ + interface StdMeshers_PropagOfDistribution : SMESH::SMESH_Hypothesis + { + }; + /*! * StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis. * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm. @@ -529,13 +520,13 @@ module StdMeshers /*! * Sets parameter value */ - void SetNumberOfLayers(in long numberOfLayers) + void SetNumberOfLayers(in long numberOfLayers) raises (SALOME::SALOME_Exception); /*! * Returns parameter value */ - long GetNumberOfLayers(); + long GetNumberOfLayers(); }; @@ -675,7 +666,7 @@ module StdMeshers * Result may be nil if association not set. * Valid indices are 1 and 2 */ - GEOM::GEOM_Object GetSourceVertex(in long i) + GEOM::GEOM_Object GetSourceVertex(in long i) raises (SALOME::SALOME_Exception); /*! @@ -683,7 +674,7 @@ module StdMeshers * Result may be nil if association not set. * Valid indices are 1 and 2 */ - GEOM::GEOM_Object GetTargetVertex(in long i) + GEOM::GEOM_Object GetTargetVertex(in long i) raises (SALOME::SALOME_Exception); }; @@ -732,7 +723,7 @@ module StdMeshers * Result may be nil if association not set. * Valid indices are 1 and 2 */ - GEOM::GEOM_Object GetSourceVertex(in long i) + GEOM::GEOM_Object GetSourceVertex(in long i) raises (SALOME::SALOME_Exception); /*! @@ -740,7 +731,7 @@ module StdMeshers * Result may be nil if association not set. * Valid indices are 1 and 2 */ - GEOM::GEOM_Object GetTargetVertex(in long i) + GEOM::GEOM_Object GetTargetVertex(in long i) raises (SALOME::SALOME_Exception); }; @@ -781,12 +772,12 @@ module StdMeshers /*! * Set base vertex for triangles */ - void SetTriaVertex( in long vertID ); + void SetTriaVertex( in long vertID ); /*! * Returns base vertex for triangles */ - long GetTriaVertex(); + long GetTriaVertex(); /*! * Set entry of the main object @@ -807,6 +798,32 @@ module StdMeshers * Get the type of quadrangulation */ QuadType GetQuadType(); + + /*! + * Set positions of enforced nodes + */ + void SetEnforcedNodes(in GEOM::ListOfGO vertices, in SMESH::nodes_array points) + raises (SALOME::SALOME_Exception); + + /*! + * Returns positions of enforced nodes + */ + void GetEnforcedNodes(out GEOM::ListOfGO vertices, out SMESH::nodes_array points); + + /*! + * Returns entries of shapes defining enforced nodes + */ + SMESH::string_array GetEnfVertices(); + + /*! + * Set corner vertices + */ + void SetCorners( in SMESH::long_array vertexIDs ); + + /*! + * Return IDs of corner vertices + */ + SMESH::long_array GetCorners(); }; /*! @@ -851,11 +868,26 @@ module StdMeshers void GetCopySourceMesh(out boolean toCopyMesh,out boolean toCopyGroups); }; + /*! + * Method of computing translation of a node at Viscous Layers construction + */ + enum VLExtrusionMethod { + // node is translated along normal to a surface with possible further smoothing + SURF_OFFSET_SMOOTH, + // node is translated along the average normal of surrounding faces till + // intersection with a neighbor face translated along its own normal + // by the layers thickness + FACE_OFFSET, + // node is translated along the average normal of surrounding faces + // by the layers thickness + NODE_OFFSET + }; + /*! * interface of "Viscous Layers" hypothesis. * This hypothesis specifies parameters of layers of prisms to build * near mesh boundary. This hypothesis can be used by several 3D algorithms: - * NETGEN 3D, GHS3D, Hexahedron(i,j,k) + * NETGEN 3D, Hexahedron(i,j,k), MG_Tetra */ interface StdMeshers_ViscousLayers : SMESH::SMESH_Hypothesis { @@ -865,6 +897,14 @@ module StdMeshers void SetIgnoreFaces(in SMESH::long_array faceIDs) raises (SALOME::SALOME_Exception); SMESH::long_array GetIgnoreFaces(); + /*! + * Set faces either to exclude from treatment or to make the Viscous Layers on. + */ + void SetFaces(in SMESH::long_array faceIDs, + in boolean toIgnore) raises (SALOME::SALOME_Exception); + SMESH::long_array GetFaces(); + boolean GetIsToIgnoreFaces(); + /*! * Set total thickness of layers of prisms */ @@ -878,17 +918,23 @@ module StdMeshers short GetNumberLayers(); /*! - * Set factor (>1.0) of growth of layer thickness towards inside of mesh + * Set factor (>=1.0) of growth of layer thickness towards inside of mesh */ void SetStretchFactor(in double factor) raises (SALOME::SALOME_Exception); double GetStretchFactor(); + + void SetMethod( in VLExtrusionMethod how ); + VLExtrusionMethod GetMethod(); + + void SetGroupName(in string name); + string GetGroupName(); }; /*! * interface of "Viscous Layers 2D" hypothesis. * This hypothesis specifies parameters of layers of quadrilaterals to build * near mesh boundary. This hypothesis can be used by several 2D algorithms: - * Mefisto, Quadrangle (mapping), NETGEN, BLSURF + * Quadrangle (mapping), NETGEN, BLSURF */ interface StdMeshers_ViscousLayers2D : SMESH::SMESH_Hypothesis { @@ -919,24 +965,28 @@ module StdMeshers short GetNumberLayers(); /*! - * Set factor (>1.0) of growth of layer thickness towards inside of mesh + * Set factor (>=1.0) of growth of layer thickness towards inside of mesh */ void SetStretchFactor(in double factor) raises (SALOME::SALOME_Exception); double GetStretchFactor(); + + void SetGroupName(in string name); + string GetGroupName(); }; /*! * interface of "Body fitting Parameters" hypothesis. * This hypothesis specifies - * - Definition of the Cartesian grid * - Size threshold + * - Definition of the Cartesian grid + * - Direction of grid axes */ interface StdMeshers_CartesianParameters3D : SMESH::SMESH_Hypothesis { /*! * Set size threshold. A polyhedral cell got by cutting an initial * hexahedron by geometry boundary is considered small and is removed if - * it's size is \athreshold times less than the size of the initial hexahedron. + * it's size is \a threshold times less than the size of the initial hexahedron. * threshold must be > 1.0 */ void SetSizeThreshold(in double threshold) raises (SALOME::SALOME_Exception); @@ -951,8 +1001,8 @@ module StdMeshers /*! * Set coordinates of nodes along an axis (countered from zero) */ - void SetGrid(in SMESH::double_array coords, - in short axis) raises (SALOME::SALOME_Exception); + void SetGrid(in SMESH::double_array coords, + in short axis) raises (SALOME::SALOME_Exception); SMESH::double_array GetGrid(in short axis) raises (SALOME::SALOME_Exception); /*! @@ -961,8 +1011,8 @@ module StdMeshers * \param internalPoints - points dividing a grid into parts along an axis * \param axis - index of an axis counterd from zero, i.e. 0==X, 1==Y, 2==Z * - * Parameter t of spaceFunction f(t) is a position [0,1] withing bounding box of - * the shape to mesh or withing an interval defined by internal points + * Parameter t of spaceFunction f(t) is a position [0,1] within bounding box of + * the shape to mesh or within an interval defined by internal points */ void SetGridSpacing(in SMESH::string_array spaceFunctions, in SMESH::double_array internalPoints, @@ -971,20 +1021,101 @@ module StdMeshers void GetGridSpacing(out SMESH::string_array spaceFunctions, out SMESH::double_array internalPoints, in short axis) raises (SALOME::SALOME_Exception); + /*! + * Set custom direction of axes + */ + void SetAxesDirs(in SMESH::DirStruct x, + in SMESH::DirStruct y, + in SMESH::DirStruct z ) raises (SALOME::SALOME_Exception); + void GetAxesDirs(out SMESH::DirStruct x, + out SMESH::DirStruct y, + out SMESH::DirStruct z ); + /*! + * Set/unset a fixed point, at which a node will be created provided that grid + * is defined by spacing in all directions + */ + void SetFixedPoint(in SMESH::PointStruct p, in boolean toUnset); + boolean GetFixedPoint(out SMESH::PointStruct p); + + /*! + * Enable implementation of geometrical edges into the mesh. If this feature + * is disabled, sharp edges of the shape are lost ("smoothed") in the mesh if + * they don't coincide with the grid lines + */ + void SetToAddEdges(in boolean toAdd); + boolean GetToAddEdges(); + + /*! + * Enable treatment of geom faces, either shared by solids or internal. + */ + void SetToConsiderInternalFaces(in boolean toTreat); + boolean GetToConsiderInternalFaces(); + + /*! + * Enable applying size threshold to grid cells cut by internal geom faces. + */ + void SetToUseThresholdForInternalFaces(in boolean toUse); + boolean GetToUseThresholdForInternalFaces(); /*! - * \brief Computes node coordinates by spacing functions + * Enable creation of mesh faces. + */ + void SetToCreateFaces(in boolean toCreate); + boolean GetToCreateFaces(); + + /*! + * Enable creation of mesh faces. + */ + void SetToUseQuanta(in boolean toUseQuanta); + boolean GetToUseQuanta(); + + void SetQuanta(in double quanta) raises (SALOME::SALOME_Exception); + double GetQuanta(); + + /*! + * Return axes at which a number of generated hexahedra is maximal + */ + void ComputeOptimalAxesDirs(in GEOM::GEOM_Object shape, + in boolean isOrthogonal, + out SMESH::DirStruct x, + out SMESH::DirStruct y, + out SMESH::DirStruct z ) + raises (SALOME::SALOME_Exception); + + /*! + * \brief Compute node coordinates by spacing functions * \param x0 - lower coordinate * \param x1 - upper coordinate * \param spaceFuns - space functions * \param points - internal points - * \param coords - the computed coordinates + * \param axisName - e.g. "X" + * \return the computed coordinates */ SMESH::double_array ComputeCoordinates(in double x0, in double x1, in SMESH::string_array spaceFuns, in SMESH::double_array points, - in string axisName ) raises (SALOME::SALOME_Exception); + in string axisName ) + raises (SALOME::SALOME_Exception); + }; + + + /*! + * interface of "Renumber" hypothesis used by Hexahedron(ijk) algorithm + * to renumber mesh of a block to be structured-like + */ + struct BlockCS // Local coordinate system of a block + { + GEOM::GEOM_Object solid; + GEOM::GEOM_Object vertex000; + GEOM::GEOM_Object vertex001; + }; + typedef sequence blockcs_array; + + interface StdMeshers_BlockRenumber : SMESH::SMESH_Hypothesis + { + void SetBlocksOrientation( in blockcs_array blockCS ); + blockcs_array GetBlocksOrientation(); }; /*! @@ -1009,16 +1140,30 @@ module StdMeshers }; /*! - * StdMeshers_MEFISTO_2D: interface of "Triangle (Mefisto)" algorithm + * StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm */ - interface StdMeshers_MEFISTO_2D : SMESH::SMESH_2D_Algo + interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo { }; /*! - * StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm + * StdMeshers_QuadFromMedialAxis_1D2D: interface of "Quadrangle (Medial Axis Projection)" algorithm */ - interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo + interface StdMeshers_QuadFromMedialAxis_1D2D : SMESH::SMESH_2D_Algo + { + }; + + /*! + * StdMeshers_PolygonPerFace_2D: interface of "Polygon Per Face" 2D algorithm + */ + interface StdMeshers_PolygonPerFace_2D : SMESH::SMESH_2D_Algo + { + }; + + /*! + * StdMeshers_PolyhedronPerSolid_3D: interface of "Polyhedron Per Solid" 3D algorithm + */ + interface StdMeshers_PolyhedronPerSolid_3D : SMESH::SMESH_3D_Algo { }; @@ -1112,6 +1257,39 @@ module StdMeshers interface StdMeshers_Cartesian_3D : SMESH::SMESH_3D_Algo { }; + /*! + * StdMeshers_Cartesian_3D: interface of "ViscousLayerBuilder" algorithm + */ + interface StdMeshers_ViscousLayerBuilder : SMESH::SMESH_2D_Algo + { + /*! + * Set faces to exclude from the definition of face to shrink + */ + void SetIgnoreFaces(in SMESH::long_array faceIDs) raises (SALOME::SALOME_Exception); + // SMESH::long_array GetIgnoreFaces(); + + /*! + * Set faces either to exclude from treatment or to make the offset geometry on. + */ + void SetFaces(in SMESH::long_array faceIDs, + in boolean toIgnore) raises (SALOME::SALOME_Exception); + // SMESH::long_array GetFaces(); + // boolean GetIsToIgnoreFaces(); + + void SetTotalThickness(in double thickness) raises (SALOME::SALOME_Exception); + void SetNumberLayers(in short numberOfLayers ) raises (SALOME::SALOME_Exception); + void SetStretchFactor(in double strechFactor ) raises (SALOME::SALOME_Exception); + void SetMethod( in VLExtrusionMethod how ) raises (SALOME::SALOME_Exception); + void SetGroupName(in string name) raises (SALOME::SALOME_Exception); + + GEOM::GEOM_Object GetShrinkGeometry( in SMESH::SMESH_Mesh finalMesh, in GEOM::GEOM_Object theObject ) raises (SALOME::SALOME_Exception); + + /*! + * Build the prismatic layer from the shrink mesh + */ + boolean AddLayers( in SMESH::SMESH_Mesh sourceMesh, in SMESH::SMESH_Mesh finalMesh, in GEOM::GEOM_Object theObject ) raises (SALOME::SALOME_Exception); + + }; };