SpringbackCorrection Class Reference

#include <SpringbackCorrection.h>

Inheritance diagram for SpringbackCorrection:
MeshCore::MeshFacetVisitor Deviation

List of all members.

Public Member Functions

bool CalcCurv ()
 calculates curvature-values as a distance-weighted convexcombination
std::vector< int > FaceCheck (MeshCore::MeshKernel &mesh, int deg_tol)
 computes current angles of all triangles and stores the angle degrees in a vector
bool FacetRegionGrowing (MeshCore::MeshKernel &mesh, std::vector< MeshCore::MeshFacet > &arr, MeshCore::MeshFacetArray &mFacets)
 performs a region-growing-algorithm
int GetBoundary (const MeshCore::MeshKernel &mesh, MeshCore::MeshPointArray &meshPnts)
 returns index-value wich specifies the boundary-points of the input-mesh
bool GetCurvature (TopoDS_Face aFace)
 computes maximum and minimum curvature-values of the specified input-face aFace
bool Init ()
 sets parameter-values to initial state, tesselates the input shape and computes a curvature-radius-value at each edge contained in the input-shape
bool Init_Setting (struct CuttingToolsSettings &set)
 get external setting-parameters
std::vector< int > InitFaceCheck (MeshCore::MeshKernel &mesh, int deg_tol)
 computes current angles of all triangles and sets the property value of the critical triangles to zero
bool Load (const TopoDS_Shape &aShape, const MeshCore::MeshKernel &aMesh)
 loads input-shape and -mesh
bool Load (const TopoDS_Shape &aShape)
 loads input-shape
bool Load (const MeshCore::MeshKernel &aMesh)
 loads input-mesh
std::vector< double > MeshCurvature (const TopoDS_Face &aFace, const MeshCore::MeshKernel &mesh)
 Computes mesh-based curvature-values at each mesh-point.
bool Perform (int deg_Tol, bool out)
 main-function
std::vector< std::pair
< unsigned long, double > > 
RegionEvaluate (const MeshCore::MeshKernel &mesh, std::vector< unsigned long > &RegionFacets, std::vector< Base::Vector3f > &normals)
 computes offset-values for the inner-points of the specified region
bool SetFixEdges ()
 sets curvature-radius-value of user-specified edges to zero
bool SmoothMesh (MeshCore::MeshKernel &mesh, std::vector< int > indicies, double maxTranslation)
 smooths specified mesh-points of the input-mesh
bool SmoothMesh (MeshCore::MeshKernel &mesh, double maxTranslation)
 smooths input-mesh
 SpringbackCorrection (const TopoDS_Shape &aShape, const MeshCore::MeshKernel &aMesh)
 Constructor.
 SpringbackCorrection ()
 Constructor.
bool TransferFaceTriangulationtoFreeCAD (const TopoDS_Face &aFace, MeshCore::MeshKernel &TFaceMesh)
 builds a mesh-kernel out of one face-triangulation
bool Visit (const MeshCore::MeshFacet &rclFacet, const MeshCore::MeshFacet &rclFrom, unsigned long ulFInd, unsigned long ulLevel)
 checks the visit-state of specified triangle
 ~SpringbackCorrection ()
 Constructor.

Public Attributes

std::map< TopoDS_Edge,
std::vector< double >
, Edge_Less
EdgeMap
 map over all edges
MeshCore::MeshKernel m_CadMesh
 triangulation of the CAD-shape
std::vector< Base::Vector3fm_dist_vec
 vector containing translation-vectors at all mesh-points
std::vector< TopoDS_Face > m_FixFaces
 vector containing the user-specified faces wich stands fix during the springback-correction
MeshCore::MeshKernel m_Mesh
 input-mesh
MeshCore::MeshKernel m_Mesh_vis
 mesh containing the movable regions for the local translation
MeshCore::MeshKernel m_Mesh_vis2
 mesh containing the fix regions for the local translation
