algorithmic modeling for Rhino
I was trying to figure out how to trace an image directly by grasshopper.
It is really time consuming if I manually trace a complicated image using the bitmap method.
If possible can anyone post the grasshopper file for tracing image.It doesn't need to be very accurate.
There had been a discussion on it before but it did not give me the output as I saw.There might be some error in the file I created.
Could anyone post the working grasshopper file for it?
Tags:
Here is a method using medial axis scripts, but instead of using them I used the Voronoi lines which have a point inside and a point outside the surfaces. I cut these lines at the intersection with the edges and keep the inside.
Points where extracted from theses lines. The points are moved in Z direction (surface on XY plane) according to their distance from boundary and the length of the line. Many equations could be used but it is not very beautiful. Sort of chanfer using Graph mapper is not too ugly.
As it is quite long (1 min), disable solver before using Graph Mapper.
The potrace Python script now works with spaces in the file path to the .bmp image:
p = subprocess.Popen("%s %s -o %s -b dxf -u 10 " % (potrace_File_Path,Image_File_Path,output_dxf_path), stdout=subprocess.PIPE, creationflags=0x08000000) #creationflags suppresses blank CMD.exe window.
...became:
p = subprocess.Popen("cmd /C \"\"%s\" \"%s\" -o \"%s\" -b dxf -u 10 \"" % (potrace_File_Path,Image_File_Path,output_dxf_path), stdout=subprocess.PIPE, creationflags=0x08000000) #creationflags suppresses blank CMD.exe window.
...based on this Google hit:
http://stackoverflow.com/questions/6376113/spaces-problem-in-cmd
Potrace has been bettered by a new neural network program, no source code yet though:
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by