Ejemplo n.º 1
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("majorFreq",
                     "Major frequency",
                     units="per rotation",
                     default=3.0,
                     min=0.0,
                     max=179.0,
                     randRange=(0.1, 20.)),
         DialogFloat("majorAmp",
                     "Major amplitude",
                     units=units,
                     default=inchesToUnits(4.0, units),
                     min=0.0,
                     max=inchesToUnits(6.0, units)),
         DialogFloat("minorFreq",
                     "Minor frequency mod",
                     units="percent",
                     default=.01,
                     min=-0.03,
                     max=.03),
         DialogFloat("minorAmp",
                     "Minor amplitude",
                     units="degrees",
                     default=20.0,
                     min=0.0,
                     max=45.0),
         DialogBreak(),
         DialogFloat("r1",
                     "Radius start",
                     units=units,
                     default=1.0,
                     min=0.0,
                     max=max(width, length) * .9),
         DialogFloat("r2",
                     "Radius end",
                     units=units,
                     default=min(width, length) / 2,
                     min=1.0,
                     max=max(width, length) * 1.5),
         DialogFloat("turns", "Turns", default=20.0, min=0.1, max=80),
         DialogInt("angleRate",
                   "Sample rate",
                   units="degrees",
                   default=5,
                   min=1,
                   max=10),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
Ejemplo n.º 2
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogInt("points", "Polygon points", default=10, min=3, max=50),
         DialogInt("interp",
                   "Interpolated points",
                   default=5,
                   min=0,
                   max=10),
         DialogInt("seed",
                   "Random seed",
                   default=1,
                   min=0,
                   max=10000.0,
                   rbutton=True),
         DialogFloat("randomness",
                     "Randomness",
                     units="percent",
                     default=10.,
                     min=0.,
                     max=100.),
         DialogFloat("rotation",
                     "Rotation",
                     units="degrees",
                     default=0.,
                     min=-180.,
                     max=180.),
         DialogBreak(),
         DialogInt("polygons", "Polygon Count", default=10, min=1, max=100),
         DialogFloat("r1",
                     "First radius",
                     units=units,
                     min=0.0,
                     max=max(width, length) * 2),
         DialogFloat("r2",
                     "Second radius",
                     units=units,
                     default=min(width, length) / 2,
                     min=0.0,
                     max=max(width, length) * 2),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
Ejemplo n.º 3
0
 def __init__(self, cols, rows):
     self.end = (cols + rows) * 2
     self.editor = [
         DialogFloat("angle",
                     "Source angle",
                     units="degrees",
                     default=2.0,
                     min=0.0,
                     max=720.0,
                     step=1.),
         DialogFloat("degsPerFrame",
                     "Degrees per refresh",
                     units="degrees",
                     default=2.0,
                     min=0.0,
                     max=30.0,
                     step=1.),
         DialogFloat("degsSpan",
                     "Color span",
                     units="degrees",
                     default=0.5,
                     min=0.00001,
                     max=360.0,
                     step=.5),
         DialogInt("delaySteps", "Delay steps", default=0, min=0, max=500),
         DialogBreak(),
         DialogInt("brightness",
                   "Brightness",
                   units="percent",
                   default=50,
                   min=0,
                   max=100),
     ]
Ejemplo n.º 4
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogInt("knots", "Number of Knots", default=5, min=0, max=20),
         DialogFloat("rKnot",
                     "Maximum Knot Radius",
                     units=units,
                     default=inchesToUnits(5.0, units),
                     min=inchesToUnits(1.0, units),
                     max=max(width, length)),
         DialogInt("seed",
                   "Random seed",
                   default=1,
                   min=0,
                   max=10000,
                   rbutton=True),
         DialogInt("xLines",
                   "Number of points/line",
                   default=200,
                   min=50,
                   max=600),
         DialogInt("yLines", "Number of lines", default=40, min=5, max=100),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width", "Width (x)", units=units, default=width),
         DialogFloat("length", "Length (y)", units=units, default=length),
     ]
