path_simulate Class Reference

The main class for the path_simulate routine. More...

#include <path_simulate.h>

List of all members.

Public Member Functions

bool ConnectPaths_Feat (bool tool, bool robo, bool connection_type)
 Computes output for the connection-part in all directions for the feature-based-strategy.
bool ConnectPaths_xy (bool outputstyle)
 Computes output for the connection-part in xy-direction.
bool ConnectPaths_z (bool outputstyle)
 Computes output for the connection-part in z-direction.
bool Correction (bool b)
 computes path-correction after a tool-path-run
int Detect_FeatCurve (bool tool)
 Returns the next curve-index for the feature-based-strategy.
bool Gen_Path ()
 Main routine for creating the simulation output for a single curve, including the synchronisation of master and slave
CompPath() must have been called before using this function.
bool MakePathRobot ()
 Main function of the output-generation for the robot using the standard-strategy.
bool MakePathRobot_Feat (const std::vector< float > &flatAreas)
 Main function of the output-generation for the robot using the feature-based-strategy.
bool MakePathSimulate ()
 Main function of the output-generation for the simulation using the standard-strategy.
bool MakePathSimulate_Feat (const std::vector< float > &flatAreas, bool spiral)
 Main function of the output-generation for the simulation using the feature-based or spiral-based strategy.
bool MakePathSingle (bool outputstyle, double length, bool part, bool curveType)
 Creates outputvectors for the simulation outputfor a single curve.
bool ParameterCalculation_Curve (double wirelength)
 Computes all parameters of the velocity-function for the tool movement along a curve-segment.
bool ParameterCalculation_Line (double wirelength)
 Computes all parameters of the velocity-function for the tool movement along a straight line.
 path_simulate (const std::vector< Handle_Geom_BSplineCurve > &BSplineTop, const std::vector< Handle_Geom_BSplineCurve > &BSplineBottom, struct CuttingToolsSettings &set)
 Constructor.
bool TimeCorrection ()
 Adds additional time-values to the output-vector of the waiting tool for synchronisation.
bool UpdateParam ()
 Updates actual parameter sets.
bool WriteOutput_Feat (ofstream &anOutputFile_1, ofstream &anOutputFile_2, int &c, bool outputstyle)
 Writes output-vectors to file for the feature-based-strategy.
bool WriteOutputDouble (ofstream &anOutputFile_1, ofstream &nOutputFile_2, int &c1, int &c2, bool outputstyle, bool beamfl)
 Writes output-vectors to file.
bool WriteOutputSingle (ofstream &anOutputFile, int &c, bool outputstyle, bool tool, bool beamfl)
 Write start- and endtime for one tool-path-run (master & slave).
 ~path_simulate ()

Detailed Description

The main class for the path_simulate routine.

As it's input parameters it takes one respectivly two vectors of B-Spline Curves (describing the Tool-Paths for the IBU-simulation), two values a_max and v_max of type double, wich stands for the maximum allowable acceleration and velocity of the tool-movement and one value m_step of type double, specifying the step-length of the time-output-vector.

As output, it gives one respectivly two output-files for the simulation process containing a two-dimensional vector of time vs. velocity wich describes the tool-movement.

Definition at line 48 of file path_simulate.h.


Constructor & Destructor Documentation

path_simulate::path_simulate ( const std::vector< Handle_Geom_BSplineCurve > &  BSplineTop,
const std::vector< Handle_Geom_BSplineCurve > &  BSplineBottom,
struct CuttingToolsSettings set 
)

Constructor.

Parameters:
BSplineTop vector of B-Spline-Curves describing the tool- paths of the master-tool
BSplineBottom vector of B-Spline-Curves describing the tool- paths of the slave-tool
set a struct wich also includes the parameters a_max and v_max

Definition at line 38 of file path_simulate.cpp.

References CuttingToolsSettings::max_Acc, CuttingToolsSettings::max_Vel, draftTools::p, CuttingToolsSettings::sheet_thickness, and CuttingToolsSettings::spring_pretension.

path_simulate::~path_simulate (  ) 

Definition at line 102 of file path_simulate.cpp.


