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

29 May, 2024 05:47 AM
29 May, 2024 05:15 AM
29 May, 2024 05:12 AM
28 May, 2024 07:37 PM
25 May, 2024 11:52 AM

 

24 May, 2024 07:39 AM
16 May, 2024 02:11 AM
14 May, 2024 01:29 AM
12 May, 2024 07:46 PM
05 May, 2024 04:38 PM
03 May, 2024 06:50 AM