Kendall Sears - 19 September 2012 06:26 PM
I was just wondering if someone like me could write an import routine. Is there any docs on your import data? Is there a way to set the diameter of the line in the txt file? Can it handle complex paths? Multiple paths? If no on the multiple paths, is there a set reference point so that multiple runs could create colocated tubes?
EDIT: There are *many* projects that I could use this for if only I could get a SVG file into it.
Kendall
the format was established when i wrote mcjLathe
a few named parameters, followed by a list of vertices, the x coordinates range from -0.5 to 0.5 the y coordinates range from 0 to 1
if you run mcjLathe ( https://sites.google.com/site/mcasualsdazscripts/mcjlathe ) or mcjSuperLathe ( https://sites.google.com/site/mcasualsdazscripts/mcjlathe ) you can save the curves you create to disk and inspect them
indeed there’s only 1 curve per file
i was thinking .... maybe i could write a dxf importer since eons ago i wrote one. and i would think there’ svg-to-dxf converters floating around the internet
the index for my web site is https://sites.google.com/site/mcasualsdazscripts2
here is a complete 4-points curve from ncjSuperLathe
type mcjLathe
vrsn 2009.11.25
twld false
bwld false
clsd false
nsds 8
nsgs 2
note vertex coordinates: first column is x second is y
note X must remain in the [-0.5,0.5] range
note Y must remain in the [0.0,1.0] range
v 0.5 0
v 0.15 0.15
v 0 0.5
v 0.15 0.85
v 0.5 1
the new upcoming script, mcjTransport involves 3D curves,
so i append the 3D coordinates using the new token “v3d”
type mcjLathe
vrsn 2009.11.25
twld false
bwld false
clsd false
nsds 8
nsgs 2
note vertex coordinates: first column is x second is y
note X must remain in the [-0.5,0.5] range
note Y must remain in the [0.0,1.0] range
v 0.5 0
v 0.15 0.15
v 0 0.5
v 0.15 0.85
v 0.5 1
v3d 0.5 0 0
v3d 0.15 0 0.15
v3d 0 0 0.5
v3d 0.15 0 0.85
v3d 0.5 0 1