std::map< Base::Vector3f,
MeshPnt, MeshPntLess
MeshMap
 map wich links mesh-point to mesh-index

Detailed Description

Definition at line 134 of file SpringbackCorrection.h.


Constructor & Destructor Documentation

SpringbackCorrection::SpringbackCorrection (  ) 

Constructor.

Definition at line 64 of file SpringbackCorrection.cpp.

SpringbackCorrection::SpringbackCorrection ( const TopoDS_Shape &  aShape,
const MeshCore::MeshKernel aMesh 
)
SpringbackCorrection::~SpringbackCorrection (  ) 

Constructor.

Definition at line 106 of file SpringbackCorrection.cpp.


Member Function Documentation

bool SpringbackCorrection::CalcCurv (  ) 
std::vector< int > SpringbackCorrection::FaceCheck ( MeshCore::MeshKernel mesh,
int  deg_tol 
)

computes current angles of all triangles and stores the angle degrees in a vector

Parameters:
mesh input-mesh
deg_tol limiting forming-angle computes current angles of all triangles and stores the critical-triangle-indicies in a vector
mesh input-mesh
deg_tol limiting forming-angle

Definition at line 1163 of file SpringbackCorrection.cpp.

References KDL::acos(), Base::Builder3D::addSingleArrow(), MeshCore::MeshGeomFacet::CalcNormal(), MeshCore::MeshKernel::CountFacets(), MeshCore::MeshKernel::GetFacet(), MeshCore::MeshKernel::GetFacets(), MeshCore::MeshGeomFacet::GetGravityPoint(), MeshCore::MeshGeomFacet::GetNormal(), MeshCore::MeshKernel::GetPoints(), KDL::log(), Base::Vector3< _Precision >::Normalize(), KDL::PI, Base::Builder3D::saveToFile(), and Base::Vector3< _Precision >::z.

Referenced by Perform().

bool SpringbackCorrection::FacetRegionGrowing ( MeshCore::MeshKernel mesh,
std::vector< MeshCore::MeshFacet > &  arr,
MeshCore::MeshFacetArray mFacets 
)
int SpringbackCorrection::GetBoundary ( const MeshCore::MeshKernel mesh,
MeshCore::MeshPointArray meshPnts 
)

returns index-value wich specifies the boundary-points of the input-mesh

Parameters:
mesh input-mesh
meshPnts mesh-points of input-mesh

Definition at line 774 of file SpringbackCorrection.cpp.

References MeshCore::MeshAlgorithm::GetMeshBorders(), and MeshCore::MeshPointArray::SetProperty().

Referenced by CalcCurv().

bool SpringbackCorrection::GetCurvature ( TopoDS_Face  aFace  ) 
bool SpringbackCorrection::Init ( void   ) 
bool SpringbackCorrection::Init_Setting ( struct CuttingToolsSettings set  ) 

get external setting-parameters

Definition at line 663 of file SpringbackCorrection.cpp.

Referenced by CamGui::Cutting::on_best_fit_go_button_clicked().

std::vector< int > SpringbackCorrection::InitFaceCheck ( MeshCore::MeshKernel mesh,
int  deg_tol 
)
bool SpringbackCorrection::Load ( const TopoDS_Shape &  aShape,
const MeshCore::MeshKernel aMesh 
)
bool SpringbackCorrection::Load ( const TopoDS_Shape &  aShape  ) 

loads input-shape

Definition at line 117 of file SpringbackCorrection.cpp.

bool SpringbackCorrection::Load ( const MeshCore::MeshKernel aMesh  ) 
std::vector< double > SpringbackCorrection::MeshCurvature ( const TopoDS_Face &  aFace,
const MeshCore::MeshKernel mesh 
)
bool SpringbackCorrection::Perform ( int  deg_Tol,
bool  out 
)
std::vector< std::pair< unsigned long, double > > SpringbackCorrection::RegionEvaluate ( const MeshCore::MeshKernel mesh,
std::vector< unsigned long > &  RegionFacets,
std::vector< Base::Vector3f > &  normals 
)

