#include <Assembly.h>
Public Types | |
typedef Part< DataType, dim > | PartType |
typedef ads::FixedArray< dim, DataType > | point_type |
typedef ads::FixedArray< dim, int > | multi_index_type |
Public Member Functions | |
Assembly () | |
Assembly (const base &v) | |
~Assembly () | |
virtual void | setDim () |
virtual std::vector< int > & | IdTag () |
virtual void | setIdTag (std::vector< int > val) |
virtual std::string | Name () |
virtual void | setName (std::string val) |
virtual base * | GetWorld () |
virtual void | setDHMat (MType val) |
virtual MType | GetDHMat () |
virtual void | AddPart (PartType *v) |
virtual void | AddPart (PartType &v) |
virtual int | GetNumParts () |
virtual PartType * | GetNthPart (int n) |
virtual void | AddSubAssembly (base *v) |
virtual void | AddSubAssembly (base &v) |
virtual int | GetNumSubAssemblies () |
virtual base * | GetNthSubAssembly (int n) |
virtual void | setAssemblyTmatrix () |
virtual void | setAssemblyTmatrix (const MType ttemp) |
virtual MType * | getAssemblyTmatrix () |
void | setAssemblyMotion (MType &Tmatrix) |
void | updateAssembly (DataType dt, DataType time, MType transform, int level) |
void | resetAssembly () |
void | partPressureForces (multi_index_type *cons, DataType *press, DataType scale) |
virtual void | logPartLoads (std::ofstream &ofs, DataType time_, int steps) |
void | send2CPT (int &nump, int &numc, point_type *vertices, multi_index_type *connections, DataType scale) |
void | vel2CPT (int &totPoints, point_type *velocities, DataType scale) |
int | GetNumPoints () |
void | GetNumPC (int &pcount, int &ccount) |
void | print (int level) |
void | printSummary (int level) |
virtual void | outputAssembly_Brep3D (DataType time, int pc, int pointCount[], int &pp, FILE *fout) |
virtual void | outputAssembly_STL (DataType time, FILE *fout) |
virtual void | Restart (std::ifstream &ifs, int &pos, double &t, double &dt) |
virtual void | Checkpointing (std::ofstream &ofs) |
virtual PType * | GetVerticies () |
virtual multi_index_type * | GetConnections () |
virtual void | makeVerticies (int n) |
virtual void | makeConnections (int n) |
virtual PType | surfacePoint (PType I_A, DataType zmin, int flag) |
virtual PType | surfacePoint (PType I_A, DataType zmin, int flag, DataType off) |
Protected Attributes | |
std::vector< int > | idTag |
std::string | name |
bool | mobile |
MType | AssemblyTmatrix |
MType | MotionTmatrix |
std::vector< base > | subAssemblies |
std::vector< PartType * > | parts |
int | num_subAssemblies |
int | num_parts |
MType | DHMat |
MType | DHMat_old |
base * | parent |
std::vector< int > | edges |
int | component |
int | backedge |
int | gdistance |
PType * | verticies |
multi_index_type * | connections |
http://en.wikipedia.org/wiki/Denavit–Hartenberg_parameters
http://elvis.rowan.edu/~kay/papers/kinematics.pdf
www.site.uottawa.ca/~petriu/generalrobotics.org-ppp-Kinematics_final.ppt
Geometry Solver USAGE:
initialize: parts and assemblies are read or created from input files.
set up:
getGeometry: called at each coupling time step
Kinematic solver
Motions and deformations can be prescribed a priori or determined on the fly from a coupled kinetic solver.
CAPABILITY / STRUCTURE NOTATION
Attachment class functionality deprecated by Denavit-Hartenberg Link and Joint classes.
DH_Link class
Joint class
Kinematic Chain Class
================================================================================================
================================================================================================
Denavit-Hartenberg kinematic chain | |||||||||||||||||||||
Link | |||||||||||||||||||||
Joint to Parent | Joint to Child | ||||||||||||||||||||
idTag | facet Id | facet Orientation | jointType | idTag | facet Id | facet Orientation | jointType | ||||||||||||||
1 | Assembly | Base | Base | NONE | NONE | Part / Assembly | outward | ||||||||||||||
2 | Part / Assembly | inward | Part / Assembly | outward | |||||||||||||||||
Part / Assembly | inward | Part / Assembly | outward | ||||||||||||||||||
Part / Assembly | inward | Part / Assembly | NONE | NONE |
================================================================================================
Denavit-Hartenberg convention and algorithm:
The four parameters , and in are generally
given the names link length, link twist, link offset, and joint angle, respectively.
Where if joint is revolute, otherwise.
And where if joint is prismatic, otherwise.
typedef ads::FixedArray<dim,int> Assembly< DataType, dim >::multi_index_type |
typedef ads::FixedArray<dim,DataType> Assembly< DataType, dim >::point_type |
References Assembly< DataType, dim >::AssemblyTmatrix, Assembly< DataType, dim >::backedge, Assembly< DataType, dim >::component, Assembly< DataType, dim >::DHMat, Assembly< DataType, dim >::DHMat_old, Assembly< DataType, dim >::edges, Assembly< DataType, dim >::gdistance, Assembly< DataType, dim >::idTag, Assembly< DataType, dim >::MotionTmatrix, Assembly< DataType, dim >::parts, and Assembly< DataType, dim >::subAssemblies.
References Assembly< DataType, dim >::AssemblyTmatrix, Assembly< DataType, dim >::backedge, Assembly< DataType, dim >::component, Assembly< DataType, dim >::DHMat, Assembly< DataType, dim >::DHMat_old, Assembly< DataType, dim >::edges, Assembly< DataType, dim >::gdistance, Assembly< DataType, dim >::idTag, Assembly< DataType, dim >::mobile, Assembly< DataType, dim >::MotionTmatrix, Assembly< DataType, dim >::name, Assembly< DataType, dim >::parent, Assembly< DataType, dim >::parts, and Assembly< DataType, dim >::subAssemblies.
virtual void Assembly< DataType, dim >::AddPart | ( | PartType & | v | ) | [inline, virtual] |
References Assembly< DataType, dim >::AddPart().
Referenced by Assembly< DataType, dim >::AddPart().
virtual void Assembly< DataType, dim >::AddSubAssembly | ( | base & | v | ) | [inline, virtual] |
References Assembly< DataType, dim >::AddSubAssembly().
Referenced by Assembly< DataType, dim >::AddSubAssembly().
virtual MType* Assembly< DataType, dim >::getAssemblyTmatrix | ( | ) | [inline, virtual] |
References Assembly< DataType, dim >::AssemblyTmatrix.
virtual multi_index_type* Assembly< DataType, dim >::GetConnections | ( | ) | [inline, virtual] |
References Assembly< DataType, dim >::connections.
Referenced by Assembly< DataType, dim >::surfacePoint().
virtual MType Assembly< DataType, dim >::GetDHMat | ( | ) | [inline, virtual] |
References Assembly< DataType, dim >::DHMat.
virtual PartType* Assembly< DataType, dim >::GetNthPart | ( | int | n | ) | [inline, virtual] |
References Assembly< DataType, dim >::parts.
Referenced by Assembly< DataType, dim >::Checkpointing(), Assembly< DataType, dim >::GetNumPC(), Assembly< DataType, dim >::GetNumPoints(), Assembly< DataType, dim >::logPartLoads(), main(), Assembly< DataType, dim >::outputAssembly_Brep3D(), Assembly< DataType, dim >::outputAssembly_STL(), Assembly< DataType, dim >::partPressureForces(), Assembly< DataType, dim >::print(), Assembly< DataType, dim >::printSummary(), Assembly< DataType, dim >::resetAssembly(), Assembly< DataType, dim >::Restart(), Assembly< DataType, dim >::send2CPT(), Assembly< DataType, dim >::updateAssembly(), and Assembly< DataType, dim >::vel2CPT().
virtual base* Assembly< DataType, dim >::GetNthSubAssembly | ( | int | n | ) | [inline, virtual] |
References Assembly< DataType, dim >::subAssemblies.
Referenced by Assembly< DataType, dim >::GetNumPC(), Assembly< DataType, dim >::GetNumPoints(), Assembly< DataType, dim >::logPartLoads(), Assembly< DataType, dim >::outputAssembly_Brep3D(), Assembly< DataType, dim >::outputAssembly_STL(), Assembly< DataType, dim >::partPressureForces(), Assembly< DataType, dim >::print(), Assembly< DataType, dim >::printSummary(), Assembly< DataType, dim >::resetAssembly(), Assembly< DataType, dim >::send2CPT(), Assembly< DataType, dim >::updateAssembly(), and Assembly< DataType, dim >::vel2CPT().
virtual int Assembly< DataType, dim >::GetNumParts | ( | ) | [inline, virtual] |
References Assembly< DataType, dim >::parts.
Referenced by Assembly< DataType, dim >::GetNumPC(), Assembly< DataType, dim >::GetNumPoints(), Assembly< DataType, dim >::logPartLoads(), Assembly< DataType, dim >::outputAssembly_Brep3D(), Assembly< DataType, dim >::outputAssembly_STL(), Assembly< DataType, dim >::partPressureForces(), Assembly< DataType, dim >::print(), Assembly< DataType, dim >::printSummary(), Assembly< DataType, dim >::resetAssembly(), Assembly< DataType, dim >::send2CPT(), Assembly< DataType, dim >::updateAssembly(), and Assembly< DataType, dim >::vel2CPT().
void Assembly< DataType, dim >::GetNumPC | ( | int & | pcount, | |
int & | ccount | |||
) | [inline] |
References Assembly< DataType, dim >::GetNthPart(), Assembly< DataType, dim >::GetNthSubAssembly(), PartBase< DataType, dim >::GetNumConnections(), Assembly< DataType, dim >::GetNumParts(), Assembly< DataType, dim >::GetNumPC(), PartBase< DataType, dim >::GetNumPoints(), and Assembly< DataType, dim >::GetNumSubAssemblies().
Referenced by Assembly< DataType, dim >::GetNumPC(), and Assembly< DataType, dim >::surfacePoint().
References Assembly< DataType, dim >::GetNthPart(), Assembly< DataType, dim >::GetNthSubAssembly(), Assembly< DataType, dim >::GetNumParts(), Assembly< DataType, dim >::GetNumPoints(), PartBase< DataType, dim >::GetNumPoints(), and Assembly< DataType, dim >::GetNumSubAssemblies().
Referenced by Assembly< DataType, dim >::GetNumPoints().
virtual int Assembly< DataType, dim >::GetNumSubAssemblies | ( | ) | [inline, virtual] |
References Assembly< DataType, dim >::subAssemblies.
Referenced by Assembly< DataType, dim >::GetNumPC(), Assembly< DataType, dim >::GetNumPoints(), Assembly< DataType, dim >::logPartLoads(), Assembly< DataType, dim >::outputAssembly_Brep3D(), Assembly< DataType, dim >::outputAssembly_STL(), Assembly< DataType, dim >::partPressureForces(), Assembly< DataType, dim >::print(), Assembly< DataType, dim >::printSummary(), Assembly< DataType, dim >::resetAssembly(), Assembly< DataType, dim >::send2CPT(), Assembly< DataType, dim >::updateAssembly(), and Assembly< DataType, dim >::vel2CPT().
virtual PType* Assembly< DataType, dim >::GetVerticies | ( | ) | [inline, virtual] |
References Assembly< DataType, dim >::verticies.
Referenced by Assembly< DataType, dim >::surfacePoint().
virtual base* Assembly< DataType, dim >::GetWorld | ( | ) | [inline, virtual] |
References Assembly< DataType, dim >::parent.
virtual void Assembly< DataType, dim >::logPartLoads | ( | std::ofstream & | ofs, | |
DataType | time_, | |||
int | steps | |||
) | [inline, virtual] |
References Assembly< DataType, dim >::GetNthPart(), Assembly< DataType, dim >::GetNthSubAssembly(), Assembly< DataType, dim >::GetNumParts(), Assembly< DataType, dim >::GetNumSubAssemblies(), PartBase< DataType, dim >::logLoad(), and Assembly< DataType, dim >::logPartLoads().
Referenced by Assembly< DataType, dim >::logPartLoads().
virtual void Assembly< DataType, dim >::makeConnections | ( | int | n | ) | [inline, virtual] |
References Assembly< DataType, dim >::connections.
Referenced by Assembly< DataType, dim >::surfacePoint().
virtual void Assembly< DataType, dim >::makeVerticies | ( | int | n | ) | [inline, virtual] |
References Assembly< DataType, dim >::verticies.
Referenced by Assembly< DataType, dim >::surfacePoint().
virtual std::string Assembly< DataType, dim >::Name | ( | ) | [inline, virtual] |
References Assembly< DataType, dim >::name.
Referenced by Assembly< DataType, dim >::AddPart(), Assembly< DataType, dim >::AddSubAssembly(), Assembly< DataType, dim >::Checkpointing(), main(), Assembly< DataType, dim >::outputAssembly_STL(), Assembly< DataType, dim >::partPressureForces(), Assembly< DataType, dim >::print(), Assembly< DataType, dim >::printSummary(), Assembly< DataType, dim >::resetAssembly(), Assembly< DataType, dim >::Restart(), Assembly< DataType, dim >::surfacePoint(), and Assembly< DataType, dim >::updateAssembly().
virtual void Assembly< DataType, dim >::outputAssembly_Brep3D | ( | DataType | time, | |
int | pc, | |||
int | pointCount[], | |||
int & | pp, | |||
FILE * | fout | |||
) | [inline, virtual] |
References Facet< DataType >::getNthCon(), Assembly< DataType, dim >::GetNthPart(), PartBase< DataType, dim >::GetNthPoint(), Assembly< DataType, dim >::GetNthSubAssembly(), PartBase< DataType, dim >::GetNumConnections(), Assembly< DataType, dim >::GetNumParts(), PartBase< DataType, dim >::GetNumPoints(), Assembly< DataType, dim >::GetNumSubAssemblies(), PartBase< DataType, dim >::Name(), and Assembly< DataType, dim >::outputAssembly_Brep3D().
Referenced by Assembly< DataType, dim >::outputAssembly_Brep3D().
virtual void Assembly< DataType, dim >::outputAssembly_STL | ( | DataType | time, | |
FILE * | fout | |||
) | [inline, virtual] |
References Assembly< DataType, dim >::GetNthPart(), Assembly< DataType, dim >::GetNthSubAssembly(), PartBase< DataType, dim >::GetNumConnections(), Assembly< DataType, dim >::GetNumParts(), Assembly< DataType, dim >::GetNumSubAssemblies(), PartBase< DataType, dim >::Name(), Assembly< DataType, dim >::Name(), PartBase< DataType, dim >::output(), Assembly< DataType, dim >::outputAssembly_STL(), and PartBase< DataType, dim >::STL.
Referenced by Assembly< DataType, dim >::outputAssembly_STL().
void Assembly< DataType, dim >::partPressureForces | ( | multi_index_type * | cons, | |
DataType * | press, | |||
DataType | scale | |||
) | [inline] |
References Assembly< DataType, dim >::GetNthPart(), Assembly< DataType, dim >::GetNthSubAssembly(), Assembly< DataType, dim >::GetNumParts(), Assembly< DataType, dim >::GetNumSubAssemblies(), Assembly< DataType, dim >::Name(), Assembly< DataType, dim >::partPressureForces(), and PartBase< DataType, dim >::pressureForce().
Referenced by Assembly< DataType, dim >::partPressureForces().
References Assembly< DataType, dim >::AssemblyTmatrix, PartBase< DataType, dim >::GetDeformation(), PartBase< DataType, dim >::GetDHMat(), PartBase< DataType, dim >::GetMobility(), Assembly< DataType, dim >::GetNthPart(), Assembly< DataType, dim >::GetNthSubAssembly(), PartBase< DataType, dim >::GetNumConnections(), Assembly< DataType, dim >::GetNumParts(), Assembly< DataType, dim >::GetNumSubAssemblies(), Assembly< DataType, dim >::IdTag(), PartBase< DataType, dim >::Name(), Assembly< DataType, dim >::Name(), Assembly< DataType, dim >::print(), and stringID().
Referenced by MotionSolver< DataType, dim >::Initialize(), and Assembly< DataType, dim >::print().
void Assembly< DataType, dim >::printSummary | ( | int | level | ) | [inline] |
References Assembly< DataType, dim >::GetNthPart(), Assembly< DataType, dim >::GetNthSubAssembly(), Assembly< DataType, dim >::GetNumParts(), Assembly< DataType, dim >::GetNumSubAssemblies(), Assembly< DataType, dim >::IdTag(), PartBase< DataType, dim >::Name(), Assembly< DataType, dim >::Name(), Assembly< DataType, dim >::printSummary(), and stringID().
Referenced by Assembly< DataType, dim >::printSummary().
References Assembly< DataType, dim >::GetNthPart(), Assembly< DataType, dim >::GetNthSubAssembly(), Assembly< DataType, dim >::GetNumParts(), Assembly< DataType, dim >::GetNumSubAssemblies(), Assembly< DataType, dim >::Name(), Assembly< DataType, dim >::resetAssembly(), and PartBase< DataType, dim >::resetPart().
Referenced by Assembly< DataType, dim >::resetAssembly().
void Assembly< DataType, dim >::send2CPT | ( | int & | nump, | |
int & | numc, | |||
point_type * | vertices, | |||
multi_index_type * | connections, | |||
DataType | scale | |||
) | [inline] |
References Facet< DataType >::getNthCon(), PartBase< DataType, dim >::GetNthConnection(), Assembly< DataType, dim >::GetNthPart(), PartBase< DataType, dim >::GetNthPointAddress(), Assembly< DataType, dim >::GetNthSubAssembly(), PartBase< DataType, dim >::GetNumConnections(), Assembly< DataType, dim >::GetNumParts(), PartBase< DataType, dim >::GetNumPoints(), Assembly< DataType, dim >::GetNumSubAssemblies(), Assembly< DataType, dim >::send2CPT(), and PartBase< DataType, dim >::setCGS().
Referenced by Assembly< DataType, dim >::send2CPT(), and Assembly< DataType, dim >::surfacePoint().
void Assembly< DataType, dim >::setAssemblyMotion | ( | MType & | Tmatrix | ) | [inline] |
References Assembly< DataType, dim >::MotionTmatrix.
virtual void Assembly< DataType, dim >::setAssemblyTmatrix | ( | const MType | ttemp | ) | [inline, virtual] |
References Assembly< DataType, dim >::AssemblyTmatrix.
virtual void Assembly< DataType, dim >::setAssemblyTmatrix | ( | ) | [inline, virtual] |
References Assembly< DataType, dim >::AssemblyTmatrix.
virtual void Assembly< DataType, dim >::setDHMat | ( | MType | val | ) | [inline, virtual] |
References Assembly< DataType, dim >::DHMat.
virtual void Assembly< DataType, dim >::setDim | ( | ) | [inline, virtual] |
virtual void Assembly< DataType, dim >::setIdTag | ( | std::vector< int > | val | ) | [inline, virtual] |
References Assembly< DataType, dim >::idTag.
Referenced by Assembly< DataType, dim >::AddSubAssembly().
virtual void Assembly< DataType, dim >::setName | ( | std::string | val | ) | [inline, virtual] |
References Assembly< DataType, dim >::name.
Referenced by main().
virtual PType Assembly< DataType, dim >::surfacePoint | ( | PType | I_A, | |
DataType | zmin, | |||
int | flag, | |||
DataType | off | |||
) | [inline, virtual] |
References Assembly< DataType, dim >::GetConnections(), Assembly< DataType, dim >::GetNumPC(), Assembly< DataType, dim >::GetVerticies(), intersection_line2facet(), Assembly< DataType, dim >::makeConnections(), Assembly< DataType, dim >::makeVerticies(), Assembly< DataType, dim >::Name(), normalize(), and Assembly< DataType, dim >::send2CPT().
void Assembly< DataType, dim >::updateAssembly | ( | DataType | dt, | |
DataType | time, | |||
MType | transform, | |||
int | level | |||
) | [inline] |
References Assembly< DataType, dim >::GetNthPart(), Assembly< DataType, dim >::GetNthSubAssembly(), PartBase< DataType, dim >::GetNumConnections(), Assembly< DataType, dim >::GetNumParts(), Assembly< DataType, dim >::GetNumSubAssemblies(), PartBase< DataType, dim >::Name(), Assembly< DataType, dim >::Name(), Assembly< DataType, dim >::updateAssembly(), and PartBase< DataType, dim >::updatePart().
Referenced by Assembly< DataType, dim >::updateAssembly().
void Assembly< DataType, dim >::vel2CPT | ( | int & | totPoints, | |
point_type * | velocities, | |||
DataType | scale | |||
) | [inline] |
References Assembly< DataType, dim >::GetNthPart(), Assembly< DataType, dim >::GetNthSubAssembly(), PartBase< DataType, dim >::GetNthVelocityAddress(), Assembly< DataType, dim >::GetNumParts(), PartBase< DataType, dim >::GetNumPoints(), Assembly< DataType, dim >::GetNumSubAssemblies(), and Assembly< DataType, dim >::vel2CPT().
Referenced by SceneBase< DataType, 3 >::Restart(), and Assembly< DataType, dim >::vel2CPT().
MType Assembly< DataType, dim >::AssemblyTmatrix [protected] |
Referenced by Assembly< DataType, dim >::Assembly().
Referenced by Assembly< DataType, dim >::Assembly().
multi_index_type* Assembly< DataType, dim >::connections [protected] |
Referenced by Assembly< DataType, dim >::Assembly().
Referenced by Assembly< DataType, dim >::Assembly().
Referenced by Assembly< DataType, dim >::Assembly().
A std::vector of integers (+ for assemblies, - for parts) for the assemblies from base assembly to this assembly. idTag[ ] is the index number of the Assembly in the subAssemblies of Assembly[]. idTag[] is the index number of the base Assembly in the Scene's assemblyList. Assembly index
Referenced by Assembly< DataType, dim >::AddPart(), Assembly< DataType, dim >::AddSubAssembly(), Assembly< DataType, dim >::Assembly(), Assembly< DataType, dim >::IdTag(), and Assembly< DataType, dim >::setIdTag().
Referenced by Assembly< DataType, dim >::Assembly().
MType Assembly< DataType, dim >::MotionTmatrix [protected] |
Referenced by Assembly< DataType, dim >::Assembly(), and Assembly< DataType, dim >::setAssemblyMotion().
Referenced by Assembly< DataType, dim >::Checkpointing(), and Assembly< DataType, dim >::Restart().
int Assembly< DataType, dim >::num_subAssemblies [protected] |
Referenced by Assembly< DataType, dim >::Checkpointing(), and Assembly< DataType, dim >::Restart().
Referenced by Assembly< DataType, dim >::Assembly(), and Assembly< DataType, dim >::GetWorld().
std::vector<base > Assembly< DataType, dim >::subAssemblies [protected] |
Referenced by Assembly< DataType, dim >::GetVerticies(), and Assembly< DataType, dim >::makeVerticies().