pattern generator

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
User avatar
microelly2
Posts: 4228
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

pattern generator

Postby microelly2 » Mon Feb 11, 2019 4:27 pm

There was a discussion between regis and me on a way to create 2D patterns which can be transformed to 3D Patterns
The starting point should be a drawing (a sketch or a svg image). In next steps the segments should become configurable array objects.
Here is my first prototype.
it creates a pattern on top of a sketch.

phpBB [video]
User avatar
regis
Posts: 655
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: pattern generator

Postby regis » Mon Feb 11, 2019 5:37 pm

wowow this is really cool. Thanks a bunch. I would like to know how you did this in the code. really impressive and starting to look great.
Does it also work with draft objects?
paullee
Posts: 1385
Joined: Wed May 04, 2016 3:58 pm

Re: pattern generator

Postby paullee » Mon Feb 11, 2019 6:05 pm

Interesting development!
rstech
Posts: 11
Joined: Thu May 26, 2016 8:30 am

Re: pattern generator

Postby rstech » Tue Feb 12, 2019 10:04 am

Looks great! Can this also be used to fill a 3D surface? For example to clad organic shaped buildings?
User avatar
microelly2
Posts: 4228
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: pattern generator

Postby microelly2 » Tue Feb 12, 2019 4:11 pm

phpBB [video]


I split the functionality in 3 methods

1. combine some drawings (Sketcher/Draft 2D) to an array
2. calculate the cut points
3. delete edges by selection
4. generate pattern

next steps:
* make objects/steps 1,2,4 parametric
* look for an idea to get step 3 parametric too - but it's the topo naming curse on it
* map the patterns onto a 3D surface

for testing: the methods are in the nurbs wb
feedback welcome

demo file https://www.dropbox.com/s/lm1jyfk5fa4yq ... FCStd?dl=0
script: https://github.com/microelly2/freecad-n ... tern_v2.py

EDIT:
for the script networkx is required

sudo apt-get install python-networkx
User avatar
microelly2
Posts: 4228
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: pattern generator

Postby microelly2 » Thu Feb 14, 2019 3:40 pm

pattern on surfaces - inspired by sverchok
started with two simples sketches and my pattern generator
bp_962.png
bp_962.png (302.97 KiB) Viewed 187 times
User avatar
regis
Posts: 655
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: pattern generator

Postby regis » Thu Feb 14, 2019 8:13 pm

Jesus, You are pretty wild.
There is no limit to your creativity :lol: :D

If on linux and it doesn't work probably might need to install these in terminal

Code: Select all

sudo apt install python-pip

Code: Select all

sudo apt-get install python-networkx
User avatar
microelly2
Posts: 4228
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: pattern generator

Postby microelly2 » Fri Feb 15, 2019 3:26 pm

microelly2 wrote:
Tue Feb 12, 2019 4:11 pm
next steps:
* make objects/steps 1,2,4 parametric
* look for an idea to get step 3 parametric too - but it's the topo naming curse on it
* map the patterns onto a 3D surface
Done.
Now the qeustion is: what are use cases of the mapping of the pattern to the surface?
We can create bump maps, surfaces patches
or simply have the pattern for texturing purposes.
phpBB [video]