Ejemplo n.º 5
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("xSpacing",
                     "X Spacing (0 for none)",
                     units=units,
                     default=0.0,
                     min=0.,
                     max=width),
         DialogFloat("ySpacing",
                     "Y Spacing (0 for none)",
                     units=units,
                     default=ballSize,
                     min=0.,
                     max=length),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width",
                     "Width",
                     units=units,
                     default=width,
                     min=1.0,
                     max=1000.0),
         DialogFloat("length",
                     "Length",
                     units=units,
                     default=length,
                     min=1.0,
                     max=1000.0),
     ]
Ejemplo n.º 6
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogInt("depth", "Depth of fractility", default=2, max=10),
         DialogFloat("branchProbability",
                     "Probability of branching",
                     default=0.7,
                     min=0.0,
                     max=1.0),
         DialogFloat("percent", "Fractility size decrease", default=0.3),
         DialogYesNo("round", "Rounded crystals", default=False),
         DialogInt("seed",
                   "Random seed",
                   default=1,
                   min=0,
                   max=10000,
                   rbutton=True),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
     self.table = [(0.0, 0.0), (width, length)]
Ejemplo n.º 7
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogInts("teeths",
                    "Wheel Teeth",
                    units="n1,n2,...",
                    default=[40, -30],
                    min=-60,
                    max=60,
                    minNums=2,
                    maxNums=3),
         DialogInt("resolution", "Resolution", default=7, min=1, max=60),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
         DialogFloat("radius",
                     "Radius",
                     units=units,
                     default=min(width, length) / 2,
                     min=1.0),
     ]
Ejemplo n.º 8
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("h",
                     "Coefficient 'H'",
                     default=0.01,
                     min=.001,
                     max=.05),
         DialogFloat("a", "Coefficient 'A'", default=10.0, min=.5,
                     max=45.0),
         DialogFloat("b", "Coefficient 'B'", default=28.0, min=.5,
                     max=45.0),
         DialogFloat("c",
                     "Coefficient 'C'",
                     default=8.0 / 3.0,
                     min=.1,
                     max=5.0),
         DialogInt("points", "Number of points", default=5000),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width",
                     "Width",
                     units=units,
                     default=width,
                     min=1.0,
                     max=1000.0),
         DialogFloat("length",
                     "Length",
                     units=units,
                     default=length,
                     min=1.0,
                     max=1000.0),
     ]
Ejemplo n.º 9
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogFloat("radius",
                     "Radius",
                     units=units,
                     default=min(width, length) / 2,
                     min=1.0,
                     max=max(width, length) * 2.0),
         DialogFloat("turns", "Turns", default=10.0, min=.1, max=200.0),
         DialogFloat("angleStart", "Starting angle", units="degrees"),
         DialogFloat("angleRate",
                     "Sample rate",
                     units="degrees",
                     min=1,
                     default=5.0),
         DialogYesNo("fill", "Fill", default=False),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
Ejemplo n.º 10
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogInt("depth", "Depth of fractility", default=8, min=1,
                   max=14),
         DialogYesNo("fit", "Auto-fit to table", default=False),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width", "Width (x)", units=units, default=width),
         DialogFloat("length", "Length (y)", units=units, default=length),
     ]
Ejemplo n.º 11
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     radius = min(width, length) / 2.0
     mRadius = max(width, length) / 2.0
     self.editor = [
         DialogFloat("petals", "Petals", default=7.0, min=0.001, max=45.0),
         DialogFloat("angleStart",
                     "Starting angle",
                     units="degrees",
                     min=-180.,
                     max=180.),
         DialogFloat("angleShift",
                     "Shift angle",
                     units="degrees",
                     default=0.0,
                     min=-10.0,
                     max=10.0),
         DialogFloat("angleRate",
                     "Sample rate",
                     units="degrees",
                     default=3.0,
                     min=1.0,
                     max=10.0),
         DialogInt("turns",
                   "Turns",
                   default=20,
                   min=1,
                   max=int(mRadius / ballSize * 4)),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
         DialogFloat("innerRadius",
                     "Inner radius",
                     units=units,
                     default=radius * .15,
                     min=0.0,
                     max=mRadius),
         DialogFloat("outerRadius",
                     "Outer radius",
                     units=units,
                     default=radius,
                     min=1.0,
                     max=mRadius),
     ]
