Skip to content

Commit

Permalink
Merge pull request #174 from alessandro-zomparelli/b421-polyhedral_wi…
Browse files Browse the repository at this point in the history
…reframe_dual_mesh

B421 polyhedral wireframe dual mesh
  • Loading branch information
alessandro-zomparelli authored Sep 28, 2024
2 parents a218a16 + b939141 commit b044a04
Show file tree
Hide file tree
Showing 18 changed files with 245 additions and 580 deletions.
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
Tissue - Blender's add-on for computational design by Co-de-iT
https://www.co-de-it.com/code/blender-tissue

Tissue is already shipped with both Blender. However I recommend to update the default version downloading manually the most recent one, for more updated features and more stability.
Tissue is already shipped with both Blender. However, I recommend updating the default version by downloading manually the most recent one, for more updated features and more stability.

### Blender 4.0.2
### Blender 4.2.1

Download the latest release: https://github.com/alessandro-zomparelli/tissue/releases

Current development branch (usually the most updated version): https://github.com/alessandro-zomparelli/tissue/tree/b401-dev


### Installation:

1. Start Blender. Go to "Edit" and then "Preferences"
Expand All @@ -24,21 +21,17 @@ Current development branch (usually the most updated version): https://github.co
Tissue documentation for Blender's latest version: https://docs.blender.org/manual/en/latest/addons/mesh/tissue.html

### Issues
Please help me keeping Tissue stable and updated, report any issues or feedback here: https://github.com/alessandro-zomparelli/tissue/issues
Please help me keep Tissue stable and updated, report any issues or feedback here: https://github.com/alessandro-zomparelli/tissue/issues

### Contribute
Tissue is free and open-source. I really think that this is the power of Blender and I wanted to give my small contribution to it.
Tissue is free and open-source. I think that this is the power of Blender and I wanted to give my small contribution to it.

If you like my work and you want to help me, please consider to support me on **Patreon**, where I share some tips about Blender, Tissue and scripting: https://www.patreon.com/alessandrozomparelli
If you like my work and want to help me, please consider supporting me on **Patreon**, where I share some tips about Blender, Tissue and scripting: https://www.patreon.com/alessandrozomparelli

