|
In lugnet.cad, Ross Crawford wrote:
|
In lugnet.cad, Travis Cobbs wrote:
|
You might want to add the following two lines to the tops of your generated
files:
0 UNOFFICIAL PART
0 BFC CERTIFY CW
Adding the above two lines will enable BFC processing. The first line is
needed because most models dont contain a 0 BFC CERTIFY line in them.
|
Thanks for pointing this out, I just realised
txt2dat does not
include any header at all. Id better fix that :)
ROSCO
|
Hey, txt2dat is cool! It looks like it should build on the Mac, too, so Im
puttering with rewriting the Makefile to make that happen. (The triangle
library builds fine with the -DLINUX switch turned off.) Its part of my new
crusade to get every LDraw program on earth ported to the Mac. Any other LDraw
utility authors - watch out! Youre next. ;-)
More seriously, as I was just searching through the Lugnet archives for further
incriminating evidence that Ive sort of been
reinventing the wheel with
Bitsticker, I came upon this thread by Tim Gould from 2005:
Automatic sticker creation. That is
clearly a more practical implementation of an image-to-LDraw converter! Has that
been released? More to the point, Im simply curious about how the vectorization
is achieved. This comment in particular is right on:
|
The advantage this has over BMP2DAT (from what I can gather, havent really
used it) is that my program finds the lines and then triangulates the
resulting polygon rather than turning pixels into quads (correct me if
this is not what BMP2DAT does).
|
Does it use a library like potrace or did you
write your own vectorization code? (Ive done a lot of work with remote sensing
and GIS so vectorization is just a fascinating topic to me.) Hopefully I have
just overlooked some more recent announcement pertaining to this project.
Thanks,
Jim
|
|
|
In lugnet.cad, Jim DeVona wrote:
|
In lugnet.cad, Ross Crawford wrote:
|
In lugnet.cad, Travis Cobbs wrote:
|
You might want to add the following two lines to the tops of your generated
files:
0 UNOFFICIAL PART
0 BFC CERTIFY CW
Adding the above two lines will enable BFC processing. The first line is
needed because most models dont contain a 0 BFC CERTIFY line in them.
|
Thanks for pointing this out, I just realised
txt2dat does not
include any header at all. Id better fix that :)
|
Hey, txt2dat is cool! It looks like it should build on the Mac, too, so Im
puttering with rewriting the Makefile to make that happen. (The triangle
library builds fine with the -DLINUX switch turned off.) Its part of my
new crusade to get every LDraw program on earth ported to the Mac. Any other
LDraw utility authors - watch out! Youre next. ;-)
|
Hey, thatd be great! The makefile is a bit of a rats nest, because I borrowed
it from the freetype library, and modified it. The main reason I did that was
for cross-platform compatability, but Ive never had a Mac to try on. If you can
get it to build on the Mac, Id be happy to work any changes into the official
version.
ROSCO
|
|
|
In lugnet.cad, Ross Crawford wrote:
|
In lugnet.cad, Jim DeVona wrote:
|
Hey, txt2dat is cool! It looks like it should build on the Mac, too, so
Im puttering with rewriting the Makefile to make that happen. (The
triangle library builds fine with the -DLINUX switch turned off.) Its
part of my new crusade to get every LDraw program on earth ported to the
Mac. Any other LDraw utility authors - watch out! Youre next. ;-)
|
Hey, thatd be great! The makefile is a bit of a rats nest, because I
borrowed it from the freetype library, and modified it. The main reason I did
that was for cross-platform compatability, but Ive never had a Mac to try
on. If you can get it to build on the Mac, Id be happy to work any changes
into the official version.
|
Hi Ross,
It works! I just built it by hand, so Ill write a simple makefile for it
tomorrow. Only issue is that the version of Freetype 2 that comes with OS X
doesnt seem to know about FT_Orientation, so I just ifdeffed out the few
bits that referred to that, possibly at the expense of handling certain cases
(Postscript fonts which are wound the other way, perhaps? I dunno).
I have a proposition: working out a Mac build is great, but what would you say
to adapting txt2dat to run on the web (like Bitsticker)? Even more than my Mac
crusade, I like the idea of making all these LDraw tools more accessible to the
casual user, who may not be so keen on the command line or even just installing
lots of little programs. Id be willing to work on that, when possible, and I
could even host it since my web server supports compiled CGI scripts.
Jim
|
|
|
In lugnet.cad, Jim DeVona wrote:
|
In lugnet.cad, Ross Crawford wrote:
|
In lugnet.cad, Jim DeVona wrote:
|
Hey, txt2dat is cool! It looks like it should build on the Mac, too, so
Im puttering with rewriting the Makefile to make that happen. (The
triangle library builds fine with the -DLINUX switch turned off.) Its
part of my new crusade to get every LDraw program on earth ported to the
Mac. Any other LDraw utility authors - watch out! Youre next. ;-)
|
Hey, thatd be great! The makefile is a bit of a rats nest, because I
borrowed it from the freetype library, and modified it. The main reason I
did that was for cross-platform compatability, but Ive never had a Mac to
try on. If you can get it to build on the Mac, Id be happy to work any
changes into the official version.
|
Hi Ross,
It works! I just built it by hand, so Ill write a simple makefile for it
tomorrow. Only issue is that the version of Freetype 2 that comes with OS X
doesnt seem to know about FT_Orientation, so I just ifdeffed out the few
bits that referred to that, possibly at the expense of handling certain cases
(Postscript fonts which are wound the other way, perhaps? I dunno).
|
Hmmm, interesting. txt2dat is currently compiled against 2.1.9, I havent tried
upgrading since txt2dat is the only thing I use it for. But the API doc at the
freetype site still documents
the FT_Orientation API. Also, version 2.3.1 (which I just downloaded to
check) seems to include it. What version do you have?
It also documents
the FT_OUTLINE_REVERSE_FILL flag, which I do vaguely remember from when I
originally wrote the program, and cant remember why I didnt use it. Does your
version support that flag? If so, Ill look into using that instead. Type 1
(Postscript) fonts are wound the other way (at least the ones I have are) so we
do need to take it into account.
|
I have a proposition: working out a Mac build is great, but what would you
say to adapting txt2dat to run on the web (like Bitsticker)? Even more than
my Mac crusade, I like the idea of making all these LDraw tools more
accessible to the casual user, who may not be so keen on the command line or
even just installing lots of little programs. Id be willing to work on that,
when possible, and I could even host it since my web server supports compiled
CGI scripts.
|
Thats also a great idea, but Ill still continue to maintain the stand-alone
executable separately, so itll be up to you to incorporate any changes I may
make to the original :) Either way, Im happy put a to link on my page.
ROSCO
|
|
|
In lugnet.cad, Ross Crawford wrote:
|
In lugnet.cad, Jim DeVona wrote:
|
Hi Ross,
It works! I just built it by hand, so Ill write a simple makefile for it
tomorrow. Only issue is that the version of Freetype 2 that comes with OS X
doesnt seem to know about FT_Orientation, so I just ifdeffed out the
few bits that referred to that, possibly at the expense of handling certain
cases (Postscript fonts which are wound the other way, perhaps? I dunno).
|
Hmmm, interesting. txt2dat is currently compiled against 2.1.9, I havent
tried upgrading since txt2dat is the only thing I use it for. But the API doc
at the freetype site still documents
the FT_Orientation API. Also, version 2.3.1 (which I just downloaded to
check) seems to include it. What version do you have?
|
I believe it is freetype 2.1.4 (based on the major/minor/patch definitions in
freetype.h). The headers are last dated 2002, and a look at more recent
freetype changelogs suggests that predates the introduction of
FT_Orientation. Its annoying that the preinstalled libraries arent more up
to date.
|
It also documents
the FT_OUTLINE_REVERSE_FILL flag, which I do vaguely remember from when I
originally wrote the program, and cant remember why I didnt use it. Does
your version support that flag? If so, Ill look into using that instead.
Type 1 (Postscript) fonts are wound the other way (at least the ones I have
are) so we do need to take it into account.
|
Yes, FT_OUTLINE_REVERSE_FILL is defined on my system.
|
|
I have a proposition: working out a Mac build is great, but what would you
say to adapting txt2dat to run on the web (like Bitsticker)? Even more
than my Mac crusade, I like the idea of making all these LDraw tools more
accessible to the casual user, who may not be so keen on the command line or
even just installing lots of little programs. Id be willing to work on
that, when possible, and I could even host it since my web server supports
compiled CGI scripts.
|
Thats also a great idea, but Ill still continue to maintain the stand-alone
executable separately, so itll be up to you to incorporate any changes I may
make to the original :) Either way, Im happy put a to link on my page.
|
Cool. I dont think any modifications to txt2dat itself will even be
necessary: Ill write a CGI script that passes it arguments and returns its
output. That would make it easy to keep the web version in sync with the regular
version.
I just checked and txt2dat builds on my server no problem (it has FT 2.1.9).
Ill work out my makefile later today.
Jim
|
|
|
In lugnet.cad, Jim DeVona wrote:
|
I just checked and txt2dat builds on my server no problem (it has FT
2.1.9). Ill work out my makefile later today.
|
Here is my rudimentary makefile for building txt2dat on my Mac and a linux
machine. No guarantees it will work for anyone else but hopefully it could be
helpful. Also a copy of txt2dat.c containing my quick checks to get around the
lack of FT_Orientation in my old version of Freetype.
This makefile goes in the same folder as the original and I build it with make
-f Makefile.alt (it puts the txt2dat program in the same folder as well).
Jim
|
|
|
--snip--
|
More seriously, as I was just searching through the Lugnet archives for
further incriminating evidence that Ive sort of been
reinventing the wheel with
Bitsticker, I came upon this thread by Tim Gould from 2005:
Automatic sticker creation. That is
clearly a more practical implementation of an image-to-LDraw converter! Has
that been released? More to the point, Im simply curious about how the
vectorization is achieved. This comment in particular is right on:
|
The advantage this has over BMP2DAT (from what I can gather, havent really
used it) is that my program finds the lines and then triangulates the
resulting polygon rather than turning pixels into quads (correct me if
this is not what BMP2DAT does).
|
Does it use a library like potrace or did
you write your own vectorization code? (Ive done a lot of work with remote
sensing and GIS so vectorization is just a fascinating topic to me.)
Hopefully I have just overlooked some more recent announcement pertaining to
this project.
Thanks,
Jim
|
Unfortunately I got too busy with other things and kind of let is slide. With a
rewrite in a compiled language and using a decent triangulation (such as the one
Ross uses) and vectorisation algorithm I suspect it could be made to work
better.
Tim
|
|
|
In lugnet.cad, Timothy Gould wrote:
|
--snip--
|
More seriously, as I was just searching through the Lugnet archives for
further incriminating evidence that Ive sort of been
reinventing the wheel with
Bitsticker, I came upon this thread by Tim Gould from 2005:
Automatic sticker creation. That is
clearly a more practical implementation of an image-to-LDraw converter! Has
that been released? More to the point, Im simply curious about how the
vectorization is achieved. This comment in particular is right on:
|
The advantage this has over BMP2DAT (from what I can gather, havent really
used it) is that my program finds the lines and then triangulates the
resulting polygon rather than turning pixels into quads (correct me if
this is not what BMP2DAT does).
|
Does it use a library like potrace or did
you write your own vectorization code? (Ive done a lot of work with remote
sensing and GIS so vectorization is just a fascinating topic to me.)
Hopefully I have just overlooked some more recent announcement pertaining to
this project.
Thanks,
Jim
|
Unfortunately I got too busy with other things and kind of let is slide. With
a rewrite in a compiled language and using a decent triangulation (such as
the one Ross uses) and vectorisation algorithm I suspect it could be made to
work better.
Tim
|
Hmmm. It would appear that using the Potrace API and the Triangle API would do
almost all the difficult work for software of this sort. I might look into
restarting the project although Im not sure how far I could get with it. Of
course if anyone would like to take it over Id be willing to offer as much help
(including source code) as I could.
Tim
|
|
|
In lugnet.cad, Timothy Gould wrote:
|
In lugnet.cad, Timothy Gould wrote:
|
--snip--
|
More seriously, as I was just searching through the Lugnet archives for
further incriminating evidence that Ive sort of been
reinventing the wheel with
Bitsticker, I came upon this thread by Tim Gould from 2005:
Automatic sticker creation. That is
clearly a more practical implementation of an image-to-LDraw converter! Has
that been released? More to the point, Im simply curious about how the
vectorization is achieved. This comment in particular is right on:
|
The advantage this has over BMP2DAT (from what I can gather, havent
really used it) is that my program finds the lines and then triangulates
the resulting polygon rather than turning pixels into quads (correct me if
this is not what BMP2DAT does).
|
Does it use a library like potrace or did
you write your own vectorization code? (Ive done a lot of work with remote
sensing and GIS so vectorization is just a fascinating topic to me.)
Hopefully I have just overlooked some more recent announcement pertaining
to this project.
Thanks,
Jim
|
Unfortunately I got too busy with other things and kind of let is slide.
With a rewrite in a compiled language and using a decent triangulation (such
as the one Ross uses) and vectorisation algorithm I suspect it could be made
to work better.
Tim
|
Hmmm. It would appear that using the Potrace API and the Triangle API would
do almost all the difficult work for software of this sort. I might look into
restarting the project although Im not sure how far I could get with it. Of
course if anyone would like to take it over Id be willing to offer as much
help (including source code) as I could.
Tim
|
Neat. I have also
used
autotrace, a similar program. I havent
used either enough to recommend one over the other, but for some reason I do
recall preferring potraces output. (Ive only used the programs, not programmed
with them.)
I dont know how much use people would find for it (the same applies to
Bitsticker), but personally I think this would be a really cool program. I cant
offer to take it over, but as with a couple other LDraw programs Ive had my
fingers in recently, Id be glad to help test it out.
Take care,
Jim
|
|
|