Ejemplo n.º 12
0
 def __init__(self, width, length, ballSize, units):
     scale = width / length
     self.editor = [
         DialogInt("rows", "Rows", default=8, min=1, max=20),
         DialogInt("cols",
                   "Columns",
                   default=int(8 * scale),
                   min=1,
                   max=int(20 * scale)),
         DialogFloat("turns", "Turns", default=3.0, min=1, max=15.0),
         DialogFloat("angleRate",
                     "Sample Rate",
                     units="degrees",
                     default=15.0,
                     min=-360.0,
                     max=360.0),
         DialogFloat("sizeModifier",
                     "Size Modifier",
                     units="percent",
                     default=1.,
                     min=.75,
                     max=1.25),
         DialogBreak(),
         DialogFloat("xCorner",
                     "X Corner",
                     units=units,
                     default=0.0,
                     min=0.0,
                     max=width,
                     randRange=(0., 0.)),
         DialogFloat("yCorner",
                     "Y Corner",
                     units=units,
                     default=0.0,
                     min=0.0,
                     max=length,
                     randRange=(0., 0.)),
         DialogFloat("width",
                     "Width",
                     units=units,
                     default=width,
                     min=1.0,
                     max=width,
                     randRange=(width, width)),
         DialogFloat("length",
                     "Length",
                     units=units,
                     default=length,
                     min=1.0,
                     max=length,
                     randRange=(length, length)),
     ]
Ejemplo n.º 13
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("sHeight",
                     "Shingle Height",
                     units=units,
                     default=inchesToUnits(2, units),
                     min=inchesToUnits(0.1, units),
                     max=inchesToUnits(5, units)),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width", "Width (x)", units=units, default=width),
         DialogFloat("length", "Length (y)", units=units, default=length),
     ]
Ejemplo n.º 14
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogInt("repetitions", "Repetitions", default=3, min=1, max=20),
         DialogFloat("heading",
                     "Initial heading",
                     units="degrees",
                     default=0.0),
         DialogFloat("angle", "Angle", units="degrees", default=90.0),
         DialogYesNo("round", "Rounded edges", default=False),
         DialogBreak(),
         DialogStr("axiom", "Axiom", length=30),
         DialogStr("rule1", "Rule 1", length=30),
         DialogStr("rule2", "Rule 2", length=30),
         DialogStr("rule3", "Rule 3", length=30),
         DialogStr("rule4", "Rule 4", length=30),
         DialogStr("rule5", "Rule 5", length=30),
         DialogStr("rule6", "Rule 6", length=30),
         DialogBreak(),
         DialogFloat("xOrigin", "X Origin", units=units, default=0.0),
         DialogFloat("yOrigin", "Y Origin", units=units, default=0.0),
         DialogFloat("width", "Width", units=units, default=width),
         DialogFloat("length", "Length", units=units, default=length),
     ]
     self.MAX_LEN = 50000
Ejemplo n.º 15
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("wHeight",
                     "Wave Height",
                     units=units,
                     default=inchesToUnits(1.0, units),
                     min=0.0,
                     max=length),
         DialogInt("lines", "Lines", default=40, min=5, max=100),
         DialogInt("xCount",
                   "Points per line",
                   default=100,
                   min=10,
                   max=160),
         DialogFloat("waves",
                     "Waves per Line",
                     default=3.0,
                     min=0.0,
                     max=45.0),
         DialogFloat("shift",
                     "Shift per Line",
                     units="degrees",
                     default=5.0,
                     min=0.0,
                     max=10.0),
         DialogFloat("increment",
                     "Wave increment",
                     units="percent",
                     default=100.0,
                     min=95.0,
                     max=105.0),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width",
                     "Width",
                     units=units,
                     default=width,
                     min=1.0,
                     max=1000.0),
         DialogFloat("length",
                     "Length",
                     units=units,
                     default=length,
                     min=1.0,
                     max=1000.0),
     ]