[![Patreon](http://alessandrozomparelli.com/wp-content/uploads/2020/04/patreon-transparent-vector-small.png)](https://www.patreon.com/alessandrozomparelli)

A special thanks to all my patrons, in particular to my active **Tissue Supporters**: *Scott Shorter*, *MutableHurdle*, *K*, *Happy Person*, *Dream H*, *Chris Costanzi*, *Chengyuan Wei*, *Avi Bryant*.

If that is too much for you or you are just passing by, then you can also **buy me a coffee**:

<a href="https://www.buymeacoffee.com/alessandrozompa" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>

Many thanks,

Alessandro
24 changes: 4 additions & 20 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# SPDX-FileCopyrightText: 2017 Alessandro Zomparelli
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# SPDX-License-Identifier: GPL-2.0-or-later

# --------------------------------- TISSUE ----------------------------------- #
# ------------------------------- version 0.3 -------------------------------- #
# #
# Creates duplicates of selected mesh to active morphing the shape according #
# to target faces. #
Expand All @@ -34,8 +18,8 @@
bl_info = {
"name": "Tissue",
"author": "Alessandro Zomparelli",
"version": (0, 3, 70),
"blender": (4, 0, 2),
"version": (0, 3, 72),
"blender": (4, 2, 1),
"location": "",
"description": "Tools for Computational Design",
"warning": "",
Expand Down
2 changes: 2 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-FileCopyrightText: 2022-2023 Blender Foundation
#
# SPDX-License-Identifier: GPL-2.0-or-later

import bpy
Expand Down
37 changes: 2 additions & 35 deletions contour_curves.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-or-later

# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# SPDX-FileCopyrightText: 2017 Alessandro Zomparelli
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

#-------------------------- COLORS / GROUPS EXCHANGER -------------------------#
# #
# Vertex Color to Vertex Group allow you to convert colors channles to weight #
# maps. #
# The main purpose is to use vertex colors to store information when importing #
# files from other softwares. The script works with the active vertex color #
# slot. #
# For use the command "Vertex Clors to Vertex Groups" use the search bar #
# (space bar). #
# #
# (c) Alessandro Zomparelli #
# (2017) #
# #
# http://www.co-de-it.com/ #
# #
################################################################################
# SPDX-License-Identifier: GPL-2.0-or-later

import bpy, bmesh, os
import numpy as np
Expand Down
29 changes: 2 additions & 27 deletions curves_tools.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-or-later

# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# SPDX-FileCopyrightText: 2017 Alessandro Zomparelli
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

# #
# (c) Alessandro Zomparelli #
# (2017) #
# #
# http://www.co-de-it.com/ #
# #
# ############################################################################ #

# SPDX-License-Identifier: GPL-2.0-or-later

import bpy, bmesh
from bpy.types import Operator
Expand Down
40 changes: 5 additions & 35 deletions dual_mesh.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-or-later

# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# SPDX-FileCopyrightText: 2017 Alessandro Zomparelli
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

# --------------------------------- DUAL MESH -------------------------------- #
# -------------------------------- version 0.3 ------------------------------- #
# #
# Convert a generic mesh to its dual. With open meshes it can get some wired #
# effect on the borders. #
# #
# (c) Alessandro Zomparelli #
# (2017) #
# #
# http://www.co-de-it.com/ #
# #
# ############################################################################ #

# SPDX-License-Identifier: GPL-2.0-or-later

import bpy
from bpy.types import Operator
Expand Down Expand Up @@ -107,8 +77,8 @@ def execute(self, context):
me = bpy.data.meshes.new("Dual-Mesh") # add a new mesh
me.from_pydata(verts, edges, faces)
me.update(calc_edges=True, calc_edges_loose=True)
if self.source_faces == 'QUAD': seams = (0,1,2,3,4,5,6,9)
else: seams = (0,1,2,3,4,5,7)
if self.source_faces == 'QUAD': seams = (0,1,2,3,4,5,6,7)
else: seams = (0,1,2,3,4,5,6)
for i in seams: me.edges[i].use_seam = True
ob1 = bpy.data.objects.new(name1, me)
# fix visualization issue
Expand Down Expand Up @@ -266,7 +236,7 @@ def execute(self, context):
bpy.ops.mesh.select_more(use_face_step=False)

bpy.ops.mesh.select_similar(
type='EDGE', compare='EQUAL', threshold=0.01)
type='VERT_EDGES', compare='EQUAL', threshold=0.01)
bpy.ops.mesh.select_all(action='INVERT')

bpy.ops.mesh.dissolve_verts()
Expand Down
29 changes: 2 additions & 27 deletions lattice.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
# ##### BEGIN GPL LICENSE BLOCK #####
# SPDX-FileCopyrightText: 2017 Alessandro Zomparelli
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# --------------------------- LATTICE ALONG SURFACE -------------------------- #
# -------------------------------- version 0.3 ------------------------------- #
# #
# Automatically generate and assign a lattice that follows the active surface. #
# #
# (c) Alessandro Zomparelli #
# (2017) #
# #
# http://www.co-de-it.com/ #
# #
# ############################################################################ #
# SPDX-License-Identifier: GPL-2.0-or-later

import bpy
import bmesh
Expand Down
30 changes: 4 additions & 26 deletions material_tools.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
# ##### BEGIN GPL LICENSE BLOCK #####
# SPDX-FileCopyrightText: 2020 Alessandro Zomparelli
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

# #
# (c) Alessandro Zomparelli #
# (2020) #
# #
# http://www.co-de-it.com/ #
# #
################################################################################
# SPDX-License-Identifier: GPL-2.0-or-later

import bpy
import numpy as np
Expand Down Expand Up @@ -224,8 +202,8 @@ def execute(self, context):
faces_weight.append(w)
faces_weight = np.array(faces_weight)
faces_weight = faces_weight * count
faces_weight.astype('int')
ob.data.polygons.foreach_set('material_index',list(faces_weight))
faces_weight = list(faces_weight.astype('int'))
ob.data.polygons.foreach_set('material_index', faces_weight)
ob.data.update()
bpy.ops.object.mode_set(mode='OBJECT')
return {'FINISHED'}
18 changes: 2 additions & 16 deletions numba_functions.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
# ##### BEGIN GPL LICENSE BLOCK #####
# SPDX-FileCopyrightText: 2019-2022 Blender Foundation
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# SPDX-License-Identifier: GPL-2.0-or-later

import numpy as np
import time
Expand Down
Loading

0 comments on commit b044a04

Please sign in to comment.