Back to index

salome-geom  6.5.0
Defines | Functions
GEOM_Function.cxx File Reference
#include <Standard_Stream.hxx>
#include <GEOM_Function.hxx>
#include <GEOM_Object.hxx>
#include <GEOM_Solver.hxx>
#include <GEOM_ISubShape.hxx>
#include <Basics_OCCTVersion.hxx>
#include "utilities.h"
#include <TDF.hxx>
#include <TDF_Tool.hxx>
#include <TDF_Data.hxx>
#include <TDF_ChildIterator.hxx>
#include <TDF_Reference.hxx>
#include <TDataStd_Integer.hxx>
#include <TDataStd_IntegerArray.hxx>
#include <TDataStd_Real.hxx>
#include <TDataStd_RealArray.hxx>
#include <TDataStd_Comment.hxx>
#include <TDataStd_TreeNode.hxx>
#include <TDataStd_UAttribute.hxx>
#include <TDataStd_ChildNodeIterator.hxx>
#include <TDataStd_ExtStringArray.hxx>
#include <TDataStd_ExtStringList.hxx>
#include <TDocStd_Owner.hxx>
#include <TDocStd_Document.hxx>
#include <TFunction_Function.hxx>
#include <TNaming_NamedShape.hxx>
#include <TNaming_Builder.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx>

Go to the source code of this file.

Defines

#define KEEP_ORIENTATION_0021251
#define ARGUMENT_LABEL   1
#define RESULT_LABEL   2
#define DESCRIPTION_LABEL   3
#define HISTORY_LABEL   4
#define SUBSHAPES_LABEL   5
#define NAMING_LABEL   6
#define ORIENTATION_LABEL   7
#define ARGUMENTS   _label.FindChild((ARGUMENT_LABEL))
#define ARGUMENT(thePosition)   _label.FindChild((ARGUMENT_LABEL)).FindChild((thePosition))
#define SUB_ARGUMENT(thePos1, thePos2)   _label.FindChild((ARGUMENT_LABEL)).FindChild((thePos1)).FindChild((thePos2))

Functions

 Handle (GEOM_Function) GEOM_Function
 GetFunction:
 Handle (TColStd_HArray1OfReal) GEOM_Function
 GetRealArray.
 Handle (TColStd_HArray1OfInteger) GEOM_Function
 GetIntegerArray.
 Handle (TColStd_HArray1OfExtendedString) GEOM_Function
 GetStringArray.
 Handle (TColStd_HSequenceOfTransient) GEOM_Function
 GetReferenceList.
Standard_EXPORT
Handle_Standard_Type & 
GEOM_Function_Type_ ()

Define Documentation

#define ARGUMENT (   thePosition)    _label.FindChild((ARGUMENT_LABEL)).FindChild((thePosition))

Definition at line 83 of file GEOM_Function.cxx.

#define ARGUMENT_LABEL   1

Definition at line 71 of file GEOM_Function.cxx.

#define ARGUMENTS   _label.FindChild((ARGUMENT_LABEL))

Definition at line 82 of file GEOM_Function.cxx.

#define DESCRIPTION_LABEL   3

Definition at line 73 of file GEOM_Function.cxx.

#define HISTORY_LABEL   4

Definition at line 74 of file GEOM_Function.cxx.

Definition at line 69 of file GEOM_Function.cxx.

#define NAMING_LABEL   6

Definition at line 76 of file GEOM_Function.cxx.

#define ORIENTATION_LABEL   7

Definition at line 79 of file GEOM_Function.cxx.

#define RESULT_LABEL   2

Definition at line 72 of file GEOM_Function.cxx.

#define SUB_ARGUMENT (   thePos1,
  thePos2 
)    _label.FindChild((ARGUMENT_LABEL)).FindChild((thePos1)).FindChild((thePos2))

Definition at line 84 of file GEOM_Function.cxx.

#define SUBSHAPES_LABEL   5

Definition at line 75 of file GEOM_Function.cxx.


Function Documentation

Standard_EXPORT Handle_Standard_Type& GEOM_Function_Type_ ( )

Definition at line 838 of file GEOM_Function.cxx.

{

  static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared);
  if (aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
  static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
  if (aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);

  static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
  static Handle_Standard_Type _aType = new Standard_Type("GEOM_Function",
                                                         sizeof(GEOM_Function),
                                                         1,
                                                         (Standard_Address)_Ancestors,
                                                         (Standard_Address)NULL);

  return _aType;
}