Ejemplo n.º 16
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     rippleSize = min(width, length) * .05
     radius = max(width, length) / 2.0
     self.editor = [
         DialogInt("rays", "Ray count", default=12, min=1, max=60),
         DialogInt("rayWidth",
                   "Ray width",
                   units="degrees",
                   default=10,
                   min=1,
                   max=60),
         DialogFloat("ripples",
                     "Number of ripples",
                     default=2.0,
                     min=0.0,
                     max=20.0),
         DialogFloat("rippleSize",
                     "Size of ripples",
                     units=units,
                     default=rippleSize,
                     min=0.,
                     max=3 * rippleSize),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
         DialogFloat("innerRadius",
                     "Inner radius",
                     units=units,
                     default=2.0,
                     min=0.0,
                     max=radius),
         DialogFloat("outerRadius",
                     "Outer radius",
                     units=units,
                     default=min(width, length) / 2,
                     min=1.0,
                     max=radius),
     ]
Ejemplo n.º 17
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogFloat("r1",
                     "First radius",
                     units=units,
                     min=0.0,
                     max=max(width, length) * 2),
         DialogFloat("r2",
                     "Second radius",
                     units=units,
                     default=min(width, length) / 2,
                     min=0.0,
                     max=max(width, length) * 2),
         DialogFloat("turns", "Turns", default=10., min=0.1, max=100.),
         DialogFloat("angleStart",
                     "Starting angle",
                     units="degrees",
                     min=0.0,
                     max=360.0,
                     step=15.),
         DialogFloat("angleRate",
                     "Sample rate",
                     units="degrees",
                     default=15.0,
                     min=-180.0,
                     max=180.0),
         DialogFloat("base",
                     "Growth base power",
                     default=1.0,
                     min=0.25,
                     max=10.0),
         DialogYesNo("fill", "Fill in spiral"),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
Ejemplo n.º 18
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogFloat("innerRadius",
                     "Inner radius",
                     units=units,
                     min=0.0,
                     max=min(width, length) / 2.),
         DialogFloat("turns", "Turns", default=5., min=1.0, max=50.0),
         DialogFloat("angleRate",
                     "Sample rate",
                     units="degrees",
                     default=11.0,
                     min=1,
                     max=45.0),
         DialogFloat("curveFactor",
                     "Curve factor",
                     default=1.,
                     min=-6.,
                     max=6.),
         DialogFloat("scaleFactor",
                     "Scale factor",
                     default=1.,
                     min=.01,
                     max=10.0),
         DialogFloat("logGrowth",
                     "Logarithmic growth",
                     units="percent",
                     default=0.,
                     min=0.,
                     max=2.),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
     self.maxRadius = 2. * sqrt(width**2 + length**2)
Ejemplo n.º 19
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogInt("points", "Points", min=3, max=75, default=5),
         DialogFloat("innerRadius1",
                     "Inner radius 1",
                     units=units,
                     default=inchesToUnits(3.0, units),
                     min=1.0,
                     max=max(width, length) / 2),
         DialogFloat("outerRadius1",
                     "Outer radius 1",
                     units=units,
                     default=min(width, length) / 2,
                     min=2.0,
                     max=max(width, length) / 2),
         DialogFloat("innerRadius2",
                     "Inner radius 2",
                     units=units,
                     default=0.0),
         DialogFloat("outerRadius2",
                     "Outer radius 2",
                     units=units,
                     default=inchesToUnits(5.0, units)),
         DialogFloat("angleStart", "Starting angle", units="degrees"),
         DialogFloat("angleShift",
                     "Shift angle",
                     units="degrees",
                     default=0.0,
                     min=0.0,
                     max=15.0),
         DialogInt("steps", "Number of stars", default=5, min=0, max=40),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
