Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Solved
    • Unsolved
    • Search
    1. Home
    2. Recent
    Log in to post
    • All categories
    • Announcements
    • General Discussion
    • Tutorials
    • Code snippets
    • Feature Requests
    • Bugs
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • snaders

      SOLVED Using global variables input
      General Discussion • drawbot as module user interaction variables drawbot package vanilla • • snaders  

      3
      0
      Votes
      3
      Posts
      152
      Views

      snaders

      Hello @gferreira, Thanks for the quick reply. I mistakenly thought vanilla just ment that it didn't have any 'addons'. Like vanilla JS... This makes a lot more sense, will look into that! Thanks a lot!
    • JD

      SOLVED New Drawbot version
      Bugs • • JD  

      3
      0
      Votes
      3
      Posts
      145
      Views

      JD

      Thanks Frederik, that solved the issue. JD
    • eduairet

      SOLVED Radial animation
      Tutorials • animation • • eduairet  

      5
      0
      Votes
      5
      Posts
      461
      Views

      eduairet

      @gferreira wow, this is huge!!! thank you again
    • jansindl3r

      SOLVED Find out whether a point is placed within an area
      General Discussion • • jansindl3r  

      2
      0
      Votes
      2
      Posts
      139
      Views

      gferreira

      @jansindl3r yes, have a look at BezierPath.pointInside(xy)
    • frederik

      DrawBot3.121 is released
      Announcements • • frederik  

      1
      2
      Votes
      1
      Posts
      512
      Views

      No one has replied

    • jansindl3r

      SOLVED How can I split a path into multiple segments?
      General Discussion • bezierpath • • jansindl3r  

      8
      0
      Votes
      8
      Posts
      419
      Views

      gferreira

      there’s an example of FlattePen + BezierPath here
    • jo

      SOLVED bezierPath.polygon()?
      Feature Requests • bezierpath • • jo  

      2
      1
      Votes
      2
      Posts
      228
      Views

      frederik

      continue here https://github.com/typemytype/drawbot/issues/301 thanks!
    • KevinKarney

      SOLVED Newby request
      General Discussion • bezierpath geometry boolean operations • • KevinKarney  

      2
      0
      Votes
      2
      Posts
      185
      Views

      gferreira

      hello @KevinKarney, welcome to DrawBot! 1. I need the option to build compound objects (with unions, differences, intersections). Is it possible to make (e.g) a torus by differencing 2 circles. Or do I have to create two bezier paths and then do the difference. both methods are possible: you can do it with a single BezierPath by drawing two circles in opposing directions: x, y = 500, 500 r1 = 400 r2 = 300 B = BezierPath() B.oval(x-r1, y-r1, r1*2, r1*2) B.reverse() B.oval(x-r2, y-r2, r2*2, r2*2) fill(0, 1, 0) stroke(1, 0, 0) strokeWidth(10) drawPath(B) or you can draw two separate circles, and get the difference between them: B1 = BezierPath() B1.oval(x-r1, y-r1, r1*2, r1*2) B2 = BezierPath() B2.oval(x-r2, y-r2, r2*2, r2*2) B3 = B1.difference(B2) drawPath(B3) 2. with primitives such as oval or rect, can I incorporate the fill, stroke, strokewidth, etc into the call. In Nodebox 1, I can say (e.g) a = rect(0,0,20,20,stroke=Red,strokewidth=3,fill=Grey, draw=False) This creates an object call a, but does not draw it.... grouping colors and geometry can be done with functions: def a(): stroke(1, 0, 0) strokeWidth(3) fill(0.5) rect(0, 0, 20, 20) a() hope this helps… have fun with the movies, and let us know if you have any other questions.
    • eduairet

      SOLVED Output text
      Tutorials • text formatting • • eduairet  

      9
      0
      Votes
      9
      Posts
      500
      Views

      eduairet

      @gferreira thanks, it worked, I'm coming with some new exercises. Cheers.
    • rachelkriebel

      SOLVED some problems importing noise module
      General Discussion • modules noise • • rachelkriebel  

      4
      0
      Votes
      4
      Posts
      428
      Views

      gferreira

      hello @burnier & everyone else with the same problem, the latest version of Python is 3.7 DrawBot currently embeds Python 3.6 if you recently installed “Python 3” from python.org, you probably have 3.7. to make modules available in DrawBot, they need to be installed for Python 3.6 (not 3.7). so, the first step is to make sure that you have Python 3.6 installed in your system. you can check that by typing python3.6 in Terminal. if you get -bash: python3.6: command not found, then you need to install Python 3.6 first. you can get it from python.org/downloads. pip is included in Python, so once you have Python 3.6 you should have pip3.6 too. please give it a try, and let us know how it goes… good luck!
    • jansindl3r

      SOLVED How to get width of text, including metrics?
      General Discussion • text • • jansindl3r  

      4
      0
      Votes
      4
      Posts
      187
      Views

      jansindl3r

      @gferreira I also believe that you meant textSize('string')
    • MishaHeesakkers

      UNSOLVED Trying to install Drawbot as a module gives this error.
      Bugs • modules • • MishaHeesakkers  

      4
      0
      Votes
      4
      Posts
      313
      Views

      frederik

      mm strange, can you send an example script that fails with this traceback A wild guess is that the drawBot package is not installed. Did you do this last step (next to installing all the dependencies) cd path/To/drawBot pytho3.7 setup.py install
    • jansindl3r

      SOLVED Place stroke on a shape's contour, with no offset
      General Discussion • stroke clipping outline • • jansindl3r  

      2
      0
      Votes
      2
      Posts
      176
      Views

      gferreira

      hello @jansindl3r, you can use the contours of the letters as a clipping mask, so the outside half of the stroke is not visible: size(2000, 1000) stroke(1, 0, 0) strokeWidth(30) B = BezierPath() B.text('a', (110, 130), fontSize=1400) # clip external stroke with savedState(): clipPath(B) drawPath(B) # normal stroke translate(1000, 0) drawPath(B) cheers!
    • eduairet

      SOLVED Grid
      Tutorials • grid layout • • eduairet  

      3
      0
      Votes
      3
      Posts
      327
      Views

      eduairet

      @gferreira said in Grid: w = (width() - gutter * (cols + 1)) / cols h = (height() - gutter * (rows + 1)) / rows Thank you very much, it worked way much better, I also tried to add a margin feature that worked well so now I can design over the grid size(1000, 1000) cols = 3 rows = 3 gutter = 12 #Margin mTop = 10 - gutter mBottom = 20 - gutter mLeft = 10 - gutter mRight = 10 - gutter w = (width() - gutter * (cols + 1)) / cols - ((mRight + mLeft) / cols) h = (height() - gutter * (rows + 1)) / rows - ((mTop + mBottom) / rows) fill(None) strokeWidth(1) stroke(0, 1, 1) for col in range(cols): for row in range(rows): x = gutter + col * (w + gutter) y = gutter + row * (h + gutter) rect(x + mLeft, y + mBottom, w, h)
    • jo

      Lissajous table
      Code snippets • lissajous • • jo  

      1
      2
      Votes
      1
      Posts
      339
      Views

      No one has replied

    • habakuk

      SOLVED How to mirror/flip a object?
      General Discussion • transformations • • habakuk  

      9
      0
      Votes
      9
      Posts
      510
      Views

      habakuk

      Hallo @jo thanks alot - at the moment i use the lissajus only to create different nice looking loops. I changed the values as you suggested and of course it is working now and delivers a new nice looking loop. I`d love to make some more loops with more "natural, subtle and slow" movements. I saw your great visualisations of the different variable font movements and hoped to create a custom path to do so - but i failed... if you like to play around with my very first 5 letter variable font (HABKU) you are very welcome. http://habaland.ch/images/habaroll8GX.ttf i added the the plus and minus to avoid the font doing the whole move to the min and max, because the backgraound would be visible then. (but most likely i created only a mess ) and by the way, i hate the black circle i had to ad "behind the scene" - id love o have a cleaner solution. ...at the moment i am trying to figure out where to append the savedState() without messing everything up... greetings from Bern
    • ThunderNixon

      UNSOLVED Efficient way to convert all text to outlines in a multi-page doc?
      General Discussion • bezierpath text • • ThunderNixon  

      8
      0
      Votes
      8
      Posts
      429
      Views

      frederik

      mmm, generate an instance with fontTools, use that font with a path and generate the pdf? wondering if the Bad font object... error is also reported with old-style-static-fonts?
    • ThunderNixon

      SOLVED Is there a way to build "bleed" into a file, for printing?
      General Discussion • layout • • ThunderNixon  

      4
      0
      Votes
      4
      Posts
      324
      Views

      andyclymer

      Until there's a new feature for this, I think you could replace your newPage() calls to a custom newPageWithBleed() that goes something like this, and wouldn't need to change any of your other drawing code — def newPageWithBleed(w, h, bleed): newPage(w + bleed * 2, h + bleed * 2) translate(bleed, bleed) W, H = 400, 400 bleed = 25 newPage(W, H) rect(0, 0, 20, 20) newPageWithBleed(W, H, bleed) rect(0, 0, 20, 20)
    • MauriceMeilleur

      UNSOLVED Using arcTo() for variable-radius corner-rounding
      General Discussion • trigonometry • • MauriceMeilleur  

      1
      0
      Votes
      1
      Posts
      193
      Views

      No one has replied

    • ThunderNixon

      SOLVED How do I size an image with the ImageObject (or without)?
      General Discussion • image transformations • • ThunderNixon  

      5
      0
      Votes
      5
      Posts
      381
      Views

      ThunderNixon

      Ahh this is a very clear-headed approach. Thanks for showing me how it's done! This is very helpful.