Skip to content

Commit

Permalink
parfunlib>lq
Browse files Browse the repository at this point in the history
  • Loading branch information
jalovisko committed Aug 3, 2022
1 parent b147e27 commit f770dda
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 557 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,15 @@ An example is a Python script that can be imported from within the editor (the w
These examples include the geometric modeling of:
* A homogeneous gyroid lattice (`gyroid.py`)
* A conformal heterogeneous lattice filling a cylindrical tube (`tire.py`)
* A heterogeneous FCC lattice (`FCC_xyz.py`)
* A heterogeneous FCC lattice with the linearly changing beam thickness (`FCC_heterogeneous_lattice.py`)
* A heterogeneous BCC lattice with the beam thickness changing according to the parabolic distribution (`BCC_heterogeneous_lattice.py`)
* A heterogeneous FCC lattice with the beam cross-section gradually changing from square to circle (`changing_cross_section.py`)
* A heterogeneous diamond lattice with the linearly changing beam thickness (`diamond.py`)
* A heterogeneous FBCC lattice with the linearly changing beam thickness (`FBCC_heterogeneous_lattice.py`)
* A heterogeneous gyroid lattice with the linearly changing thickness (`heterogeneous_gyroid.py`)
* A heterogeneous Schwarz D and P lattices with the linearly changing thickness (`heterogeneous_schwartz.py`)
* A heterogeneous Schwarz D lattice with the thickness changing according to the periodic sine distribution (`schwartz-d.py`)


## Known issues
Sometimes the modeling would fail with an error like `Brep: command not done`. This is often solved by passing a float argument to the function rather than an integer one. You can also try to increase the unit cell size, let's say, 10 times, and then scale it down 10 times.
Expand Down
261 changes: 0 additions & 261 deletions lattice_scripts/BCC.py

This file was deleted.

22 changes: 11 additions & 11 deletions lattice_scripts/BCC_heterogeneous_lattice.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import cadquery as cq
from parfunlib.commons import eachpointAdaptive
from parfunlib.topologies.bcc import bcc_heterogeneous_lattice
from lq.commons import eachpointAdaptive
from lq.topologies.bcc import bcc_heterogeneous_lattice
import time

# USER INPUT

unit_cell_size = 10
min_strut_diameter = 1
max_strut_diameter = 1
min_node_diameter = 1
max_node_diameter = 1
Nx = 1
Ny = 1
Nz = 1
min_strut_diameter = 0.1
max_strut_diameter = 2.
min_node_diameter = 0.11
max_node_diameter = 2.2
Nx = 3
Ny = 3
Nz = 10

# END USER INPUT

Expand All @@ -28,7 +28,7 @@
min_node_diameter,
max_node_diameter,
Nx, Ny, Nz,
topology = 'bcc'
#rule = 'parabola'
topology = 'bcc',
rule = 'parabola'
)
print('The excecution time is: %s seconds' % (time.time() - start_time))
34 changes: 0 additions & 34 deletions lattice_scripts/BCC_lattice.py

This file was deleted.

14 changes: 7 additions & 7 deletions lattice_scripts/FBCC_heterogeneous_lattice.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from parfunlib.topologies.fbcc import fbcc_heterogeneous_lattice
from parfunlib.commons import eachpointAdaptive
from lq.topologies.fbcc import fbcc_heterogeneous_lattice
from lq.commons import eachpointAdaptive
# USER INPUT

unit_cell_size = 10
min_strut_diameter = 1
max_strut_diameter = 1
max_strut_diameter = 2
min_node_diameter = 1.1
max_node_diameter = 1.1
Nx = 1
Ny = 1
Nz = 1
max_node_diameter = 2.2
Nx = 2
Ny = 2
Nz = 2

# END USER INPUT

Expand Down
14 changes: 7 additions & 7 deletions lattice_scripts/FCC_heterogeneous_lattice.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from parfunlib.topologies.fcc import fcc_heterogeneous_lattice
from lq.topologies.fcc import fcc_heterogeneous_lattice

# USER INPUT

unit_cell_size = 10
min_strut_diameter = 1.
max_strut_diameter = 1.
min_node_diameter = 1.0
max_node_diameter = 1.0
min_strut_diameter = 0.5
max_strut_diameter = 2.
min_node_diameter = 0.5
max_node_diameter = 2.
Nx = 5
Ny = 5
Nz = 1
Ny = 1
Nz = 5

# END USER INPUT

Expand Down
Loading

0 comments on commit f770dda

Please sign in to comment.