Ejemplo n.º 20
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogStr("expression",
                   "Expression",
                   default='cos( 3.*radians( sqrt(x*x+y*y )))',
                   length=45),
         DialogFloat("xStart", "X Start", default=-180.0),
         DialogFloat("xEnd", "X End", default=180.0),
         DialogInt("xPoints", "X Points", default=45, min=2, max=180),
         DialogFloat("yStart", "Y Start", default=-180.0),
         DialogFloat("yEnd", "Y End", default=180.0),
         DialogInt("yPoints", "Y Points", default=45, min=2, max=180),
         DialogFloat("zScale", "Z Scale", default=1.0, min=0.01, max=10.0),
         DialogFloat("xyAngle",
                     "Horizontal Rotation",
                     units="degrees",
                     default=45.0,
                     min=-45.0,
                     max=45.0),
         DialogFloat("yzAngle",
                     "Vertical Tilt",
                     units="degrees",
                     default=45.0,
                     min=0.0,
                     max=90.0),
         DialogFloat("zoom", "Zoom", default=1.0, min=0.25, max=10.0),
         DialogYesNo("topDown", "Top Down", default=True),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width",
                     "Width",
                     units=units,
                     default=width,
                     min=1.0,
                     max=width * 4),
         DialogFloat("length",
                     "Length",
                     units=units,
                     default=length,
                     min=1.0,
                     max=length * 4),
     ]
Ejemplo n.º 21
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("decay",           "Decay Rate",           default=0.0001, min=.00000001),
         DialogInt("steps",           "Number of Steps",      default=1000, min=1000, max=20000),
         DialogFloat("f1",              "X1 Frequency",         default=5.0, min=0.1, max=30.0, rRound=0),
         DialogFloat("f2",              "X2 Frequency",         default=10.0, min=0.1, max=30.0, rRound=0),
         DialogFloat("f3",              "Y1 Frequency",         default=7.0, min=0.1, max=30.0, rRound=0),
         DialogFloat("f4",              "Y2 Frequency",         default=12.0, min=0.1, max=30.0, rRound=0),
         DialogFloat("a1",              "X1 Amplitude",         units=units, default=width / 4.0, min=0.0),
         DialogFloat("a2",              "X2 Amplitude",         units=units, default=width / 4.0, min=0.0),
         DialogFloat("a3",              "Y1 Amplitude",         units=units, default=length / 4.0, min=0.0),
         DialogFloat("a4",              "Y2 Amplitude",         units=units, default=length / 4.0, min=0.0),
         DialogFloat("p1",              "X1 Phase",             units="degrees", default=0.0, min=0.0, max=180.0, rRound=0),
         DialogFloat("p2",              "X2 Phase",             units="degrees", default=0.0, min=0.0, max=180.0, rRound=0),
         DialogFloat("p3",              "Y1 Phase",             units="degrees", default=0.0, min=0.0, max=180.0, rRound=0),
         DialogFloat("p4",              "Y2 Phase",             units="degrees", default=0.0, min=0.0, max=180.0, rRound=0),
         DialogBreak(),
         DialogFloat("xCenter",         "X Center",             units=units, default=width / 2.0),
         DialogFloat("yCenter",         "Y Center",             units=units, default=length / 2.0),
     ]
