Version: 9.12.0
GEOMUtils::Hatcher Class Reference

#include <GEOMUtils_Hatcher.hxx>

Public Member Functions

Standard_EXPORT Hatcher (const TopoDS_Face &theFace)
 Constructor. More...
 
Standard_EXPORT void Init (const Standard_Integer theNbIsos)
 This method initializes the hatcher with hatchings. More...
 
Standard_EXPORT void Init (const Standard_Integer theNbIsoU, const Standard_Integer theNbIsoV)
 This method initializes the hatcher with hatchings. More...
 
Standard_EXPORT void Init (const GeomAbs_IsoType theIsoType, const Standard_Real theParameter)
 This method initializes the hatcher with a hatching. More...
 
Standard_EXPORT void Perform ()
 Compute hatching domatins. More...
 
Standard_Boolean IsDone () const
 This method returns true if at least one hatching's domains are computed successfully. More...
 
const TopoDS_Face & GetFace () const
 This method returns the initial face. More...
 
Standard_EXPORT Standard_Integer GetNbDomains (const Standard_Integer theHatchingIndex) const
 This method returns the number of domains for a particular hatching. More...
 
Standard_EXPORT Standard_Boolean GetDomain (const Standard_Integer theHatchingIndex, const Standard_Integer theDomainIndex, Standard_Real &theParam1, Standard_Real &theParam2) const
 This method returns the domputed domain range computed for a particular hatching. More...
 
Standard_EXPORT Standard_Boolean IsDomainInfinite (const Standard_Integer theHatchingIndex, const Standard_Integer theDomainIndex) const
 This method returns Standard_True if a domain has infinite first or last parameter. More...
 
Standard_EXPORT const Geom2dHatch_Hatcher & GetHatcher () const
 This method returns the reference to OCCT hatcher. More...
 
Standard_EXPORT const Handle (TColStd_HArray1OfInteger) &GetUIndices() const
 This method returns the array of indices of U-isoline hatchings. More...
 
Standard_EXPORT const Handle (TColStd_HArray1OfInteger) &GetVIndices() const
 This method returns the array of indices of V-isoline hatchings. More...
 
Standard_EXPORT const Handle (TColStd_HArray1OfReal) &GetUParams() const
 This method returns the array of parameters of U-isoline hatchings. More...
 
Standard_EXPORT const Handle (TColStd_HArray1OfReal) &GetVParams() const
 This method returns the array of parameters of V-isoline hatchings. More...
 
Standard_EXPORT const Handle (Geom2d_Curve) &GetHatching(const Standard_Integer theHatchingIndex) const
 This method returns a hatching curve by its index. More...
 

Protected Member Functions

void Clear ()
 This method clears all hatchings data. More...
 

Private Member Functions

 Handle (TColStd_HArray1OfReal) myUPrm
 
 Handle (TColStd_HArray1OfReal) myVPrm
 
 Handle (TColStd_HArray1OfInteger) myUInd
 
 Handle (TColStd_HArray1OfInteger) myVInd
 

Private Attributes

Geom2dHatch_Hatcher myHatcher
 
TopoDS_Face myFace
 
Standard_Boolean myIsDone
 
Standard_Real myUMin
 
Standard_Real myUMax
 
Standard_Real myVMin
 
Standard_Real myVMax
 

Constructor & Destructor Documentation

◆ Hatcher()

GEOMUtils::Hatcher::Hatcher ( const TopoDS_Face &  theFace)

Initializes the object with the face.

References Handle(), InfiniteValue, myHatcher, myUMax, myUMin, myVMax, and myVMin.

Member Function Documentation

◆ Clear()

void GEOMUtils::Hatcher::Clear ( )
protected

◆ GetDomain()

Standard_Boolean GEOMUtils::Hatcher::GetDomain ( const Standard_Integer  theHatchingIndex,
const Standard_Integer  theDomainIndex,
Standard_Real &  theParam1,
Standard_Real &  theParam2 
) const

theDomainIndex should be in the range [1..GetNbDomains].

Parameters
theHatchingIndexthe hatching index.
theDomainIndexthe domain index for the particular hatching.
theParam1(output) the first parameter of the domain.
theParam2(output) the last parameter of the domain.
Returns
Standard_True in case of success; Standard_False otherwise.

References InfiniteValue.

◆ GetFace()

const TopoDS_Face& GEOMUtils::Hatcher::GetFace ( ) const
inline
Returns
the initial face.

References myFace.