computes offset-values for the inner-points of the specified region

Definition at line 1712 of file SpringbackCorrection.cpp.

References KDL::cos(), MeshCore::MeshAlgorithm::GetFacetBorders(), MeshCore::MeshKernel::GetFacets(), MeshCore::MeshKernel::GetPoints(), Base::Vector3< _Precision >::Length(), and KDL::PI.

Referenced by Perform().

bool SpringbackCorrection::SetFixEdges (  ) 

sets curvature-radius-value of user-specified edges to zero

Definition at line 669 of file SpringbackCorrection.cpp.

References EdgeMap, and m_FixFaces.

Referenced by Perform().

bool SpringbackCorrection::SmoothMesh ( MeshCore::MeshKernel mesh,
std::vector< int >  indicies,
double  maxTranslation 
)
bool SpringbackCorrection::SmoothMesh ( MeshCore::MeshKernel mesh,
double  maxTranslation 
)
bool SpringbackCorrection::TransferFaceTriangulationtoFreeCAD ( const TopoDS_Face &  aFace,
MeshCore::MeshKernel TFaceMesh 
)

builds a mesh-kernel out of one face-triangulation

Parameters:
aFace face of concern
TFaceMesh MeshKernel where the triangulation will be stored

Definition at line 689 of file SpringbackCorrection.cpp.

References MeshCore::MeshBuilder::AddFacet(), MeshCore::MeshKernel::Clear(), MeshCore::MeshBuilder::Finish(), MeshCore::MeshBuilder::Initialize(), and Base::Vector3< _Precision >::Set().

Referenced by CalcCurv(), Deviation::GenNormals(), and Init().

bool SpringbackCorrection::Visit ( const MeshCore::MeshFacet rclFacet,
const MeshCore::MeshFacet rclFrom,
unsigned long  ulFInd,
unsigned long  ulLevel 
) [virtual]

checks the visit-state of specified triangle

Implements MeshCore::MeshFacetVisitor.

Definition at line 3071 of file SpringbackCorrection.cpp.

References MeshCore::MeshFacet::_ulProp.


Member Data Documentation

std::map<TopoDS_Edge, std::vector<double>, Edge_Less> SpringbackCorrection::EdgeMap

map over all edges

Definition at line 334 of file SpringbackCorrection.h.

Referenced by CalcCurv(), Init(), Load(), SetFixEdges(), and SpringbackCorrection().

triangulation of the CAD-shape

Definition at line 277 of file SpringbackCorrection.h.

Referenced by CalcCurv(), Init(), Load(), CamGui::Cutting::on_best_fit_go_button_clicked(), Perform(), and SpringbackCorrection().

vector containing translation-vectors at all mesh-points

Definition at line 279 of file SpringbackCorrection.h.

Referenced by CalcCurv(), and Perform().

std::vector<TopoDS_Face> SpringbackCorrection::m_FixFaces

vector containing the user-specified faces wich stands fix during the springback-correction

Definition at line 338 of file SpringbackCorrection.h.

Referenced by CalcCurv(), CamGui::Cutting::setFace(), and SetFixEdges().

input-mesh

Reimplemented in Deviation.

Definition at line 270 of file SpringbackCorrection.h.

Referenced by GetCurvature(), and Load().

mesh containing the movable regions for the local translation

Definition at line 273 of file SpringbackCorrection.h.

Referenced by CamGui::Cutting::on_best_fit_go_button_clicked(), and Perform().

mesh containing the fix regions for the local translation

Definition at line 275 of file SpringbackCorrection.h.

Referenced by CamGui::Cutting::on_best_fit_go_button_clicked(), and Perform().

map wich links mesh-point to mesh-index

Definition at line 332 of file SpringbackCorrection.h.

Referenced by CalcCurv(), Deviation::GenNormals(), Init(), Load(), and SpringbackCorrection().


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

Generated on Wed Nov 23 19:01:38 2011 for FreeCAD by  doxygen 1.6.1