Ejemplo n.º 22
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogInt("columns",
                   "Columns",
                   default=int(width / (ballSize * 1.25)),
                   min=3,
                   max=int(width / ballSize)),
         DialogInt("rows",
                   "Rows",
                   default=int(length / (ballSize * 1.25)),
                   min=3,
                   max=int(length / ballSize)),
         DialogInt("seed",
                   "Random seed",
                   default=1,
                   min=0,
                   max=10000.0,
                   rbutton=True),
         DialogBreak(),
         DialogFloat("width",
                     "Width",
                     default=width,
                     units=units,
                     min=1.0,
                     max=width),
         DialogFloat("length",
                     "Length",
                     default=length,
                     units="units",
                     min=1.0,
                     max=length),
         DialogFloat("xOffset",
                     "Starting x location",
                     default=0.0,
                     units=units),
         DialogFloat("yOffset",
                     "Starting y location",
                     default=0.0,
                     units=units),
     ]
Ejemplo n.º 23
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     radius = min(width, length) / 2.0
     mRadius = max(width, length) / 2.0
     self.editor = [
         DialogInt("cwArms", "CW arms", default=12, min=1, max=120),
         DialogFloat("cwAngular",
                     "CW angular distance",
                     default=30.0,
                     units="degrees"),
         DialogInt("ccwArms", "CCW arms", default=12, min=1, max=120),
         DialogFloat("ccwAngular",
                     "CCW angular distance",
                     default=30.0,
                     units="degrees"),
         DialogInt("points", "Points per arm", default=10, min=2),
         DialogYesNo("fitToTable", "Fit to table"),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
         DialogFloat("innerRadius",
                     "Inner radius",
                     units=units,
                     default=radius * 0.15,
                     min=0.0,
                     max=mRadius),
         DialogFloat("outerRadius",
                     "Outer radius",
                     units=units,
                     default=radius,
                     min=1.0,
                     max=mRadius),
     ]
Ejemplo n.º 24
0
 def __init__(self, width, length, ballSize, units):
     self.ballSize = ballSize
     rockSize = inchesToUnits(3, units)
     self.editor = [
         DialogInt("rocks", "Number of rocks", default=5, min=1, max=25),
         DialogFloat("minRockSize",
                     "Minimum rock size",
                     units=units,
                     min=inchesToUnits(.25, units),
                     max=rockSize,
                     default=inchesToUnits(1.0, units)),
         DialogFloat("maxRockSize",
                     "Maximum rock size",
                     units=units,
                     min=inchesToUnits(.25, units),
                     max=rockSize,
                     default=inchesToUnits(1.0, units)),
         DialogInt("rakeSize",
                   "Rake teeth",
                   units="tines",
                   min=2,
                   max=5,
                   default=3),
         DialogInt("seed",
                   "Random Seed",
                   default=1,
                   min=0,
                   max=10000,
                   rbutton=True),
         DialogBreak(),
         DialogFloat("ballSize",
                     "Ball size",
                     units=units,
                     min=.25,
                     default=ballSize),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width", "Width (x)", units=units, default=width),
         DialogFloat("length", "Length (y)", units=units, default=length),
     ]
Ejemplo n.º 25
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogInt("xSquares", "Columns (X)", default=2, min=1, max=40),
         DialogInt("ySquares", "Rows (Y)", default=2, min=1, max=40),
         DialogInt("xLines", "X Fill Lines", default=4, min=1, max=16),
         DialogInt("yLines", "Y Fill Lines", default=4, min=1, max=16),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width",
                     "Width",
                     units=units,
                     default=width,
                     min=1.0,
                     max=width),
         DialogFloat("length",
                     "Length",
                     units=units,
                     default=length,
                     min=1.0,
                     max=length),
     ]
Ejemplo n.º 26
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogFloat("radius",
                     "Starting Radius",
                     units=units,
                     default=min(width, length) / 2.,
                     min=3.,
                     max=max(width, length)),
         DialogFloat("angle",
                     "Phyllotaxic Angle",
                     units="degrees",
                     default=137.51,
                     min=1,
                     max=180.0),
         DialogFloat("reductionRate",
                     "Reduction Rate",
                     default=0.976,
                     min=.85,
                     max=.99),
         DialogFloat("petalWidth",
                     "Petal Width",
                     units="degrees",
                     default=15.,
                     min=5.,
                     max=90.),
         DialogInt("iterations", "Iterations", default=100, min=1, max=500),
         DialogYesNo("round", "Rounded edges", default=False),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]
