Skip to content

why do stocks do not appear ? #5

Description

@TaXueShanRen

I ported some of your code to Windows to make a new software,but after I choose stock file, no stock appear .
Here is part of my code:
QString path=QFileDialog::getOpenFileName(this,"select path","./");

double cx = 0.0, cy = 0.0, cz = 0.0, rx = 0.0, ry = 0.0, rz = 0.0, ra = 0.0, rb = 0.0, rc = 0.0;
StockVolume *stockVolume=new StockVolume();
stock = new cutsim::StlVolume();
stock->setProgress(0);
stock->setCenter(cutsim::GLVertex(cx,cy,cz));
stock->setRotationCenter(cutsim::GLVertex(rx,ry,rz));
stock->setAngle(cutsim::GLVertex(ra*(PI/ 180.0), rb*(PI/ 180.0), rc*(PI/ 180.0)));
stock->setCubeResolution(cube_resolution);
int error=stock->readStlFile(path);
if (error==0)
    stock->setColor(STOCK_COLOR);
stock->calcBB();
myCutsim->sum_volume(stock);
myCutsim->updateGL();
myGLWidget->reDraw();

where is the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions