Class axlShapeBSpline defines a set of boundary curves (Edges) and bspline surface patches (Face). More...
#include <axlShapeBSpline.h>
Classes | |
struct | ControlPoint |
struct | Edge |
struct | Face |
Signals | |
void | indexSelected (int i) |
Signals inherited from axlAbstractData | |
void | modifiedGeometry (void) |
void | modifiedStructure (void) |
void | modifiedField (void) |
void | modifiedProperty (void) |
Public Member Functions | |
axlShapeBSpline () | |
~axlShapeBSpline () | |
QString | description (void) const |
Return a description of the surface. More... | |
QString | identifier (void) const |
Return the "axlShapeBSpline" identifier.Useful for data factory. More... | |
void | setSurface (int order_u, int order_v, int nbpoints, int nbEdges, int nbFaces, double *points, QVector< QVector< int > > pe, QVector< QVector< int > >pf, QVector< QPair< int, int > >npf) |
Create a surface. More... | |
void | setControlPoints (int nbpoints, double *points) |
Add control points to the Surface. All points should be on the plane z =0;. More... | |
void | setFace (int i, QVector< int > p, int order_u, int order_v, int nu, int nv) |
Add or modify a face to the Surface. More... | |
void | setFace (int i, QVector< int > p, axlAbstractSurfaceBSpline *surf) |
Add or modify a face to the Surface. More... | |
void | setEdge (int i, QVector< int > p, int order) |
Add or modify an edge to the Surface. More... | |
void | setEdge (int i, QVector< int > p, axlAbstractCurveBSpline *curv) |
Add or modify an edge to the Surface. More... | |
void | removeEdge (int i) |
Remove an edge. More... | |
void | createSurfaceFromBSplineDataSet (QList< axlAbstractSurfaceBSpline * > dataSet) |
Create an axlShapeBSpline from a set of axlAbstractSurfaceBSpline. More... | |
Edge * | getEdge (int i) |
Return edge. More... | |
Face * | getFace (int i) |
Return face. More... | |
ControlPoint * | getPoint (int i) |
Return control point. More... | |
axlPoint | getCoef (int index) const |
Get a coefficient of the surface. More... | |
bool | setCoef (int index, double *newCoordinate) |
Modified a coefficient of the surface. More... | |
int | countControlPoints () const |
Modified a coefficient of the surface. More... | |
int | countBoundaryEdges () const |
Return how many edges. More... | |
int | order_u () const |
Return the order of the surface for the u parameter. More... | |
int | order_v () const |
Return the order of the surface for the v parameter. More... | |
int | numSamples_u (int numCell) |
Mesh subdision on the u-direction. More... | |
int | numSamples_v (int numCell) |
Mesh subdision on the v-direction. More... | |
void | setNumSamples_u (int numSamples) |
Modify mesh subdision on the v-direction. Same for all faces. More... | |
void | setNumSamples_v (int numSamples) |
Modify mesh subdision on the v-direction. Same for all faces. More... | |
int | stripes (void) |
void | setStripes (int stripes) |
void | normal (axlPoint *normal, double u, double v) |
void | eval (axlPoint *point, double u, double v) |
bool | connectionsAreDefined (void) |
Return true if control points connections were defined by developers. False if there are default connections visualization. More... | |
QList< int > | getControlPointConnection (int i) |
int | countControlPoints_u (void) const |
int | countControlPoints_v (void) const |
void | selectIndex (int i) |
double | scalarValue (double u, double v) |
void | setScalarValue (double u, double v, double value) |
double | startParam_u (int i) |
Return the first u parameter value of a face. More... | |
double | startParam_v (int i) |
Return the first u parameter value of a face. More... | |
double | endParam_u (int i) |
Return the last u parameter value of a face. More... | |
double | endParam_v (int i) |
Return the last v parameter value of a face. More... | |
void | eval (axlPoint *point, double u, double v, int i) |
Compute coordinates of a point of the Surface. More... | |
void | normal (axlPoint *currentNormal, double paramCourant_u, double paramCourant_v, int indice) |
Compute normal. More... | |
bool | hasFaces (void) |
Return whether the surface have several faces. More... | |
int | countFaces (void) |
Return how many faces. More... | |
void | insert_point (double x, double y, double z) |
Add a point to the control point set of the surface. More... | |
void | insert_point (axlPoint *point) |
Add a point to the control point set of the surface. More... | |
void | insert_edge (Edge *edge) |
Add an edge to the surface. More... | |
void | insert_face (Face *face) |
Add a face to the surface. More... | |
void | updateFaceEdges (int numFace) |
Update indices list of the face edges. More... | |
void | emitEdgeSelected (int numEdge) |
Public Member Functions inherited from axlAbstractData | |
axlAbstractData (axlAbstractData *parent=NULL) | |
axlAbstractData (const axlAbstractData &data) | |
virtual | ~axlAbstractData (void) |
const QColor & | color (void) const |
const double & | opacity (void) const |
const double & | size (void) const |
const QString & | shader (void) const |
const bool & | editable (void) |
const bool & | updateView (void) |
void | setColor (double r, double g, double b) |
void | addField (axlAbstractField *field) |
Add a field to the field list of the object. More... | |
bool | updateFieldList (QString nameField) |
Check if a field with the same name is already applied on the object. More... | |
QString | changeFieldName (QString fieldName) |
axlMesh * | mesh (void) |
Return the mesh of that object is computed. More... | |
void | setMesh (axlMesh *mesh) |
Set a corresponding mesh for that object. More... | |
virtual QVariantList | convertDataToQVariant (void) const |
Convert an axlAbstractData into a QVariantList that specifies all properties of the axlAbstractData. More... | |
virtual int | convertQVariantToData (const QVariantList &data) |
Modify properties and geometry variables of the axlAbstractData. Return 1 if the modification was sucessfully made. Otherwise return 0. More... | |
void | setUpdateView (bool updateView) |
QList< axlAbstractField * > | fields (void) |
Static Public Member Functions | |
static bool | registered (void) |
Emit a signal edgesSeleted. More... | |
Additional Inherited Members | |
Public Slots inherited from axlAbstractData | |
void | touchGeometry (void) |
void | touchProperty (void) |
void | touchStructure (void) |
virtual void | touchField (void) |
void | setColor (const QColor &color) |
void | setOpacity (const double &opacity) |
void | setSize (const double &size) |
void | setShader (const QString &shader) |
void | setEditable (bool edit) |
Properties inherited from axlAbstractData | |
QColor | color |
double | opacity |
double | size |
QString | shader |
Class axlShapeBSpline defines a set of boundary curves (Edges) and bspline surface patches (Face).
To build each Edge and Face of an axlShapeBSpline, control points must be specified as their supports are respectively bspline curves and bspline surfaces. To be sure a control point is shared by different element and not duplicated, control point point must be defines one, even if it is shared by several Faces and/or Edges. This type of object is used in mesherplugin, which connect Axel and Num3sis simulator, as a geometry of a problem. Edges are useful to determine where to apply boundary conditions of a physical problem. Faces are useful for meshing by divided the geometry into several domains.
Definition at line 12 of file axlShapeBSpline.h.
axlShapeBSpline::axlShapeBSpline | ( | ) |
Definition at line 25 of file axlShapeBSpline.cpp.
axlShapeBSpline::~axlShapeBSpline | ( | ) |
Definition at line 30 of file axlShapeBSpline.cpp.
bool axlShapeBSpline::connectionsAreDefined | ( | void | ) |
Return true if control points connections were defined by developers. False if there are default connections visualization.
Definition at line 418 of file axlShapeBSpline.cpp.
int axlShapeBSpline::countBoundaryEdges | ( | ) | const |
Return how many edges.
Definition at line 485 of file axlShapeBSpline.cpp.
int axlShapeBSpline::countControlPoints | ( | void | ) | const |
Modified a coefficient of the surface.
index | : coefficient index. |
Definition at line 319 of file axlShapeBSpline.cpp.
int axlShapeBSpline::countControlPoints_u | ( | void | ) | const |
Definition at line 397 of file axlShapeBSpline.cpp.
int axlShapeBSpline::countControlPoints_v | ( | void | ) | const |
Definition at line 403 of file axlShapeBSpline.cpp.
int axlShapeBSpline::countFaces | ( | void | ) |
Return how many faces.
Definition at line 477 of file axlShapeBSpline.cpp.
void axlShapeBSpline::createSurfaceFromBSplineDataSet | ( | QList< axlAbstractSurfaceBSpline * > | dataSet | ) |
Create an axlShapeBSpline from a set of axlAbstractSurfaceBSpline.
dataSet | : set of axlAbstractSurfaceBSpline. |
Definition at line 117 of file axlShapeBSpline.cpp.
QString axlShapeBSpline::description | ( | void | ) | const |
Return a description of the surface.
Definition at line 76 of file axlShapeBSpline.cpp.
void axlShapeBSpline::emitEdgeSelected | ( | int | numEdge | ) |
double axlShapeBSpline::endParam_u | ( | int | i | ) |
Return the last u parameter value of a face.
i | : face identifier. |
Definition at line 442 of file axlShapeBSpline.cpp.
double axlShapeBSpline::endParam_v | ( | int | i | ) |
Return the last v parameter value of a face.
i | : face identifier. |
Definition at line 450 of file axlShapeBSpline.cpp.
void axlShapeBSpline::eval | ( | axlPoint * | point, |
double | u, | ||
double | v | ||
) |
Definition at line 360 of file axlShapeBSpline.cpp.
void axlShapeBSpline::eval | ( | axlPoint * | point, |
double | u, | ||
double | v, | ||
int | i | ||
) |
Compute coordinates of a point of the Surface.
point | : point of the surface. |
u | : value of the u-parameter. |
v | : value of the v-parameter. |
i | : face identifier. |
Definition at line 460 of file axlShapeBSpline.cpp.
axlPoint axlShapeBSpline::getCoef | ( | int | index | ) | const |
Get a coefficient of the surface.
index | : coefficient index. |
Definition at line 283 of file axlShapeBSpline.cpp.
QList< int > axlShapeBSpline::getControlPointConnection | ( | int | i | ) |
Definition at line 409 of file axlShapeBSpline.cpp.
axlShapeBSpline::Edge * axlShapeBSpline::getEdge | ( | int | i | ) |
Return edge.
i | : edge identifier. |
Definition at line 493 of file axlShapeBSpline.cpp.
axlShapeBSpline::Face * axlShapeBSpline::getFace | ( | int | i | ) |
Return face.
i | : face identifier. |
Definition at line 501 of file axlShapeBSpline.cpp.
axlShapeBSpline::ControlPoint * axlShapeBSpline::getPoint | ( | int | i | ) |
Return control point.
i | : control point identifier. |
Definition at line 509 of file axlShapeBSpline.cpp.
bool axlShapeBSpline::hasFaces | ( | void | ) |
Return whether the surface have several faces.
Definition at line 469 of file axlShapeBSpline.cpp.
QString axlShapeBSpline::identifier | ( | void | ) | const |
Return the "axlShapeBSpline" identifier.Useful for data factory.
Definition at line 68 of file axlShapeBSpline.cpp.
|
signal |
void axlShapeBSpline::insert_edge | ( | Edge * | edge | ) |
Add an edge to the surface.
edge | : edge of type axlShapeBSpline::Edge. |
Definition at line 690 of file axlShapeBSpline.cpp.
void axlShapeBSpline::insert_face | ( | Face * | face | ) |
Add a face to the surface.
face | : face of type axlShapeBSpline::Face. |
Definition at line 698 of file axlShapeBSpline.cpp.
void axlShapeBSpline::insert_point | ( | double | x, |
double | y, | ||
double | z | ||
) |
Add a point to the control point set of the surface.
x | : x-coordinate. |
y | : y-coordinate |
z | : z-coordinate |
Definition at line 681 of file axlShapeBSpline.cpp.
void axlShapeBSpline::insert_point | ( | axlPoint * | point | ) |
Add a point to the control point set of the surface.
point | : a point. |
Definition at line 670 of file axlShapeBSpline.cpp.
void axlShapeBSpline::normal | ( | axlPoint * | normal, |
double | u, | ||
double | v | ||
) |
Definition at line 367 of file axlShapeBSpline.cpp.
void axlShapeBSpline::normal | ( | axlPoint * | currentNormal, |
double | paramCourant_u, | ||
double | paramCourant_v, | ||
int | indice | ||
) |
Compute normal.
currentNormal | : normal. |
paramCourant_u | : value of the u-parameter. |
paramCourant_v | : value of the v-parameter. |
indice | : face identifier. |
Definition at line 561 of file axlShapeBSpline.cpp.
int axlShapeBSpline::numSamples_u | ( | int | i | ) |
Mesh subdision on the u-direction.
i | : face identifier. |
Definition at line 517 of file axlShapeBSpline.cpp.
int axlShapeBSpline::numSamples_v | ( | int | i | ) |
Mesh subdision on the v-direction.
i | : face identifier. |
Definition at line 526 of file axlShapeBSpline.cpp.
int axlShapeBSpline::order_u | ( | void | ) | const |
Return the order of the surface for the u parameter.
Definition at line 94 of file axlShapeBSpline.cpp.
int axlShapeBSpline::order_v | ( | void | ) | const |
Return the order of the surface for the v parameter.
Definition at line 105 of file axlShapeBSpline.cpp.
|
static |
Emit a signal edgesSeleted.
numEdge | : the identifier of the Edge selected.Registered the data in the data factory. |
Definition at line 59 of file axlShapeBSpline.cpp.
void axlShapeBSpline::removeEdge | ( | int | i | ) |
double axlShapeBSpline::scalarValue | ( | double | u, |
double | v | ||
) |
Definition at line 374 of file axlShapeBSpline.cpp.
|
inline |
Definition at line 166 of file axlShapeBSpline.h.
bool axlShapeBSpline::setCoef | ( | int | index, |
double * | newCoordinate | ||
) |
Modified a coefficient of the surface.
index | : coefficient index. |
Definition at line 293 of file axlShapeBSpline.cpp.
void axlShapeBSpline::setControlPoints | ( | int | nbpoints, |
double * | points | ||
) |
Add control points to the Surface. All points should be on the plane z =0;.
nbpoints | : number of control points. |
points | : points coordinates, size of points is equal to 3*nbpoints. |
Definition at line 184 of file axlShapeBSpline.cpp.
void axlShapeBSpline::setEdge | ( | int | i, |
QVector< int > | p, | ||
int | order | ||
) |
Add or modify an edge to the Surface.
i | : edge identifier. |
p | : set of indices of control points owned by the face support. |
order | : curve support order. |
Definition at line 218 of file axlShapeBSpline.cpp.
void axlShapeBSpline::setEdge | ( | int | i, |
QVector< int > | p, | ||
axlAbstractCurveBSpline * | curv | ||
) |
Add or modify an edge to the Surface.
i | : edge identifier. |
p | : set of indices of control points owned by the face support. |
curv | : curve support. |
Definition at line 253 of file axlShapeBSpline.cpp.
void axlShapeBSpline::setFace | ( | int | i, |
QVector< int > | p, | ||
int | order_u, | ||
int | order_v, | ||
int | nu, | ||
int | nv | ||
) |
Add or modify a face to the Surface.
i | : face identifier. |
p | : set of indices of control points owned by the surface support. |
order_u | : surface support order for u parameter. |
order_v | : surface support order for v parameter. |
nu | : number of control point the u-direction. |
nv | : number of control point the v-direction. |
Definition at line 200 of file axlShapeBSpline.cpp.
void axlShapeBSpline::setFace | ( | int | i, |
QVector< int > | p, | ||
axlAbstractSurfaceBSpline * | surf | ||
) |
Add or modify a face to the Surface.
i | : face identifier. |
p | : set of indices of control points owned by the surface support. |
surf | : surface support. |
Definition at line 236 of file axlShapeBSpline.cpp.
void axlShapeBSpline::setNumSamples_u | ( | int | numSamples | ) |
Modify mesh subdision on the v-direction. Same for all faces.
numSamples | : number of points for the subdivision. |
Definition at line 534 of file axlShapeBSpline.cpp.
void axlShapeBSpline::setNumSamples_v | ( | int | numSamples | ) |
Modify mesh subdision on the v-direction. Same for all faces.
numSamples | : number of points for the subdivision. |
Definition at line 549 of file axlShapeBSpline.cpp.
void axlShapeBSpline::setScalarValue | ( | double | u, |
double | v, | ||
double | value | ||
) |
Definition at line 379 of file axlShapeBSpline.cpp.
void axlShapeBSpline::setStripes | ( | int | stripes | ) |
Definition at line 391 of file axlShapeBSpline.cpp.
void axlShapeBSpline::setSurface | ( | int | order_u, |
int | order_v, | ||
int | nbpoints, | ||
int | nbEdges, | ||
int | nbFaces, | ||
double * | points, | ||
QVector< QVector< int > > | pe, | ||
QVector< QVector< int > > | pf, | ||
QVector< QPair< int, int > > | npf | ||
) |
Create a surface.
order_u | : surface order for u parameter. |
order_v | : surface order for v parameter. |
nbpoints | : number of control points. |
nbEdges | : number of edges. |
nbFaces | : number of faces. |
points | : points coordinates, size of points is equal to 3*nbpoints. |
pe | : contains all set of indices to precise what points is owned by each edge. |
pf | : contains all set of indices to precise what points is owned by each face. |
npf | : contains all pair of size to precise how many control points for the u-direction and the v-direction, for each face. |
Definition at line 167 of file axlShapeBSpline.cpp.
double axlShapeBSpline::startParam_u | ( | int | i | ) |
Return the first u parameter value of a face.
i | : face identifier. |
Definition at line 426 of file axlShapeBSpline.cpp.
double axlShapeBSpline::startParam_v | ( | int | i | ) |
Return the first u parameter value of a face.
i | : face identifier. |
Definition at line 434 of file axlShapeBSpline.cpp.
int axlShapeBSpline::stripes | ( | void | ) |
Definition at line 384 of file axlShapeBSpline.cpp.
void axlShapeBSpline::updateFaceEdges | ( | int | numFace | ) |
Update indices list of the face edges.
numFace | : face identifier. |
Definition at line 569 of file axlShapeBSpline.cpp.