Lines from images

Can Anyone help me with a conceptual Solution for Drawing lines from images colors ?

Hi Omar
take a look at these topics:

http://dynamobim.com/forums/topic/create-geometry-from-image/

Also, can you elaborate more on what’s your final goal?

images![stock-vector-random-chaotic-lines-abstract-geometric-pattern-texture-modern-contemporary-art-like-593315948|450x228]
thank you viktor
Just i want to have a Solution for drawing lines from images any " black and whit lines images"stock-vector-random-chaotic-lines-abstract-geometric-pattern-texture-modern-contemporary-art-like-593315948

Well for things like this I would recommend using software to convert raster images to vectors. Like illustrator, inkscape (which is free and open source) and numerous online vectorizing services.

1 Like

Perhaps this can serve as a proof of concept for you. Pulled it out of my archives of stuff that ‘wasn’t worth developing’ as there is simply better software for this available elsewhere (as @viktor_kuzev noted). There is likely a better method for this - the entire exercise was done while waiting at a bus station. The Geometry.DistanceTo quickly caused the entire method to sorta blow up (an 88x88 pixel image is unbearably slow from my perspective, with computational time scaling exponentially due to the cross product setup). Looks like it may also have overlapping polycurves.

Topo From Bitmap for Forum.dyn (13.7 KB)

The chaotic line pattern or other images with crossing or branching lines certainly won’t work with this method, nor was it ever intended to - the inspiration was a RevitKid post on tracing topography - no crossing lines to deal with there.

Likely the ‘best’ solution would be to utilize some of the Inkscape (or other open source tool) libraries inside Dynamo, but I’m not sure what is possible there.

1 Like

IT SOUNDS GOOD
Please mention what to do after vectorizing the raster one … which nodes can help?

thank you viktor

Well when you vectorize it you can export it as DWG. Then you can do pretty much everything. After the vectorizing you usually end up with splines in the DWG which is rarely what you need, but you can convert them or redraw them.
There are computational algorithms that recognize rectangles and circles in an image too, and I’ve seen some implemented in Dynamo through a python node, but I couldn’t find it. Anyway it was just recognizing rectangles and circles, which wouldn’t work with your examples.

1 Like