Here is the call graph for this function:

GetFunction:

GetlastFunction.

GetFunction.

GetReference.

Definition at line 112 of file GEOM_Function.cxx.

{
  if(!theEntry.IsAttribute(TFunction_Function::GetID())) return NULL;

  return new GEOM_Function(theEntry);
}
Handle ( TColStd_HArray1OfReal  )

GetRealArray.

Definition at line 385 of file GEOM_Function.cxx.

{
  _isDone = false;
  if(thePosition <= 0) return NULL;
  Handle(TDataStd_RealArray) aRealArray;
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  if(!anArgLabel.FindAttribute(TDataStd_RealArray::GetID(), aRealArray)) return NULL;

  _isDone = true;
  return aRealArray->Array();
}

Here is the call graph for this function:

Handle ( TColStd_HArray1OfInteger  )

GetIntegerArray.

Definition at line 450 of file GEOM_Function.cxx.

{
  _isDone = false;
  if(thePosition <= 0) return 0;
  Handle(TDataStd_IntegerArray) anIntegerArray;
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  if(!anArgLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anIntegerArray)) return 0;

  _isDone = true;
  return anIntegerArray->Array();
}
Handle ( TColStd_HArray1OfExtendedString  )

GetStringArray.

Definition at line 554 of file GEOM_Function.cxx.

{
  _isDone = false;
  if(thePosition <= 0) return NULL;
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  Handle(TDataStd_ExtStringArray) anArray;
  if(!anArgLabel.FindAttribute(TDataStd_ExtStringArray::GetID(), anArray)) return NULL;

  _isDone = true;
  return anArray->Array();
}

Here is the call graph for this function:

Handle ( TColStd_HSequenceOfTransient  )

GetReferenceList.

Find sub-shapes complying with given status about quadrangle.

GetShapesOnSphere.

GetShapesOnCylinderWithLocation.

GetShapesOnCylinder.

GetShapesOnPlaneWithLocation.

GetShapesOnPlane.

Find shape objects and their entries by their ids.

Find sub-shapes complying with given status about surface.

MakeSubShapes.

MakeExplode.

GetExistingSubObjects.

Propagate.

GetBlocksByParts.

MakePipeTShapeFilletWithPosition.

MakePipeTShapeFillet Create a T-shape object with specified caracteristics for the main and the incident pipes (radius, width, half-length).

MakePipeTShapeChamferWithPosition Create a T-shape object with specified caracteristics for the main and the incident pipes (radius, width, half-length).

MakePipeTShapeChamfer Create a T-shape object with specified caracteristics for the main and the incident pipes (radius, width, half-length).

MakePipeTShapeWithPosition Create a T-shape object with specified caracteristics for the main and the incident pipes (radius, width, half-length).

GetLastDependency.

The extremities of the main pipe are located on junctions points P1 and P2. The extremity of the incident pipe is located on junction point P3.

Parameters:
theR1Internal radius of main pipe
theW1Width of main pipe
theL1Half-length of main pipe
theR2Internal radius of incident pipe (R2 < R1)
theW2Width of incident pipe (R2+W2 < R1+W1)
theL2Half-length of incident pipe
theHexMeshBoolean indicating if shape is prepared for hex mesh
theP11st junction point of main pipe
theP22nd junction point of main pipe
theP3Junction point of incident pipe
Returns:
List of GEOM_Objects, containing the created shape and propagation groups..

A chamfer is created on the junction of the pipes. Center of the shape is (0,0,0). The main plane of the T-shape is XOY.

Parameters:
theR1Internal radius of main pipe
theW1Width of main pipe
theL1Half-length of main pipe
theR2Internal radius of incident pipe (R2 < R1)
theW2Width of incident pipe (R2+W2 < R1+W1)
theL2Half-length of incident pipe
theHHeight of chamfer.
theWWidth of chamfer.
theHexMeshBoolean indicating if shape is prepared for hex mesh
Returns:
List of GEOM_Objects, containing the created shape and propagation groups.

A chamfer is created on the junction of the pipes. The extremities of the main pipe are located on junctions points P1 and P2. The extremity of the incident pipe is located on junction point P3.

