How to access to each path in type

Q's Avatar

Q

31 Jan, 2013 04:36 PM

In Illustrator, most texts are comprised of compound object when they are outlined, because it has inner and outer space. Is there a way to ungroup them? I attached a photo. Thank you.

Best,

Q

  1. Support Staff 1 Posted by Frederik De Ble... on 04 Feb, 2013 04:28 PM

    Frederik De Bleser's Avatar

    There's no built-in node to do this, but you can use this custom one. It contains a .py script that it uses to take out the contours. The code is really simple:

    def contours(path):
        return path.contours
    

    We have some documentation on writing your own nodes. Note that accessing the graphics API is subject to change as we are moving to a new, more performant API.

  2. Frederik De Bleser closed this discussion on 04 Feb, 2013 04:28 PM.

  3. Kyuha Shim re-opened this discussion on 04 Feb, 2013 11:56 PM

  4. 2 Posted by Kyuha Shim on 04 Feb, 2013 11:56 PM

    Kyuha Shim's Avatar

    Thank you very much :-)

    Best,

    Q

  5. Frederik De Bleser closed this discussion on 05 Feb, 2013 10:35 AM.

  6. Kyuha Shim re-opened this discussion on 05 Feb, 2013 06:48 PM

  7. 3 Posted by Kyuha Shim on 05 Feb, 2013 06:48 PM

    Kyuha Shim's Avatar

    Hello Frederik,
    Your code worked fine with rectangle, but when I tried it for type. I got an error.
    [cid:[email blocked]]
    Please let me know how to solve this.
    Thank you.

    All the best,
    Q

    Q / K y u h a S h i m

    Research Fellow / Data Visualization Specialist | Senseable City Lab, MIT
    Faculty | MFA Digital+Media, RISD

    MIT, 9-209, 77 Mass. Avenue,
    Cambridge, MA 02139 USA

    e [email blocked]<mailto:[email blocked]> || [email blocked]<mailto:[email blocked]>
    t +1.401.924.1002
    w http://kyuhashim.com

  8. 4 Posted by User on 06 Feb, 2013 10:14 AM

    User's Avatar

    Found some weirdness with the output of contours.py (screenshot attached). The output cant be used by other nodes.

    Im not a coder nor a programmer and that's why I love Nodebox. The ability to split compound shapes into paths should be implemente into a node. Also I miss a node who returns the height and width of a shape.

  9. Support Staff 5 Posted by Frederik De Ble... on 06 Feb, 2013 04:52 PM

    Frederik De Bleser's Avatar

    The function I showed returned a list of Contour objects, not paths. The new example converts all of the contours to proper paths.

    The code looks like this:

    from nodebox.graphics import Path
    
    def contours(path):
        return [Path(c) for c in path.contours]
    

    A note of warning: we're currently revising the NodeBox graphics API so all code that relies on it will break. This is not so bad for internal code, since we can change it, but if you write your own graphics code you will have to rewrite it. Any code that just uses built-in Python primitives and libraries (e.g. working with numbers and strings) will continue to work.

  10. Frederik De Bleser closed this discussion on 06 Feb, 2013 04:52 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

01 Oct, 2024 07:59 AM
30 Sep, 2024 11:37 PM
30 Sep, 2024 11:11 AM
30 Sep, 2024 02:37 AM
28 Sep, 2024 10:33 AM

 

26 Sep, 2024 06:41 AM
24 Sep, 2024 12:32 AM
24 Sep, 2024 12:27 AM
13 Sep, 2024 12:07 AM
12 Sep, 2024 11:54 PM
07 Sep, 2024 05:16 AM