Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes
ShapeAnalysis_TransferParameters Class Reference

This tool is used for transferring parameters from 3d curve of the edge to pcurve and vice versa. More...

#include <ShapeAnalysis_TransferParameters.hxx>

Inheritance diagram for ShapeAnalysis_TransferParameters:
Inheritance graph
[legend]

Public Member Functions

 ShapeAnalysis_TransferParameters ()
 Creates empty tool with myShift = 0 and myScale = 1.
 
 ShapeAnalysis_TransferParameters (const TopoDS_Edge &E, const TopoDS_Face &F)
 Creates a tool and initializes it with edge and face.
 
virtual void Init (const TopoDS_Edge &E, const TopoDS_Face &F)
 Initialize a tool with edge and face.
 
void SetMaxTolerance (const double maxtol)
 Sets maximal tolerance to use linear recomputation of parameters.
 
virtual occ::handle< NCollection_HSequence< double > > Perform (const occ::handle< NCollection_HSequence< double > > &Params, const bool To2d)
 Transfers parameters given by sequence Params from 3d curve to pcurve (if To2d is True) or back (if To2d is False)
 
virtual double Perform (const double Param, const bool To2d)
 Transfers parameter given by sequence Params from 3d curve to pcurve (if To2d is True) or back (if To2d is False)
 
virtual void TransferRange (TopoDS_Edge &newEdge, const double prevPar, const double currPar, const bool To2d)
 Recomputes range of curves from NewEdge. If Is2d equals True parameters are recomputed by curve2d else by curve3d.
 
virtual bool IsSameRange () const
 Returns True if 3d curve of edge and pcurve are SameRange (in default implementation, if myScale == 1 and myShift == 0)
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()=default
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
bool IsInstance (const char *const theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
bool IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
bool IsKind (const char *const theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
int GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
 
int DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Protected Attributes

double myFirst
 
double myLast
 
TopoDS_Edge myEdge
 
double myMaxTolerance
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Detailed Description

This tool is used for transferring parameters from 3d curve of the edge to pcurve and vice versa.

Default behaviour is to trsnafer parameters with help of linear transformation:

T2d = myShift + myScale * T3d where myScale = ( Last2d - First2d ) / ( Last3d - First3d ) myShift = First2d - First3d * myScale [First3d, Last3d] and [First2d, Last2d] are ranges of edge on curve and pcurve

This behaviour can be redefined in derived classes, for example, using projection.

Constructor & Destructor Documentation

◆ ShapeAnalysis_TransferParameters() [1/2]

ShapeAnalysis_TransferParameters::ShapeAnalysis_TransferParameters ( )

Creates empty tool with myShift = 0 and myScale = 1.

◆ ShapeAnalysis_TransferParameters() [2/2]

ShapeAnalysis_TransferParameters::ShapeAnalysis_TransferParameters ( const TopoDS_Edge & E,
const TopoDS_Face & F )

Creates a tool and initializes it with edge and face.

Member Function Documentation

◆ Init()

virtual void ShapeAnalysis_TransferParameters::Init ( const TopoDS_Edge & E,
const TopoDS_Face & F )
virtual

Initialize a tool with edge and face.

Reimplemented in ShapeAnalysis_TransferParametersProj.

◆ IsSameRange()

virtual bool ShapeAnalysis_TransferParameters::IsSameRange ( ) const
virtual

Returns True if 3d curve of edge and pcurve are SameRange (in default implementation, if myScale == 1 and myShift == 0)

Reimplemented in ShapeAnalysis_TransferParametersProj.

◆ Perform() [1/2]

virtual double ShapeAnalysis_TransferParameters::Perform ( const double Param,
const bool To2d )
virtual

Transfers parameter given by sequence Params from 3d curve to pcurve (if To2d is True) or back (if To2d is False)

Reimplemented in ShapeAnalysis_TransferParametersProj.

◆ Perform() [2/2]

virtual occ::handle< NCollection_HSequence< double > > ShapeAnalysis_TransferParameters::Perform ( const occ::handle< NCollection_HSequence< double > > & Params,
const bool To2d )
virtual

Transfers parameters given by sequence Params from 3d curve to pcurve (if To2d is True) or back (if To2d is False)

Reimplemented in ShapeAnalysis_TransferParametersProj.

◆ SetMaxTolerance()

void ShapeAnalysis_TransferParameters::SetMaxTolerance ( const double maxtol)

Sets maximal tolerance to use linear recomputation of parameters.

◆ TransferRange()

virtual void ShapeAnalysis_TransferParameters::TransferRange ( TopoDS_Edge & newEdge,
const double prevPar,
const double currPar,
const bool To2d )
virtual

Recomputes range of curves from NewEdge. If Is2d equals True parameters are recomputed by curve2d else by curve3d.

Reimplemented in ShapeAnalysis_TransferParametersProj.

Field Documentation

◆ myEdge

TopoDS_Edge ShapeAnalysis_TransferParameters::myEdge
protected

◆ myFirst

double ShapeAnalysis_TransferParameters::myFirst
protected

◆ myLast

double ShapeAnalysis_TransferParameters::myLast
protected

◆ myMaxTolerance

double ShapeAnalysis_TransferParameters::myMaxTolerance
protected

The documentation for this class was generated from the following file: