3.4.0
tigl::CTiglCurveNetworkSorter Class Reference

#include <CTiglCurveNetworkSorter.h>

Public Member Functions

 CTiglCurveNetworkSorter (const std::vector< Handle(Geom_Curve)> &profiles, const std::vector< Handle(Geom_Curve)> &guides, const math_Matrix &ProfileIntersectionParms, const math_Matrix &GuideIntersectionParms)
 This algorithm sorts and corrects a curve network. More...
 
void GetStartCurveIndices (size_t &prof_idx, size_t &guid_idx, bool &guideMustBeReversed) const
 Helper function to determine the first profile and guide of the curve network. More...
 
std::vector< std::string > const & GuideIndices () const
 
math_Matrix const & GuideIntersectionParms () const
 Returns the parameters on the guide curves, where the profiles are intersectings. More...
 
std::vector< Handle(Geom_Curve)> const & Guides () const
 Returns the sorted guide curves. More...
 
size_t NGuides () const
 Returns the number of guide curves of the network. More...
 
size_t NProfiles () const
 Returns the number of profile curves of the network. More...
 
void Perform ()
 Performs the reordering of the curve network for the use in gordon surfaces. More...
 
std::vector< std::string > const & ProfileIndices () const
 
math_Matrix const & ProfileIntersectionParms () const
 Returns the parameters on the profile curves, where the guides are intersectings. More...
 
std::vector< Handle(Geom_Curve)> const & Profiles () const
 Returns the sorted profile curves. More...
 

Private Member Functions

void reverseGuide (size_t guideIdx)
 
void reverseProfile (size_t profileIdx)
 
void swapGuides (size_t idx1, size_t idx2)
 
void swapProfiles (size_t idx1, size_t idx2)
 

Private Attributes

std::vector< Handle(Geom_Curve)> m_guides
 
std::vector< std::string > m_guidIdx
 
bool m_hasPerformed
 
math_Matrix m_parmsIntersGuides
 
math_Matrix m_parmsIntersProfiles
 
std::vector< std::string > m_profIdx
 
std::vector< Handle(Geom_Curve)> m_profiles
 

Constructor & Destructor Documentation

◆ CTiglCurveNetworkSorter()

tigl::CTiglCurveNetworkSorter::CTiglCurveNetworkSorter ( const std::vector< Handle(Geom_Curve)> &  profiles,
const std::vector< Handle(Geom_Curve)> &  guides,
const math_Matrix &  ProfileIntersectionParms,
const math_Matrix &  GuideIntersectionParms 
)

This algorithm sorts and corrects a curve network.

The input data must fulfill the following condition:

profiles[i](parmsIntersProfiles(i, j)) == guides[j](parmsIntersGuides(i, j))

This means, that i-th profile and j-th guide intersect each other at the profile parameter parmsIntersProfiles(i, j) and the guide parameter parmsIntersGuides(i, j)

Parameters
profilesProfile curves
guidesGuide curves
ProfileIntersectionParmsIntersection parameters on the profiles with the guides
GuideIntersectionParmsIntersection parameters on the guides with the profiles

Member Function Documentation

◆ GetStartCurveIndices()

void tigl::CTiglCurveNetworkSorter::GetStartCurveIndices ( size_t &  prof_idx,
size_t &  guid_idx,
bool &  guideMustBeReversed 
) const

Helper function to determine the first profile and guide of the curve network.

The function returns the index of the first profile and the index of the first guide.

This is the only part in the algorithm, were profiles and guides are handled assymetrically. It tries to find a corner point of the curve network, where a profile starts and a guide starts as well. There might be cases (e.g. a circular connection of the outer curves), when such a corner point does not exist. In this case, the algorithm tries to find a corner, where a profiles starts and a guide ends. In this case, the variable guideMustBeReversed is true.

Parameters
prof_idxComputed index of the first profile.
guid_idxComputed index of the first guide.
guideMustBeReversedIf true, the first guide curve must be reversed to get a correct curve network.

◆ GuideIndices()

std::vector<std::string> const& tigl::CTiglCurveNetworkSorter::GuideIndices ( ) const

◆ GuideIntersectionParms()

math_Matrix const& tigl::CTiglCurveNetworkSorter::GuideIntersectionParms ( ) const
inline

Returns the parameters on the guide curves, where the profiles are intersectings.

The returned matrix contains the intersection parameter on the j-th guide, where the i-th profile intersects.

◆ Guides()

std::vector<Handle (Geom_Curve)> const& tigl::CTiglCurveNetworkSorter::Guides ( ) const
inline

Returns the sorted guide curves.

◆ NGuides()

size_t tigl::CTiglCurveNetworkSorter::NGuides ( ) const

Returns the number of guide curves of the network.

◆ NProfiles()

size_t tigl::CTiglCurveNetworkSorter::NProfiles ( ) const

Returns the number of profile curves of the network.

◆ Perform()

void tigl::CTiglCurveNetworkSorter::Perform ( )

Performs the reordering of the curve network for the use in gordon surfaces.

◆ ProfileIndices()

std::vector<std::string> const& tigl::CTiglCurveNetworkSorter::ProfileIndices ( ) const

◆ ProfileIntersectionParms()

math_Matrix const& tigl::CTiglCurveNetworkSorter::ProfileIntersectionParms ( ) const
inline

Returns the parameters on the profile curves, where the guides are intersectings.

The returned matrix contains the intersection parameter on the i-th profile, where the j-th guide intersects.

◆ Profiles()

std::vector<Handle (Geom_Curve)> const& tigl::CTiglCurveNetworkSorter::Profiles ( ) const
inline

Returns the sorted profile curves.

◆ reverseGuide()

void tigl::CTiglCurveNetworkSorter::reverseGuide ( size_t  guideIdx)
private

◆ reverseProfile()

void tigl::CTiglCurveNetworkSorter::reverseProfile ( size_t  profileIdx)
private

◆ swapGuides()

void tigl::CTiglCurveNetworkSorter::swapGuides ( size_t  idx1,
size_t  idx2 
)
private

◆ swapProfiles()

void tigl::CTiglCurveNetworkSorter::swapProfiles ( size_t  idx1,
size_t  idx2 
)
private

Field Documentation

◆ m_guides

std::vector<Handle(Geom_Curve)> tigl::CTiglCurveNetworkSorter::m_guides
private

◆ m_guidIdx

std::vector<std::string> tigl::CTiglCurveNetworkSorter::m_guidIdx
private

◆ m_hasPerformed

bool tigl::CTiglCurveNetworkSorter::m_hasPerformed
private

◆ m_parmsIntersGuides

math_Matrix tigl::CTiglCurveNetworkSorter::m_parmsIntersGuides
private

◆ m_parmsIntersProfiles

math_Matrix tigl::CTiglCurveNetworkSorter::m_parmsIntersProfiles
private

◆ m_profIdx

std::vector<std::string> tigl::CTiglCurveNetworkSorter::m_profIdx
private

◆ m_profiles

std::vector<Handle(Geom_Curve)> tigl::CTiglCurveNetworkSorter::m_profiles
private

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