コード例 #1
0
void RSpline::updateInternal() const {
    if (!dirty || updateInProgress) {
        return;
    }

    dirty = false;
    updateInProgress = true;

    if (degree<1) {
        invalidate();
        qWarning() << "RSpline::updateInternal: invalid degree: " << degree;
        updateInProgress = false;
        return;
    }

    exploded.clear();

    // if fit points are known, update from fit points, otherwise from
    // control points:
    // TODO: use fitpoints from DXF/DWG file if possible (fit points might not correspond to control points):
    if (fitPoints.size()==0) {
        updateFromControlPoints();
    }
    else {
        updateFromFitPoints();
    }

    //updateBoundingBox();
    boundingBox = RBox();
    //getExploded();

    updateInProgress = false;
}
コード例 #2
0
ファイル: RSpline.cpp プロジェクト: DanielJSlick/qcad
void RSpline::updateInternal() const {
    if (!dirty || updateInProgress) {
        return;
    }

    dirty = false;
    updateInProgress = true;

    if (degree<2 || degree>3) {
        invalidate();
        qWarning() << "RSpline::updateInternal: invalid degree: " << degree;
        updateInProgress = false;
        return;
    }

    exploded.clear();

    // if fit points are known, update from fit points, otherwise from
    // control points:
    if (fitPoints.size()==0) {
        updateFromControlPoints();
    }
    else {
        updateFromFitPoints();
    }

    //updateBoundingBox();
    boundingBox = RBox();
    getExploded();

    updateInProgress = false;
}