Member Function Documentation

bool path_simulate::ConnectPaths_Feat ( bool  tool,
bool  robo,
bool  connection_type 
)

Computes output for the connection-part in all directions for the feature-based-strategy.

Parameters:
tool false: master true: slave
robo defines outputstyle (false: simulation true: robot)
connection_type false: in 3-steps true: in 2-steps

Definition at line 963 of file path_simulate.cpp.

References Py::abs(), Sketcher::Distance, CuttingToolsSettings::master_radius, KDL::max(), ParameterCalculation_Line(), CuttingToolsSettings::slave_radius, TolDist, draftlibs::fcgeo::vec(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.

Referenced by MakePathRobot_Feat(), and MakePathSimulate_Feat().

bool path_simulate::ConnectPaths_xy ( bool  outputstyle  ) 

Computes output for the connection-part in xy-direction.

Parameters:
outputstyle false: simulation, true: robot

Definition at line 499 of file path_simulate.cpp.

References Py::int, KDL::max(), draftTools::p, ParameterCalculation_Line(), TolDist, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.

Referenced by MakePathRobot(), MakePathRobot_Feat(), MakePathSimulate(), and MakePathSimulate_Feat().

bool path_simulate::ConnectPaths_z ( bool  outputstyle  ) 

Computes output for the connection-part in z-direction.

Parameters:
outputstyle false: simulation, true: robot

Definition at line 742 of file path_simulate.cpp.

References Py::int, KDL::max(), ParameterCalculation_Line(), TolDist, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.

Referenced by MakePathRobot(), MakePathRobot_Feat(), MakePathSimulate(), and MakePathSimulate_Feat().

bool path_simulate::Correction ( bool  b  ) 

computes path-correction after a tool-path-run

Parameters:
b false: master, true: slave

Definition at line 1521 of file path_simulate.cpp.

References Sketcher::Distance, Py::int, ParameterCalculation_Line(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.

Referenced by Gen_Path().

int path_simulate::Detect_FeatCurve ( bool  tool  ) 

Returns the next curve-index for the feature-based-strategy.

Definition at line 2665 of file path_simulate.cpp.

Referenced by MakePathRobot_Feat().

bool path_simulate::Gen_Path (  ) 

Main routine for creating the simulation output for a single curve, including the synchronisation of master and slave
CompPath() must have been called before using this function.

Definition at line 1671 of file path_simulate.cpp.

References Correction(), RobotExample::l, MakePathSingle(), draftTools::p, and ParameterCalculation_Curve().

Referenced by MakePathSimulate(), and MakePathSimulate_Feat().

bool path_simulate::MakePathRobot (  ) 

Main function of the output-generation for the robot using the standard-strategy.

Definition at line 2139 of file path_simulate.cpp.

References ConnectPaths_xy(), ConnectPaths_z(), MakePathSingle(), UpdateParam(), WriteOutputDouble(), and WriteOutputSingle().

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

bool path_simulate::MakePathRobot_Feat ( const std::vector< float > &  flatAreas  ) 
bool path_simulate::MakePathSimulate (  ) 

Main function of the output-generation for the simulation using the standard-strategy.

Definition at line 2729 of file path_simulate.cpp.

References Mod::PartDesign::Scripts::Gear::c1, ConnectPaths_xy(), ConnectPaths_z(), Gen_Path(), UpdateParam(), WriteOutputDouble(), and WriteOutputSingle().

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

bool path_simulate::MakePathSimulate_Feat ( const std::vector< float > &  flatAreas,
bool  spiral 
)

Main function of the output-generation for the simulation using the feature-based or spiral-based strategy.

Parameters:
flatAreas index-vector specifying the flat areas
spiral specifies the strategy (true: spiral-based, false: feature-based)

Definition at line 2307 of file path_simulate.cpp.

References ConnectPaths_Feat(), ConnectPaths_xy(), ConnectPaths_z(), Gen_Path(), CuttingToolsSettings::master_radius, CuttingToolsSettings::sheet_thickness, CuttingToolsSettings::slave_radius, UpdateParam(), and WriteOutputDouble().

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

bool path_simulate::MakePathSingle ( bool  outputstyle,
double  length,
bool  part,
bool  curveType 
)

Creates outputvectors for the simulation outputfor a single curve.

Parameters:
outputstyle false: simulation, true: robot
length defines length of the path
part tells us that we are generating output for a critical part of the curve or not
curveType 
Todo:
undocumented parameter curveType

Definition at line 1934 of file path_simulate.cpp.

References KDL::max(), ParameterCalculation_Curve(), TolDist, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.

Referenced by Gen_Path(), MakePathRobot(), and MakePathRobot_Feat().

bool path_simulate::ParameterCalculation_Curve ( double  wirelength  ) 

Computes all parameters of the velocity-function for the tool movement along a curve-segment.

Parameters:
wirelength arc-length of the curve-segment

Definition at line 292 of file path_simulate.cpp.

References Py::abs(), zipios::min(), and KDL::sqrt().

Referenced by Gen_Path(), and MakePathSingle().

bool path_simulate::ParameterCalculation_Line ( double  wirelength  ) 

Computes all parameters of the velocity-function for the tool movement along a straight line.

Parameters:
wirelength length of the straight line

Definition at line 262 of file path_simulate.cpp.

References KDL::sqrt().

Referenced by ConnectPaths_Feat(), ConnectPaths_xy(), ConnectPaths_z(), and Correction().

bool path_simulate::TimeCorrection (  ) 

Adds additional time-values to the output-vector of the waiting tool for synchronisation.

Definition at line 2215 of file path_simulate.cpp.

References KDL::max(), and draftlibs::fcgeo::vec().

Referenced by WriteOutputDouble().

bool path_simulate::UpdateParam (  ) 

Updates actual parameter sets.

Definition at line 358 of file path_simulate.cpp.

Referenced by MakePathRobot(), MakePathSimulate(), and MakePathSimulate_Feat().

bool path_simulate::WriteOutput_Feat ( ofstream &  anOutputFile_1,
ofstream &  anOutputFile_2,
int &  c,
bool  outputstyle 
)

Writes output-vectors to file for the feature-based-strategy.

Parameters:
anOutputFile_1 output-file for the master
anOutputFile_2 output-file for the slave
c startindex of the curve-id
outputstyle false: simulation, true: robot

Definition at line 2832 of file path_simulate.cpp.

References MovieTool::x, CuttingToolsSettings::x_offset_robot, MovieTool::y, and CuttingToolsSettings::y_offset_robot.

Referenced by MakePathRobot_Feat().

bool path_simulate::WriteOutputDouble ( ofstream &  anOutputFile_1,
ofstream &  nOutputFile_2,
int &  c1,
int &  c2,
bool  outputstyle,
bool  beamfl 
)

Writes output-vectors to file.

Parameters:
anOutputFile_1 output-file for the master
nOutputFile_2 output-file for the slave
c1 startindex of the curve-id for the master
c2 startindex of the curve-id for the slave
outputstyle false: simulation, true: robot
beamfl specifies an additional outputvalue using spring-pretension

Definition at line 3157 of file path_simulate.cpp.

References TimeCorrection(), MovieTool::x, CuttingToolsSettings::x_offset_robot, and CuttingToolsSettings::y_offset_robot.

Referenced by MakePathRobot(), MakePathSimulate(), and MakePathSimulate_Feat().

bool path_simulate::WriteOutputSingle ( ofstream &  anOutputFile,
int &  c,
bool  outputstyle,
bool  tool,
bool  beamfl 
)

Write start- and endtime for one tool-path-run (master & slave).

Writes output-vectors to file

Parameters:
anOutputFile output-file
c 
outputstyle false: simulation, true: robot
tool false: master, true: slave
beamfl specifies an additional outputvalue wich determines the waiting-status of the tool movement
Todo:
undocumented parameter c

Definition at line 3017 of file path_simulate.cpp.

References MovieTool::x, CuttingToolsSettings::x_offset_robot, and CuttingToolsSettings::y_offset_robot.

Referenced by MakePathRobot(), and MakePathSimulate().


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