The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniGraphSketcher > OmniGraphSketcher General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Paste line and curve data to OmniGraphSketcher Thread Tools Search this Thread Display Modes
I write a AppleScript to parser my data which from my test program, and it could let OmniGraphSketcher draw my output path with line or curve.

For example with those data which generate from TTF font outline path.
Because OmniGraphSketcher's curve doesn't support to use bezier curve control pointer, so before output curve data from my program, I use the bezierat2() function to convert the control pointer to OmniGraphSketcher's control pointer in my program.

-- float bezierat2( float a, float b, float c, ccTime t )
-- {
-- t = 0.5f;
-- return (powf(1-t,2) * a + 2*t*(1-t)*b + powf(t,2)*c );
-- }

Copy those text and paste by my AppleScript to OmniGraphSketcher.

LineTo {(267.000000, 653.000000), (267.000000, 571.000000)}
CurveTo {(267.000000, 571.000000),(165.000000, 513.000000), (210.000000, 556.500000)}
CurveTo {(165.000000, 513.000000),(130.000000, 392.000000), (138.750000, 457.250000)}
CurveTo {(130.000000, 392.000000),(165.000000, 271.000000), (138.750000, 326.250000)}
CurveTo {(165.000000, 271.000000),(267.000000, 212.000000), (210.000000, 226.750000)}
LineTo {(267.000000, 212.000000), (267.000000, 130.000000)}
CurveTo {(267.000000, 130.000000),(95.000000, 216.000000), (169.000000, 151.500000)}
CurveTo {(95.000000, 216.000000),(40.000000, 392.000000), (53.750000, 297.000000)}
CurveTo {(40.000000, 392.000000),(95.000000, 571.000000), (53.750000, 489.250000)}
CurveTo {(95.000000, 571.000000),(267.000000, 653.000000), (169.000000, 632.500000)}

CurveTo {(267.000000, 653.000000),(442.000000, 571.000000), (367.250000, 632.500000)}
CurveTo {(442.000000, 571.000000),(497.000000, 392.000000), (483.250000, 489.250000)}
CurveTo {(497.000000, 392.000000),(442.000000, 216.000000), (483.250000, 295.000000)}
CurveTo {(442.000000, 216.000000),(267.000000, 130.000000), (367.250000, 151.500000)}
LineTo {(267.000000, 130.000000), (267.000000, 212.000000)}
CurveTo {(267.000000, 212.000000),(372.000000, 271.000000), (326.250000, 226.750000)}
CurveTo {(372.000000, 271.000000),(403.000000, 392.000000), (395.250000, 326.250000)}
CurveTo {(403.000000, 392.000000),(372.000000, 513.000000), (395.250000, 457.250000)}
CurveTo {(372.000000, 513.000000),(267.000000, 571.000000), (326.250000, 556.500000)}
LineTo {(267.000000, 571.000000), (267.000000, 653.000000)}



and could get the output in OmniGraphSketcher.
Attached Thumbnails
Click image for larger version

Name:	pic.png
Views:	1041
Size:	43.1 KB
ID:	2615  
Attached Files
File Type: zip Paste Points.zip (60.0 KB, 596 views)
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Curve Text along a line or Bezier baldwhiteguy OmniGraffle General 1 2013-03-07 07:45 AM
Repeating as Ebbinghaus curve Oceannagirl OmniFocus 1 for Mac 1 2013-02-17 10:59 PM
Script: Copy and past line from OmniGraffle to OmniGraphSketcher RobTrew OmniGraffle General 0 2011-11-12 03:08 PM


All times are GMT -8. The time now is 09:50 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.