Open CASCADE Technology 6.6.0
Public Member Functions | Static Public Member Functions
TDataXtd_Constraint Class Reference

The groundwork to define constraint attributes.
The constraint attribute contains the following sorts of data:
More...

#include <TDataXtd_Constraint.hxx>

Inheritance diagram for TDataXtd_Constraint:
Inheritance graph
[legend]

Public Member Functions

 TDataXtd_Constraint ()
void Set (const TDataXtd_ConstraintEnum type, const Handle< TNaming_NamedShape > &G1)
 Finds or creates the constraint attribute defined
by the topological attribute G1 and the constraint type type.

void Set (const TDataXtd_ConstraintEnum type, const Handle< TNaming_NamedShape > &G1, const Handle< TNaming_NamedShape > &G2)
 Finds or creates the constraint attribute defined
by the topological attributes G1 and G2, and by
the constraint type type.

void Set (const TDataXtd_ConstraintEnum type, const Handle< TNaming_NamedShape > &G1, const Handle< TNaming_NamedShape > &G2, const Handle< TNaming_NamedShape > &G3)
 Finds or creates the constraint attribute defined
by the topological attributes G1, G2 and G3, and
by the constraint type type.

void Set (const TDataXtd_ConstraintEnum type, const Handle< TNaming_NamedShape > &G1, const Handle< TNaming_NamedShape > &G2, const Handle< TNaming_NamedShape > &G3, const Handle< TNaming_NamedShape > &G4)
 Finds or creates the constraint attribute defined
by the topological attributes G1, G2, G3 and G4,
and by the constraint type type.
//! methods to read constraint fields
=================================

Standard_Boolean Verified () const
 Returns true if this constraint attribute is valid.
By default, true is returned.
When the value of a dimension is changed or
when a geometry is moved, false is returned
until the solver sets it back to true.

TDataXtd_ConstraintEnum GetType () const
 Returns the type of constraint.
This will be an element of the
TDataXtd_ConstraintEnum enumeration.

Standard_Boolean IsPlanar () const
 Returns true if this constraint attribute is
two-dimensional.

const Handle_TNaming_NamedShape & GetPlane () const
 Returns the topological attribute of the plane
used for planar - i.e., 2D - constraints.
This plane is attached to another label.
If the constraint is not planar, in other words, 3D,
this function will return a null handle.

Standard_Boolean IsDimension () const
 Returns true if this constraint attribute is a
dimension, and therefore has a value.

const Handle_TDataStd_Real & GetValue () const
 Returns the value of a dimension.
This value is a reference to a TDataStd_Real attribute.
If the attribute is not a dimension, this value will
be 0. Use IsDimension to test this condition.

Standard_Integer NbGeometries () const
 Returns the number of geometry attributes in this constraint attribute.
This number will be between 1 and 4.

Handle_TNaming_NamedShape GetGeometry (const Standard_Integer Index) const
 Returns the integer index Index used to access
the array of the constraint or stored geometries of a dimension
Index has a value between 1 and 4.
//! methods to write constraint fields (use builder)
==================================

void ClearGeometries ()
 Removes the geometries involved in the
constraint or dimension from the array of
topological attributes where they are stored.

void SetType (const TDataXtd_ConstraintEnum CTR)
 Finds or creates the type of constraint CTR.

void SetPlane (const Handle< TNaming_NamedShape > &plane)
 Finds or creates the plane of the 2D constraint
attribute, defined by the planar topological attribute plane.

void SetValue (const Handle< TDataStd_Real > &V)
 Finds or creates the real number value V of the dimension constraint attribute.

void SetGeometry (const Standard_Integer Index, const Handle< TNaming_NamedShape > &G)
 Finds or creates the underlying geometry of the
constraint defined by the topological attribute G
and the integer index Index.

void Verified (const Standard_Boolean status)
 Returns true if this constraint attribute defined by status is valid.
By default, true is returned.
When the value of a dimension is changed or
when a geometry is moved, false is returned until
the solver sets it back to true.
If status is false, Verified is set to false.

void Inverted (const Standard_Boolean status)
Standard_Boolean Inverted () const
void Reversed (const Standard_Boolean status)
Standard_Boolean Reversed () const
const Standard_GUIDID () const
 Returns the ID of the attribute.


void Restore (const Handle< TDF_Attribute > &With)
 Restores the backuped contents from <anAttribute>
into this one. It is used when aborting a
transaction.

Handle_TDF_Attribute NewEmpty () const
 Returns an new empty attribute from the good end
type. It is used by the copy algorithm.

void Paste (const Handle< TDF_Attribute > &Into, const Handle< TDF_RelocationTable > &RT) const
 This method is different from the "Copy" one,
because it is used when copying an attribute from
a source structure into a target structure. This
method may paste the contents of <me> into
<intoAttribute>.

The given pasted attribute can be full or empty of
its contents. But don't make a NEW! Just set the
contents!