Ejemplo n.º 27
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFile("filename",
                    "File Name",
                    default=CLIPART_PATH,
                    filter='.dxf'),
         DialogInt("iterations",
                   "Number of Fill Iterations",
                   default=0,
                   min=0,
                   max=60),
         DialogFloat("decrement",
                     "Fill Decrement",
                     units=units,
                     default=0.5,
                     min=0.0,
                     max=inchesToUnits(2.0, units)),
         DialogFloat("ballSize",
                     "Ball Size",
                     units=units,
                     default=ballSize,
                     min=inchesToUnits(0.25, units)),
         DialogBreak(),
         DialogFloat("xOffset", "X Origin", units=units, default=0.0),
         DialogFloat("yOffset", "Y Origin", units=units, default=0.0),
         DialogFloat("width",
                     "Width (x)",
                     units=units,
                     default=width,
                     min=1.0,
                     max=width * 2),
         DialogFloat("length",
                     "Length (y)",
                     units=units,
                     default=length,
                     min=1.0,
                     max=length * 2),
     ]
Ejemplo n.º 28
0
 def __init__(self, width, length, ballSize, units):
     self.editor = [
         DialogFloat("aFreq",
                     "A Frequency",
                     default=8.0,
                     min=0.001,
                     max=100.0,
                     rRound=0),
         DialogFloat("bFreq",
                     "B Frequency",
                     default=9.0,
                     min=0.001,
                     max=100.0,
                     rRound=0),
         DialogFloat("delta", "Delta", units="degrees", default=0.0),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
         DialogFloat("width",
                     "Width (x)",
                     units=units,
                     default=width,
                     min=1.0,
                     max=1000.0),
         DialogFloat("length",
                     "Length (y)",
                     units=units,
                     default=length,
                     min=1.0,
                     max=1000.0),
     ]
Ejemplo n.º 29
0
 def __init__(self, width, length, ballSize, units):
     radius = min(width, length) * .1
     self.editor = [
         DialogFloat("radius",
                     "Radius",
                     units=units,
                     default=radius,
                     min=1.0,
                     max=radius * 4),
         DialogInt("rings", "Rings", default=3, min=1, max=8),
         DialogFloat("turns", "Turns", default=3, min=0.1, max=24.0),
         DialogFloat("angleRate",
                     "Sample rate",
                     units="degrees",
                     default=15.0,
                     min=-720.0,
                     max=720.0),
         DialogFloat("factor",
                     "Spacing factor",
                     default=1.0,
                     min=.5,
                     max=1.5),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0,
                     min=0.0,
                     max=width),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0,
                     min=0.0,
                     max=length),
     ]
Ejemplo n.º 30
0
 def __init__(self, width, length, ballSize, units):
     self.width = width
     self.length = length
     self.editor = [
         DialogFloat("radius",
                     "Starting Radius",
                     units=units,
                     default=min(width, length) / 2.,
                     min=3.,
                     max=max(width, length)),
         DialogFloat("angle",
                     "Phyllotaxic Angle",
                     units="degrees",
                     default=137.51,
                     min=1,
                     max=180.0),
         DialogFloat("reductionRate",
                     "Reduction Rate",
                     default=0.976,
                     min=.85,
                     max=.99),
         DialogFloat("circleDiameter",
                     "Circle Diameter",
                     units=units,
                     default=3.),
         DialogInt("iterations", "Iterations", default=60, min=1, max=200),
         DialogBreak(),
         DialogFloat("xCenter",
                     "X Center",
                     units=units,
                     default=width / 2.0),
         DialogFloat("yCenter",
                     "Y Center",
                     units=units,
                     default=length / 2.0),
     ]