19 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
20 #include <dtkCoreSupport/dtkAbstractProcessFactory.h>
25 class axlShapeConverterPrivate {
40 return "Converter from axlShape to axlMesh";
44 return "axlShapeConverter";
48 return QStringList() <<
"axlShapeConverter" <<
"axlShape";
56 return dtkAbstractDataFactory::instance()->registerDataConverterType(
"axlShapeConverter", QStringList(),
"axlMesh",
createaxlShapeConverter);
69 QVector<axlPoint*> vertices = d->data->getVertices();
70 for (
int k = 0; k < d->data->getVertexCount(); k++) {
74 dtkWarn() <<
"nb of edges" << d->data->getEdgeCount();
77 QVector<axlShape::Edge*> allEdges = d->data->getEdges();
78 for (
int k = 0; k < d->data->getEdgeCount(); k++) {
83 QString converterName = currEdge.
curve->identifier()+
"Converter";
84 dtkWarn() << currEdge.
curve->identifier()+
"Converter";
90 converter->setData(currEdge.
curve);
94 if (!converter->
toMesh()) {
95 dtkWarn() <<
"Mesh is NULL within converterName::toMesh";
98 dtkWarn() <<
"No converter found for" << currEdge.
curve->identifier();
101 dtkWarn() <<
"nb of faces" << d->data->getFaceCount();
104 QVector<axlShape::Face*> allFaces = d->data->getFaces();
105 for (
int k = 0; k < d->data->getFaceCount(); k++) {
110 QString converterName = currFace.
surface->identifier()+
"Converter";
111 dtkWarn() << currFace.
surface->identifier()+
"Converter";
116 if (converter && currFace.
loops.size()==1) {
117 converter->setData(currFace.
surface);
119 if (!converter->
toMesh()) {
120 dtkWarn() <<
"Mesh is NULL within converterName::toMesh";
123 dtkWarn() <<
"No converter found for face with " << currFace.
surface->identifier();
134 dtkWarn() << Q_FUNC_INFO <<
"mesh is created with axlShapeConverter"
142 if(
axlShape* shape = dynamic_cast<axlShape*>(data))
virtual ~axlShapeConverter(void)
int face_count(void) const
axlAbstractCurveParametric * curve
Pointer to the parametric curve supporting the edge, of type axlAbstractCurveParametric.
QString description(void) const
virtual void setOutput(axlAbstractData *output)
bool vertex_show(void) const
int indexStartVertex
Index of the starting point of the edge in the array of vertices of the axlShape. ...
virtual void setParams(int channel, int index)
bool normal_used(void) const
void setData(dtkAbstractData *data)
static bool registered(void)
QString toType(void) const
bool edge_show(void) const
int edge_count(void) const
int indexEndVertex
Index of the ending point of the edge in the array of vertices of the axlShape.
axlAbstractSurfaceParametric * surface
Pointer to the supporting surface of type axlAbstractSurfaceParametric.
QString identifier(void) const
bool face_show(void) const
QVector< Loop * > loops
Vector of all the loops defining the face.
bool color_used(void) const
dtkAbstractDataConverter * createaxlShapeConverter(void)
QStringList fromTypes(void) const
virtual axlMesh * toMesh(void)
Mesh conversion.
int vertex_count(void) const
Class axlMesh defines a piecewise-linear 3D object.
void push_back_vertex(const double &x, const double &y, const double &z)
Add a new vertex to the mesh.