001/**
002    Returns a new LoftedSurface through the specified list of curves with the specified
003    degree in the t-direction (each curve defines the s-direction). The versions showing
004    the array input actually take a variable length argument list (vararg), so you can
005    enter <code>newLoftedSurface(curve1, curve2, curve3, curve4)</code>, etc.
006 
007    @method LoftedSurface newLoftedSurface(int tDegree)
008    @method LoftedSurface newLoftedSurface(String name, int tDegree)
009    @method LoftedSurface newLoftedSurface(int tDegree, Collection curves)
010    @method LoftedSurface newLoftedSurface(String name, int tDegree, Collection curves)
011    @method LoftedSurface newLoftedSurface(int tDegree, Curves... curveVararg)
012    @method LoftedSurface newLoftedSurface(String name, int tDegree, Curves... curveVararg)
013 */
014package geomss.app.GeomSSCommands.creators;
015
016import bsh.*;
017import geomss.geom.*;
018import java.util.Collection;
019
020public class newLoftedSurface {
021
022    public static String usage() {
023        return "usage: newLoftedSurface(tDegree);, or newGeomList(tDegree, curve1, curve2, curve3);";
024    }
025
026    /**
027     * Implement newLoftedSurface(int tDegree) command.
028     */
029    public static LoftedSurface invoke(Interpreter env, CallStack callstack,
030            int tDegree) {
031        return LoftedSurface.newInstance(tDegree);
032    }
033
034    /**
035     * Implement newLoftedSurface(String name, int tDegree) command.
036     */
037    public static LoftedSurface invoke(Interpreter env, CallStack callstack,
038            String name, int tDegree) {
039        return LoftedSurface.newInstance(name, tDegree);
040    }
041
042    /**
043     * Implement newLoftedSurface(int tDegree, Collection geomElements) command.
044     */
045    public static LoftedSurface invoke(Interpreter env, CallStack callstack,
046            int tDegree, Collection curves) {
047        return LoftedSurface.valueOf(null, tDegree, curves);
048    }
049
050    /**
051     * Implement newLoftedSurface(String name, int tDegree, Collection geomElements)
052     * command.
053     */
054    public static LoftedSurface invoke(Interpreter env, CallStack callstack,
055            String name, int tDegree, Collection curves) {
056        return LoftedSurface.valueOf(name, tDegree, curves);
057    }
058
059    /**
060     * Implement newGeomList(int tDegree, Curve... curveVararg) command.
061     */
062    public static LoftedSurface invoke(Interpreter env, CallStack callstack,
063            int tDegree, Curve... curveVararg) {
064        return LoftedSurface.valueOf(null, tDegree, curveVararg);
065    }
066
067    /**
068     * Implement newGeomList(int tDegree, Curve... curveVararg) command.
069     */
070    public static LoftedSurface invoke(Interpreter env, CallStack callstack,
071            String name, int tDegree, Curve... curveVararg) {
072        return LoftedSurface.valueOf(name, tDegree, curveVararg);
073    }
074
075}