@Override
  public void compute() {

    if (!setQuadric()) {
      bottom.setUndefined();
      top.setUndefined();
      side.setUndefined();
      return;
    }

    computeHelpers();

    quadric.calcVolume();
  }
  public AlgoQuadricLimitedPointPointRadius(
      Construction c,
      String[] labels,
      GeoPointND origin,
      GeoPointND secondPoint,
      NumberValue r,
      int type) {
    super(c);

    this.origin = origin;
    this.secondPoint = secondPoint;
    this.radius = r;

    quadric = new GeoQuadric3DLimited(c); // ,origin,secondPoint);
    quadric.setType(type);

    input = new GeoElement[] {(GeoElement) origin, (GeoElement) secondPoint, (GeoElement) r};

    ((GeoElement) origin).addAlgorithm(this);
    ((GeoElement) secondPoint).addAlgorithm(this);
    ((GeoElement) r).addAlgorithm(this);

    // parent of output
    quadric.setParentAlgorithm(this);
    cons.addToAlgorithmList(this);

    setQuadric();

    algoSide = new AlgoQuadricSide(cons, quadric, true, null);
    cons.removeFromConstructionList(algoSide);
    side = (GeoQuadric3DPart) algoSide.getQuadric();
    side.setParentAlgorithm(this);
    quadric.setSide(side);

    algoEnds = createEnds();
    bottom.setParentAlgorithm(this);
    top.setParentAlgorithm(this);
    quadric.setBottomTop(bottom, top);

    // output = new GeoElement[] {quadric,bottom,top,side};
    setOutput();

    quadric.initLabelsIncludingBottom(labels);
    quadric.updatePartsVisualStyle();

    // force update for side
    update();
  }