07-22-2010 01:40 PM
i have a problem and this is probloly not the easyest way to do this but i am shooting blind. i am trying to take a bmp file and generate a path. say the bmp is of a black square in the center of the picture the program will find the upper left corner and generate a (controlable) wide path to fill the entire square. but i want it just to tell the differance between the forground and background so it can generate the path.
my current VI takes the image data RGB format and i am trying to interpret high and low values so i can tell where needs to be filled. what is a better way get a path made from a bmp (or STEP file so i can cut out the middle man!!) this is for additive machining if that helps.
07-22-2010 10:32 PM
Not clear to me. Could you provide a sample image and show what you want to retrieve from it ?
07-23-2010 07:04 AM
attached is a jpg of a possible picture. the black lines are where i want it filled and the white is just background. the blue lines are representing one possible path to take. (this is if 3 dots is 1mm).
a better wording of what i am trying to do is make a program that generates a form of machine code. most CNC machines use G-code, but that is to complicated. this program that i am trying to make will give me cordinants to start the print, to stop the print, distance between them, where to turn etc. in the future i hope to have it recognize color and use the differant colors to determan differant tool heads.
the program to output distances from the "home" position, such as the top left corner, go to point (10,20,0) so the motors would go to 10 inches on the x axis, 20 inches on the y axis, and would go to 0 inches on the z axis. and then to program would output like 1(2,10,1) so the motors would go in a strait line from (10,20,0) to (2,10,1) and use tool head profile 1 (Ex. use tool head 1, that drives stepper motor at 3mm/in, only alow motors to move at 2mm/sec)
07-23-2010 08:33 AM
What you are trying to do is decidedly nontrivial. Back when I used to work for DTM Corporation (now part of 3D Systems), a coworker of mine spent a couple of man-years trying to get something similar to work well. You may not need industrial quality, but be prepared to spend a lot of time. Some things you may want to consider:
STEP is not a simple format, so reading it directly may be difficult, unless you can find a DLL you can call from LabVIEW. The format includes a lot of options, so rolling your own might take awhile.
Good luck! My apologies for not being able to give you more help.