PDA

View Full Version : Qwt3DSurfacePlot::setPlotStyle(Qwt3D::WIREFRAME) : turn off last point connection?



whoopi_cat
17th August 2011, 17:43
Hi all,

I'm using Qwt3D to create a 3D "line plot." All is working perfectly in this way:



PlotWindow3D::PlotWindow3D(QWidget *parent, PTModel *ptm)
: QWidget(parent)
{
ui.setupUi(this);

Qwt3D::SurfacePlot *sp = new Qwt3D::SurfacePlot(this);
ui.verticalLayout->addWidget(sp);
sp->setPlotStyle(Qwt3D::WIREFRAME);

Qwt3D::TripleField tf;
Qwt3D::CellField cf;
Qwt3D::Cell c1;

tf.clear();
cf.clear();
c1.clear();

const QModelIndex mi;
dvector dvx = ptm->getColumn("x");
dvector dvy = ptm->getColumn("y");
dvector dvz = ptm->getColumn("z");
for (unsigned i = 0; i < dvx.size(); i++) {
tf.push_back(Qwt3D::Triple(dvx[i], dvy[i], dvz[i]));
c1.push_back(i);
}
cf.push_back(c1);

sp->loadFromData(tf, cf);

sp->setRotation(30,0,15);
sp->setShift(0.15,0,0);
sp->coordinates()->axes[Qwt3D::X1].setLabelString("x-axis");
sp->coordinates()->axes[Qwt3D::Y1].setLabelString("y-axis");
sp->coordinates()->axes[Qwt3D::Z1].setLabelString("z-axis");

sp->setCoordinateStyle(Qwt3D::FRAME);

sp->updateData();
sp->updateGL();

}


With one exception: the plot automatically connects the first and last points of the curve. Assumedly, this is to create a surface, but is not what I'm looking for.

Any ideas as to how to turn this off?

Also, if there are any Qwt3D-specific forums in which to pose this question, please advise as such.

Be well....