◆ GetHatcher()

Standard_EXPORT const Geom2dHatch_Hatcher& GEOMUtils::Hatcher::GetHatcher ( ) const
inline
Returns
the reference to OCCT hatcher.

References myHatcher.

◆ GetNbDomains()

Standard_Integer GEOMUtils::Hatcher::GetNbDomains ( const Standard_Integer  theHatchingIndex) const

If the operation is not done or there is no real hatching for a particular index a negative value is returned.

Parameters
theHatchingIndexthe hatching index.
Returns
the number of domains computed for the hatching.

References aResult.

◆ Handle() [1/9]

Standard_EXPORT const GEOMUtils::Hatcher::Handle ( Geom2d_Curve  ) const &

If the curve is not found null handle is returned.

Parameters
theHatchingIndexthe hatching curve index.

◆ Handle() [2/9]

Standard_EXPORT const GEOMUtils::Hatcher::Handle ( TColStd_HArray1OfInteger  ) const &
inline

Can be null if the object is initialized by 0 U-isolines.

Returns
the array of U-isoline hatching indices.

◆ Handle() [3/9]

Standard_EXPORT const GEOMUtils::Hatcher::Handle ( TColStd_HArray1OfInteger  ) const &
inline

Can be null if the object is initialized by 0 V-isolines.

Returns
the array of V-isoline hatching indices.

◆ Handle() [4/9]

GEOMUtils::Hatcher::Handle ( TColStd_HArray1OfInteger  )
private

◆ Handle() [5/9]

GEOMUtils::Hatcher::Handle ( TColStd_HArray1OfInteger  )
private

◆ Handle() [6/9]

Standard_EXPORT const GEOMUtils::Hatcher::Handle ( TColStd_HArray1OfReal  ) const &
inline

Can be null if the object is initialized by 0 U-isolines.

Returns
the array of U-isoline hatching parameters.

◆ Handle() [7/9]

Standard_EXPORT const GEOMUtils::Hatcher::Handle ( TColStd_HArray1OfReal  ) const &
inline

Can be null if the object is initialized by 0 V-isolines.

Returns
the array of V-isoline hatching parameters.

◆ Handle() [8/9]

GEOMUtils::Hatcher::Handle ( TColStd_HArray1OfReal  )
private

◆ Handle() [9/9]

GEOMUtils::Hatcher::Handle ( TColStd_HArray1OfReal  )
private

◆ Init() [1/3]

void GEOMUtils::Hatcher::Init ( const GeomAbs_IsoType  theIsoType,
const Standard_Real  theParameter 
)
Parameters
theIsoTypethe isoline type.
theParameterthe isoline parameter.

References Handle().

◆ Init() [2/3]

void GEOMUtils::Hatcher::Init ( const Standard_Integer  theNbIsos)
Parameters
theNbIsosthe number of U- and V-isolines.

◆ Init() [3/3]

void GEOMUtils::Hatcher::Init ( const Standard_Integer  theNbIsoU,
const Standard_Integer  theNbIsoV 
)
Parameters
theNbIsoUthe number of U-isolines.
theNbIsoVthe number of V-isolines.

◆ IsDomainInfinite()

Standard_Boolean GEOMUtils::Hatcher::IsDomainInfinite ( const Standard_Integer  theHatchingIndex,
const Standard_Integer  theDomainIndex 
) const
Parameters
theHatchingIndexthe hatching index.
theDomainIndexthe domain index for the particular hatching.
Returns
Standard_True if a domain is infinite; Standard_False otherwise.

◆ IsDone()

Standard_Boolean GEOMUtils::Hatcher::IsDone ( ) const
inline
Returns
Standard_True is case of success.

References myIsDone.

◆ Perform()

void GEOMUtils::Hatcher::Perform ( )

Member Data Documentation

◆ myFace

TopoDS_Face GEOMUtils::Hatcher::myFace
private

◆ myHatcher

Geom2dHatch_Hatcher GEOMUtils::Hatcher::myHatcher
private

◆ myIsDone

Standard_Boolean GEOMUtils::Hatcher::myIsDone
private

◆ myUMax

Standard_Real GEOMUtils::Hatcher::myUMax
private

◆ myUMin

Standard_Real GEOMUtils::Hatcher::myUMin
private

◆ myVMax

Standard_Real GEOMUtils::Hatcher::myVMax
private

◆ myVMin

Standard_Real GEOMUtils::Hatcher::myVMin
private

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