@Override public GeoElement createGeo(Kernel kernel, GeoNumberValue num) { return kernel.getManager3D().circle3D(null, point, num, forAxis); } }
/** * * @param p0 * center * @param p1 * point on circle * @return circle in the current plane */ protected GeoElement[] createCircle2For3D(GeoPointND p0, GeoPointND p1) { return new GeoElement[] { getManager3D().circle3D(null, p0, p1, ec.getView().getDirection()) }; }
@Override final public GeoConicND circle(String label, GeoPointND M, GeoNumberValue r) { if (M.isGeoElement3D()) { return getManager3D().circle3D(label, M, r); } return super.circle(label, M, r); }
/** * * @param cons * construction * @param center * center * @param radius * radius * @return circle in the current plane */ protected GeoConicND circleFor3D(Construction cons, GeoPointND center, GeoNumberValue radius) { return getManager3D().circle3D(null, center, radius, ec.getView().getDirection()); }
@Override protected GeoElement[] process2(Command c, GeoElement[] arg, boolean[] ok) throws MyError { if ((ok[0] = (arg[0] instanceof GeoLineND)) && (ok[1] = (arg[1].isGeoPoint()))) { GeoElement[] ret = { kernel.getManager3D().circle3D(c.getLabel(), (GeoLineND) arg[0], (GeoPointND) arg[1]) }; return ret; } return super.process2(c, arg, ok); }
@Override protected GeoElement[] process3(Command c, GeoElement[] arg, boolean[] ok) throws MyError { if ((ok[0] = (arg[0].isGeoPoint())) && (ok[2] = (arg[2] instanceof GeoDirectionND))) { if (arg[1] instanceof GeoNumberValue) { GeoElement[] ret = { kernel.getManager3D().circle3D( c.getLabel(), (GeoPointND) arg[0], (GeoNumberValue) arg[1], (GeoDirectionND) arg[2]) }; return ret; } else if (arg[1].isGeoPoint()) { GeoElement[] ret = { kernel.getManager3D().circle3D( c.getLabel(), (GeoPointND) arg[0], (GeoPointND) arg[1], (GeoDirectionND) arg[2]) }; return ret; } ok[1] = false; } return super.process3(c, arg, ok); }
@Override protected GeoElement circle(String label, GeoPointND a, GeoPointND b, GeoPointND c) { if (a.isGeoElement3D() || b.isGeoElement3D() || c.isGeoElement3D()) { return kernel.getManager3D().circle3D(label, a, b, c); } return super.circle(label, a, b, c); }
@Override protected GeoElement circle(String label, GeoPointND a, GeoNumberValue v) { GeoDirectionND orientation = CommandProcessor3D .getCurrentViewOrientation(kernel, app); if (orientation == null) { if (a.isGeoElement3D()) { orientation = kernel.getXOYPlane(); } else { // use 2D algo return super.circle(label, a, v); } } return kernel.getManager3D().circle3D(label, a, v, orientation); }
@Override protected GeoElement circle(String label, GeoPointND a, GeoPointND b) { GeoDirectionND orientation = CommandProcessor3D .getCurrentViewOrientation(kernel, app); if (orientation == null) { if (a.isGeoElement3D() || b.isGeoElement3D()) { orientation = kernel.getXOYPlane(); } else { // use 2D algo return super.circle(label, a, b); } } return kernel.getManager3D().circle3D(label, a, b, orientation); }
/** * get axis and point create circle with axis and through the point * * @param hits * hits * @param selPreview * whether this is just for preview * @return circle created * */ final protected GeoElement[] circleAxisPoint(Hits hits, boolean selPreview) { if (hits.isEmpty()) { return null; } if (addSelectedPoint(hits, 1, false, selPreview) == 0) { // add line // only if // no // point to avoid dummy // circle addSelectedLine(hits, 1, false, selPreview); } if (selPoints() == 1 && selLines() == 1) { return new GeoElement[] { getKernel().getManager3D().circle3D(null, getSelectedLinesND()[0], getSelectedPointsND()[0]) }; } return null; }
if (points[0].isGeoElement3D() || points[1].isGeoElement3D() || points[2].isGeoElement3D()) { ret[0] = kernel.getManager3D().circle3D(null, points[0], points[1], points[2]); } else {