Parameters:
theR1Internal radius of main pipe
theW1Width of main pipe
theL1Half-length of main pipe
theR2Internal radius of incident pipe (R2 < R1)
theW2Width of incident pipe (R2+W2 < R1+W1)
theL2Half-length of incident pipe
theHHeight of chamfer.
theWWidth of chamfer.
theHexMeshBoolean indicating if shape is prepared for hex mesh
theP11st junction point of main pipe
theP22nd junction point of main pipe
theP3Junction point of incident pipe
Returns:
List of GEOM_Objects, containing the created shape and propagation groups.

A fillet is created on the junction of the pipes. Center of the shape is (0,0,0). The main plane of the T-shape is XOY.

Parameters:
theR1Internal radius of main pipe
theW1Width of main pipe
theL1Half-length of main pipe
theR2Internal radius of incident pipe (R2 < R1)
theW2Width of incident pipe (R2+W2 < R1+W1)
theL2Half-length of incident pipe
theRFRadius of curvature of fillet.
theHexMeshBoolean indicating if shape is prepared for hex mesh
Returns:
List of GEOM_Objects, containing the created shape and propagation groups.

Create a T-shape object with specified caracteristics for the main and the incident pipes (radius, width, half-length). A fillet is created on the junction of the pipes. The extremities of the main pipe are located on junctions points P1 and P2. The extremity of the incident pipe is located on junction point P3.

Parameters:
theR1Internal radius of main pipe
theW1Width of main pipe
theL1Half-length of main pipe
theR2Internal radius of incident pipe (R2 < R1)
theW2Width of incident pipe (R2+W2 < R1+W1)
theL2Half-length of incident pipe
theRFRadius of curvature of fillet
theHexMeshBoolean indicating if shape is prepared for hex mesh
theP11st junction point of main pipe
theP22nd junction point of main pipe
theP3Junction point of incident pipe
Returns:
List of GEOM_Objects, containing the created shape and propagation groups.
Parameters:
theBox- the box to check state of sub-shapes against
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theState- required state
Return values:
Handle(TColStd_HSequenceOfTransient)- found sub-shapes
Parameters:
theCheckShape- the shape to check state of sub-shapes against
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theState- required state
Return values:
Handle(TColStd_HSequenceOfTransient)- found sub-shapes
Parameters:
theShapeIDs- incoming shape ids
theShapeEntries- outgoing entries like "entry1, entry2, ..."
Return values:
Handle(TColStd_HSequenceOfTransient)- found shape objects
Parameters:
theSurface- the surface to check state of sub-shapes against
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theState- required state
theShapeEntries- outgoing entries like "entry1, entry2, ..."
Return values:
Handle(TColStd_HSequenceOfInteger)- IDs of found sub-shapes
Parameters:
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theTopLeftPoint- top left quadrangle corner
theTopRigthPoint- top right quadrangle corner
theBottomLeftPoint- bottom left quadrangle corner
theBottomRigthPoint- bottom right quadrangle corner
theState- required state
Return values:
Handle(TColStd_HSequenceOfInteger)- IDs of found sub-shapes

Definition at line 619 of file GEOM_Function.cxx.

{
  Handle(TColStd_HSequenceOfTransient) aResult = new TColStd_HSequenceOfTransient;
  _isDone = false;
  if(thePosition <= 0) return aResult;

  // parent label for the list of references
  TDF_Label anArgLabel = ARGUMENT(thePosition);
  Handle(TDF_Reference) aRef;

  // get TreeNode on the parent label
  Handle(TDataStd_TreeNode) aRoot, aNode;
  if(!anArgLabel.FindAttribute(GetReferencesTreeID(), aRoot))
    return aResult;

  // get references, stored on sub-labels of the parent label
  TDF_Label aLabel_i;
  TDataStd_ChildNodeIterator anIter (aRoot);
  for (; anIter.More(); anIter.Next()) {
    aNode = anIter.Value();
    aLabel_i = aNode->Label();
    if (!aLabel_i.FindAttribute(TDF_Reference::GetID(), aRef)) continue;
    Handle(GEOM_Function) aFunc_i = GetFunction(aRef->Get());
    if (aFunc_i.IsNull()) continue;
    aResult->Append(aFunc_i);
  }

  _isDone = true;
  return aResult;
}

Here is the call graph for this function: