TexGen
|
Abstract base class representing the domain in which a textile cell may lie. More...
#include <Domain.h>
Public Member Functions | |
CDomain (void) | |
CDomain (TiXmlElement &Element) | |
virtual | ~CDomain (void) |
virtual CDomain * | Copy () const =0 |
virtual void | PopulateTiXmlElement (TiXmlElement &Element, OUTPUT_TYPE OutputType=OUTPUT_STANDARD) const |
Used for saving data to XML. More... | |
vector< pair< int, int > > | GetRepeatLimits (const CYarn &Yarn) const |
vector< XYZ > | GetTranslations (const CYarn &Yarn) const |
Get the translation vectors necessary to fully fill the domain. More... | |
virtual void | ClipMeshToDomain (CMesh &Mesh, bool bFillGaps=true) const =0 |
Clip the surface elements to the domain. More... | |
virtual bool | ClipMeshToDomain (CMesh &Mesh, vector< CMesh > &DomainMeshes, bool bFillGaps=true) const =0 |
Clip the surface elements to the domain. More... | |
virtual string | GetType () const =0 |
Derived class should return the class name. More... | |
const CMesh & | GetMesh () const |
Get the mesh representing the domain as a surface mesh. More... | |
virtual double | GetVolume () const |
Get the volume of the domain. More... | |
virtual void | Grow (double dDistance)=0 |
Make the domain larger (used mainly for rendering purposes) More... | |
virtual void | Rotate (WXYZ Rotation)=0 |
Rotate the domain by given rotation quaternion. More... | |
virtual void | Translate (XYZ Vector)=0 |
Translate the domain by given vector. More... | |
virtual void | Deform (CLinearTransformation Transformation)=0 |
Deform the domain by given linear transformation. More... | |
virtual bool | PointInDomain (const XYZ &Point) const =0 |
Check if a point lies inside the domain. More... | |
CDomainPrism * | GetPrismDomain () |
Protected Member Functions | |
pair< double, double > | GetLimits (XYZ RepeatVector, const CMesh &Mesh) const |
Get the limits for a single given repeat vector and surface mesh. More... | |
bool | MeshIntersectsDomain (const CMesh &Mesh) const |
Determine if a mesh intersects with the domain. More... | |
Static Protected Member Functions | |
static vector< pair< int, int > > | ConvertLimitsToInt (const vector< pair< double, double > > &RepeatLimits) |
Protected Attributes | |
CMesh | m_Mesh |
A mesh representing the domain as a surface mesh. More... | |
Abstract base class representing the domain in which a textile cell may lie.
CDomain::CDomain | ( | void | ) |
Definition at line 26 of file Domain.cpp.
CDomain::CDomain | ( | TiXmlElement & | Element | ) |
Definition at line 34 of file Domain.cpp.
References m_Mesh.
|
virtual |
Definition at line 30 of file Domain.cpp.
|
pure virtual |
Clip the surface elements to the domain.
For surface elements (TRI and QUAD elements) the elements will be either kept, discarded or trimmed depending on their location relative to the domain. For volume elements (TET, HEX) the elements will be either kept or discarded. No trimming occurs in this case to avoid poorly shaped elements. The center of the element is used to determine whether the element should be kept or discarded. For certain finite element analyses simulations can be performed without any trimming.
Mesh | The mesh instance to be clipped, this will be modified in place |
bFillGaps | If set to true the resulting holes will be filled with a triangulated mesh |
Implemented in TexGen::CDomainPlanes, and TexGen::CDomainPrism.
Referenced by TexGen::CYarn::AddCentrePlaneToMesh(), TexGen::CYarn::AddSurfaceToMesh(), and TexGen::CYarn::AddVolumeToMesh().
|
pure virtual |
Clip the surface elements to the domain.
Mesh | The mesh instance to be clipped, this will be modified in place |
DomainMeshes | One mesh for each plane which domain/mesh intersection polygons are added |
bFillGaps | If set to true the resulting holes will be filled with a triangulated mesh |
Implemented in TexGen::CDomainPlanes, and TexGen::CDomainPrism.
|
staticprotected |
Definition at line 59 of file Domain.cpp.
Referenced by GetRepeatLimits().
|
pure virtual |
Implemented in TexGen::CDomainPlanes, and TexGen::CDomainPrism.
Referenced by TexGen::CTexGenRenderer::RenderDomain().
|
pure virtual |
Deform the domain by given linear transformation.
Implemented in TexGen::CDomainPlanes, and TexGen::CDomainPrism.
Referenced by TexGen::CTextileDeformer::DeformTextile().
Get the limits for a single given repeat vector and surface mesh.
The limits are the points where the whole surface mesh lies outside the domain The limit is represented as the factor multiplied by the repeat vector that represents the translation of the surface mesh to the limiting case.
RepeatVector | The repeat vector to get limit for |
Mesh | The surface mesh that needs to lie behind the plane |
Definition at line 108 of file Domain.cpp.
References TexGen::DotProduct(), TexGen::GetLength(), TexGen::CMesh::GetNodes(), m_Mesh, TexGen::CMesh::NodesBegin(), and TexGen::CMesh::NodesEnd().
Referenced by GetRepeatLimits().
|
inline |
Get the mesh representing the domain as a surface mesh.
Definition at line 73 of file Domain.h.
Referenced by TexGen::CRectangularVoxelMesh::CalculateVoxelSizes(), TexGen::CRotatedVoxelMesh::CalculateVoxelSizes(), TexGen::CShearedVoxelMesh::CalculateVoxelSizes(), TexGen::CExporter::ConvertDomain(), TexGen::CBasicVolumes::CreateBasicVolumes(), TexGen::CSimulationAbaqus::CreatePeriodicBoundaries(), TexGen::CGeometrySolver::CreateSystem(), TexGen::CShearedTextileWeave2D::CreateTopAndBottomMeshes(), TexGen::COctreeVoxelMesh::OutputPeriodicBoundaries(), TexGen::CStaggeredVoxelMesh::OutputPeriodicBoundaries(), TexGen::CVoxelMesh::OutputPeriodicBoundaries(), TexGen::CTexGenRenderer::RenderDomain(), TexGen::CTexGenRenderer::RenderDomainAxes(), TexGen::CTexGenRenderer::RenderGrid(), TexGen::CTexGenRenderer::SaveTextileToVTK(), TexGen::CMesher::SaveVolumeMeshToABAQUS(), and TexGen::COctreeVoxelMesh::SaveVoxelMesh().
CDomainPrism * CDomain::GetPrismDomain | ( | ) |
Definition at line 54 of file Domain.cpp.
Referenced by TexGen::CPrismVoxelMesh::CalculateVoxelSizes(), and TexGen::CPrismVoxelMesh::GetElementMap().
vector< pair< int, int > > CDomain::GetRepeatLimits | ( | const CYarn & | Yarn | ) | const |
Get the limits associated with each repeat vector, that is the upper and lower bounds multiplied to the repeat vector for the entire yarn to lie just outside out of the domain
Definition at line 148 of file Domain.cpp.
References TexGen::CYarn::AddAABBToMesh(), ConvertLimitsToInt(), GetLimits(), TexGen::CYarn::GetRepeats(), and TGERROR.
Referenced by TexGen::CExporter::ConvertYarn(), and GetTranslations().
Get the translation vectors necessary to fully fill the domain.
Definition at line 83 of file Domain.cpp.
References TexGen::CYarn::AddAABBToMesh(), TexGen::CopyToRange(), GetRepeatLimits(), TexGen::CYarn::GetRepeats(), MeshIntersectsDomain(), and TexGen::CMesh::Translate().
Referenced by TexGen::CYarn::AddCentrePlaneToMesh(), TexGen::CYarn::AddSurfaceToMesh(), TexGen::CYarn::AddVolumeToMesh(), TexGen::CAdjustMeshInterference::AdjustSectionMeshes(), TexGen::CGeometrySolver::AssignFibreDirectionToElements(), TexGen::CTextileDeformer::DeformTextile(), TexGen::CMesher::FillYarnTangentsData(), and TexGen::CTextile::GetPointInformation().
|
pure virtual |
Derived class should return the class name.
Implemented in TexGen::CDomainPlanes, and TexGen::CDomainPrism.
Referenced by TexGen::CExporter::ConvertDomain(), PopulateTiXmlElement(), TexGen::CSurfaceMesh::SaveSurfaceMesh(), and TexGen::CTextile3DWeave::SetDomainZValues().
|
virtual |
Get the volume of the domain.
Definition at line 70 of file Domain.cpp.
References TexGen::CMesh::CalculateVolume(), and m_Mesh.
|
pure virtual |
Make the domain larger (used mainly for rendering purposes)
Implemented in TexGen::CDomainPlanes, and TexGen::CDomainPrism.
Referenced by TexGen::CTexGenRenderer::RenderDomain().
|
protected |
Determine if a mesh intersects with the domain.
This is a very crude approximation of whether a mesh intersects the domain or not. It is based soley on the axis aligned bounding boxes of the two regions.
Definition at line 75 of file Domain.cpp.
References TexGen::BoundingBoxIntersect(), TexGen::CMesh::GetAABB(), and m_Mesh.
Referenced by GetTranslations().
|
pure virtual |
Check if a point lies inside the domain.
Implemented in TexGen::CDomainPlanes, and TexGen::CDomainPrism.
|
virtual |
Used for saving data to XML.
Reimplemented in TexGen::CDomainPlanes, and TexGen::CDomainPrism.
Definition at line 43 of file Domain.cpp.
References GetType(), m_Mesh, TexGen::OUTPUT_FULL, and TexGen::CMesh::PopulateTiXmlElement().
Referenced by TexGen::CDomainPlanes::PopulateTiXmlElement(), and TexGen::CDomainPrism::PopulateTiXmlElement().
|
pure virtual |
Rotate the domain by given rotation quaternion.
Implemented in TexGen::CDomainPlanes, and TexGen::CDomainPrism.
|
pure virtual |
Translate the domain by given vector.
Implemented in TexGen::CDomainPlanes, and TexGen::CDomainPrism.
|
protected |
A mesh representing the domain as a surface mesh.
Definition at line 112 of file Domain.h.
Referenced by TexGen::CDomainPlanes::BuildMesh(), TexGen::CDomainPrism::BuildMesh(), CDomain(), TexGen::CDomainPlanes::CDomainPlanes(), TexGen::CDomainPrism::CDomainPrism(), TexGen::CDomainPrism::GeneratePlanes(), GetLimits(), TexGen::CDomainPrism::GetMeshWithPolygonEnd(), GetVolume(), MeshIntersectsDomain(), and PopulateTiXmlElement().