It is possible to use <aRelocationTable> to
get/set the relocation value of a source
attribute.

virtual Standard_OStreamDump (Standard_OStream &anOS) const
 Dumps the minimum information about <me> on
<aStream>.


virtual void References (const Handle< TDF_DataSet > &DS) const
 Adds the first level referenced attributes and labels
to <aDataSet>.

For this, use the AddLabel or AddAttribute of
DataSet.

If there is none, do not implement the method.

Static Public Member Functions

static const Standard_GUIDGetID ()
 Returns the GUID for constraints.

static Handle_TDataXtd_Constraint Set (const TDF_Label &label)
 Finds or creates the 2D constraint attribute
defined by the planar topological attribute plane
and the label label.
//! Constraint methods
==================

static void CollectChildConstraints (const TDF_Label &aLabel, TDF_LabelList &TheList)
 collects constraints on Childs for label <aLabel>


Detailed Description


Constructor & Destructor Documentation

TDataXtd_Constraint::TDataXtd_Constraint ( )

Member Function Documentation

void TDataXtd_Constraint::ClearGeometries ( )
static void TDataXtd_Constraint::CollectChildConstraints ( const TDF_Label aLabel,
TDF_LabelList TheList 
) [static]
virtual Standard_OStream& TDataXtd_Constraint::Dump ( Standard_OStream anOS) const [virtual]

Reimplemented from TDF_Attribute.

Handle_TNaming_NamedShape TDataXtd_Constraint::GetGeometry ( const Standard_Integer  Index) const
static const Standard_GUID& TDataXtd_Constraint::GetID ( ) [static]
const Handle_TNaming_NamedShape& TDataXtd_Constraint::GetPlane ( ) const
TDataXtd_ConstraintEnum TDataXtd_Constraint::GetType ( ) const
const Handle_TDataStd_Real& TDataXtd_Constraint::GetValue ( ) const
const Standard_GUID& TDataXtd_Constraint::ID ( ) const [virtual]

Implements TDF_Attribute.

void TDataXtd_Constraint::Inverted ( const Standard_Boolean  status)
Standard_Boolean TDataXtd_Constraint::Inverted ( ) const
Standard_Boolean TDataXtd_Constraint::IsDimension ( ) const
Standard_Boolean TDataXtd_Constraint::IsPlanar ( ) const
Standard_Integer TDataXtd_Constraint::NbGeometries ( ) const
Handle_TDF_Attribute TDataXtd_Constraint::NewEmpty ( ) const [virtual]

Implements TDF_Attribute.

void TDataXtd_Constraint::Paste ( const Handle< TDF_Attribute > &  intoAttribute,
const Handle< TDF_RelocationTable > &  aRelocationTable 
) const [virtual]

Implements TDF_Attribute.

virtual void TDataXtd_Constraint::References ( const Handle< TDF_DataSet > &  aDataSet) const [virtual]

Reimplemented from TDF_Attribute.

void TDataXtd_Constraint::Restore ( const Handle< TDF_Attribute > &  anAttribute) [virtual]

Implements TDF_Attribute.

void TDataXtd_Constraint::Reversed ( const Standard_Boolean  status)
Standard_Boolean TDataXtd_Constraint::Reversed ( ) const
void TDataXtd_Constraint::Set ( const TDataXtd_ConstraintEnum  type,
const Handle< TNaming_NamedShape > &  G1,
const Handle< TNaming_NamedShape > &  G2,
const Handle< TNaming_NamedShape > &  G3 
)
void TDataXtd_Constraint::Set ( const TDataXtd_ConstraintEnum  type,
const Handle< TNaming_NamedShape > &  G1,
const Handle< TNaming_NamedShape > &  G2 
)
static Handle_TDataXtd_Constraint TDataXtd_Constraint::Set ( const TDF_Label label) [static]
void TDataXtd_Constraint::Set ( const TDataXtd_ConstraintEnum  type,
const Handle< TNaming_NamedShape > &  G1 
)
void TDataXtd_Constraint::Set ( const TDataXtd_ConstraintEnum  type,
const Handle< TNaming_NamedShape > &  G1,
const Handle< TNaming_NamedShape > &  G2,
const Handle< TNaming_NamedShape > &  G3,
const Handle< TNaming_NamedShape > &  G4 
)
void TDataXtd_Constraint::SetGeometry ( const Standard_Integer  Index,
const Handle< TNaming_NamedShape > &  G 
)
void TDataXtd_Constraint::SetPlane ( const Handle< TNaming_NamedShape > &  plane)
void TDataXtd_Constraint::SetType ( const TDataXtd_ConstraintEnum  CTR)
void TDataXtd_Constraint::SetValue ( const Handle< TDataStd_Real > &  V)
Standard_Boolean TDataXtd_Constraint::Verified ( ) const
void TDataXtd_Constraint::Verified ( const Standard_Boolean  status)

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines