Top Banner
Brigham Young University Brigham Young University BYU ScholarsArchive BYU ScholarsArchive Theses and Dissertations 2022-05-23 Multi-Material 3D-Printed Silicone Vocal Fold Models Multi-Material 3D-Printed Silicone Vocal Fold Models Clayton Adam Young Brigham Young University Follow this and additional works at: https://scholarsarchive.byu.edu/etd Part of the Engineering Commons BYU ScholarsArchive Citation BYU ScholarsArchive Citation Young, Clayton Adam, "Multi-Material 3D-Printed Silicone Vocal Fold Models" (2022). Theses and Dissertations. 9512. https://scholarsarchive.byu.edu/etd/9512 This Thesis is brought to you for free and open access by BYU ScholarsArchive. It has been accepted for inclusion in Theses and Dissertations by an authorized administrator of BYU ScholarsArchive. For more information, please contact [email protected].
146

Multi-Material 3D-Printed Silicone Vocal Fold Models

Mar 17, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Multi-Material 3D-Printed Silicone Vocal Fold Models

Brigham Young University Brigham Young University

BYU ScholarsArchive BYU ScholarsArchive

Theses and Dissertations

2022-05-23

Multi-Material 3D-Printed Silicone Vocal Fold Models Multi-Material 3D-Printed Silicone Vocal Fold Models

Clayton Adam Young Brigham Young University

Follow this and additional works at: https://scholarsarchive.byu.edu/etd

Part of the Engineering Commons

BYU ScholarsArchive Citation BYU ScholarsArchive Citation Young, Clayton Adam, "Multi-Material 3D-Printed Silicone Vocal Fold Models" (2022). Theses and Dissertations. 9512. https://scholarsarchive.byu.edu/etd/9512

This Thesis is brought to you for free and open access by BYU ScholarsArchive. It has been accepted for inclusion in Theses and Dissertations by an authorized administrator of BYU ScholarsArchive. For more information, please contact [email protected].

Page 2: Multi-Material 3D-Printed Silicone Vocal Fold Models

Multi-Material 3D-Printed Silicone Vocal Fold Models

TITLE PAGE

Clayton Adam Young

A thesis submitted to the faculty of Brigham Young University

in partial fulfillment of the requirements for the degree of

Master of Science

Scott L. Thomson, Chair Mark B. Colton Nathan Crane

Department of Mechanical Engineering

Brigham Young University

Copyright © 2022 Clayton Adam Young

All Rights Reserved

Page 3: Multi-Material 3D-Printed Silicone Vocal Fold Models

ABSTRACT

Multi-Material 3D-Printed Silicone Vocal Fold Models

Clayton Adam Young Department of Mechanical Engineering, BYU

Master of Science

Self-oscillating synthetic vocal fold (VF) models are often used to study human voice production. In this thesis, a method for fabricating multi-layer self-oscillating synthetic VF models using silicone 3D printing is presented. Multi-material 3D printing enables faster fabrication times with more complex geometries than traditional casting methods and builds a foundation for producing VF models with potentially more life-like geometries, materials, and vibratory characteristics.

The printing method in this study used a custom dual extruder and slicing software to

print UV-curable liquid silicone into a gel-like support matrix. The extruder was fabricated using high-torque stepper motors with high resolution leadscrews for precise extrusion and retraction. The custom slicing software accounted for challenges with printing a low-viscosity uncured silicone and was capable of allowing the user to visually observe the effects of print settings on print paths before finalizing the g-code. Three validation tests were conducted to demonstrate the 3D printer’s ability to print ultra-soft silicone with the desired range of stiffness, change between materials quickly, and print a material stiffness gradient.

Two types of VF models were printed in this study, a previously-designed model with

multiple distinct layers (“EPI” model), and the same model but with a vertical stiffness gradient (VSG) in the superficial lamina propria layer. The EPI model was chosen to demonstrate the ability to 3D print a multi-layer model, and the VSG model was chosen to demonstrate the ability to print multi-material VFs with geometric and material properties that are difficult to fabricate using traditional casting methods. Sixteen VFs (i.e., eight pairs) of each model type were printed, and their vibratory responses were recorded, including onset pressure, frequency, and glottal width. A micro-CT scanner was used to evaluate the external geometric accuracy of the models. One-centimeter cubes were 3D printed and tensile tested to characterize the material properties of each set of VF models. The material and phonatory properties of both the EPI and VSG VF models were found to be comparable to human data and to previous data acquired using synthetic VF models fabricated via other methods. In this thesis, the 3D printing methodology is summarized, the setup and results of the validation and VF model tests are reported and discussed, and recommendations for future work are provided. Keywords: vocal fold models, silicone 3D printing, additive manufacturing, multi-material 3D printing, material gradient, slicer

Page 4: Multi-Material 3D-Printed Silicone Vocal Fold Models

ACKNOWLEDGEMENTS

First, I am grateful for the members of my thesis committee, Dr. Crane, Dr. Colton, and

Dr. Thomson for their support through my graduate work. I would especially like to thank Dr.

Thomson for allowing me to work in his research lab these past five years throughout my

undergraduate and graduate work. His mentorship and counsel in academia and in life have been

priceless. His dedication, integrity, insight, and attention to detail do not go unnoticed.

I would like to acknowledge the friendship and support of current and past lab

colleagues. I am grateful for Ryan Romero, whom I started this journey with and who laid the

foundation of this work. I am indebted to Taylor Greenwood and Serah Hatch for their

meticulous pursuit of high-quality work and constant refinement of our current research

principles and processes. MeiLi O’Bannon deserves recognition for her ability to grasp concepts

quickly, perform quality research, and be a constant sound board. I am grateful for the friendship

of Cooper Thacker and his helpful insight into all things visual for this work. I am thankful to

Adam Bilodeau and his passion for FEA and his subsequent help in developing the FEA models

for this work. I am grateful for Joseph Seamons and his help in work with the supercomputer.

I am grateful for my family. My wife, Ashley, has been a constant support throughout my

education and research and I am grateful for her sacrifice as well as her genuine interest and

desire to understand my work. I am also grateful for my mom and dad and their example of

continued education, as well as my brother, Austin, who sparked my passion for mechanical

engineering.

Lastly, I would like to acknowledge NIH Grant R01 DC009616 for funding this research.

Page 5: Multi-Material 3D-Printed Silicone Vocal Fold Models

iv

TABLE OF CONTENTS

LIST OF TABLES ......................................................................................................................... vi LIST OF FIGURES ...................................................................................................................... vii

1 Introduction ............................................................................................................................. 1

1.1 Background and Motivation ............................................................................................. 1

1.2 Summary of Research Objectives and Contributions ...................................................... 4

1.3 Thesis Overview ............................................................................................................... 5

1.3.1 Methods (Chapter 2) ................................................................................................... 5

1.3.2 Validation (Chapter 3) ................................................................................................ 5

1.3.3 3D-Printed Vocal Fold Models (Chapter 4) ................................................................ 6

2 Methods ................................................................................................................................... 8

2.1 Introduction ...................................................................................................................... 8

2.2 3D Printing Method Overview ......................................................................................... 9

2.3 3D Printer Slicing Software ............................................................................................. 9

2.4 3D Printer Hardware ...................................................................................................... 14

2.5 3D Printing Materials ..................................................................................................... 16

2.5.1 Printed Silicone ......................................................................................................... 16

2.5.2 Support Matrix .......................................................................................................... 17

2.6 Print Process ................................................................................................................... 17

2.7 Summary and Conclusions ............................................................................................. 18

3 Validation .............................................................................................................................. 19

3.1 Introduction .................................................................................................................... 19

3.2 Range of Material Stiffness ............................................................................................ 19

3.3 Material Changes ............................................................................................................ 22

3.4 Material Gradient ........................................................................................................... 24

3.5 Summary and Conclusions ............................................................................................. 33

4 3D-Printed Vocal Fold Models.............................................................................................. 34

4.1 Introduction .................................................................................................................... 34

4.2 Vocal Fold Model Design and Printing.......................................................................... 34

4.3 Vocal Fold Model Geometry Results ............................................................................. 38

4.4 Vocal Fold Model Material Properties ........................................................................... 39

4.5 Vocal Fold Model Vibration Testing ............................................................................. 40

Page 6: Multi-Material 3D-Printed Silicone Vocal Fold Models

v

4.6 Summary and Conclusions ............................................................................................. 46

5 Conclusions ........................................................................................................................... 48

5.1 Motivation ...................................................................................................................... 48

5.2 Methods (Chapter 2) ....................................................................................................... 48

5.2.1 Suggested Future Work ............................................................................................. 49

5.3 Validation (Chapter 3) .................................................................................................... 51

5.3.1 Suggested Future Work ............................................................................................. 52

5.4 3D-Printed Vocal Fold Models (Chapter 4) ................................................................... 53

5.4.1 Suggested Future Work ............................................................................................. 54

References ..................................................................................................................................... 55

Appendix A. Cuboid Dimension Error Calculations .............................................................. 59

Appendix B. Drawings ........................................................................................................... 61

Appendix C. ANSYS ADPL Code ........................................................................................ 74

Appendix D. Matlab Code ...................................................................................................... 80

D.1 Multi-Material Slicer ...................................................................................................... 80

D.1.1 Multi_Material_Slicer_v12.m ................................................................................... 80

D.1.2 GcodeViewer.mlapp ............................................................................................... 104

D.1.3 IsPointWithinLine.m ............................................................................................... 110

D.1.4 orient_stl.m ............................................................................................................. 110

D.1.5 plot_slices.m ........................................................................................................... 111

D.1.6 polyxpoly.m ............................................................................................................ 111

D.1.7 read_binary_stl_file.m ............................................................................................ 112

D.1.8 slice_stl_create_path.m ........................................................................................... 112

D.1.9 triangle_plane_intersection.m ................................................................................. 116

D.1.10 intersections.m .................................................................................................... 117

D.2 Vocal Fold Geometry Validation ................................................................................. 123

D.2.1 VF_Geometry_Validation_V4.m............................................................................ 123

D.3 Kymograph Image Processing ..................................................................................... 129

D.3.1 VKG.m .................................................................................................................... 129

Page 7: Multi-Material 3D-Printed Silicone Vocal Fold Models

vi

LIST OF TABLES

Table 3.1:Post-tuned lower and upper modulus values for the cuboid FEA models. The initial (pre-tuned) lower and upper modulus values were 1.5 and 12 kPa, respectively. ................ 30

Table 4.1: Components of synthetic VF model layers. The mixing ratios of UV Electro are denoted as (base + catalyst):(thinner) by weight. As further defined in Sec. 4.2, “SLP EPI” corresponds to the homogeneous SLP layer of the EPI model, and “SLP VSG” corresponds to the SLP layer with a vertical stiffness gradient. The ratios for the SLP VSG layer were chosen so that the design stiffness gradient would decrease linearly in the superior direction by a factor of three. The relative amounts of material deposited by extruders A and B required to achieve the desired mixing ratios are also shown. ............................................. 36

Table 4.2: Comparison of VF model layer modulus values for current multi-material 3D printed models (first three columns) with previous cast (fourth column) and embedded 3D-printed (last column) VF models. Column one lists the target tensile modulus values for this study. The values in columns two and three are the average tensile moduli of the printed cubes, with the standard deviations in parentheses. ......................................................................... 40

Table 4.3: Synthetic VF model vibration test data. The data from weeks one and two were combined and averaged, with standard deviations in parentheses. Data from previous studies included for comparison. ........................................................................................... 42

Table 4.4: Statistical P-values of two-tailed Student t-tests for all vibration testing values and VF model categories. Asterisk denotes P-value less than 0.05. .................................................. 46

Page 8: Multi-Material 3D-Printed Silicone Vocal Fold Models

vii

LIST OF FIGURES

Figure 1.1: (Left) Illustration of human larynx showing VF tissue layers (epithelium, superficial lamina propria [SLP], ligament, and body). (Right) EPI VF model with corresponding material layers. Anatomical directions are A-anterior, P-posterior, I-inferior, S-superior, M-medial, L-lateral. Adapted from Greenwood and Thomson (2021) (used with permission). . 2

Figure 1.2: Illustration of silicone 3D printing process used by Greenwood and Thomson (2021), Greenwood et al. (2021), and Romero et al. (2021). The silicone ink was first extruded into the support matrix using a blunt tip needle (left). The silicone print was then cured (middle) and removed from the support matrix and cleaned (right). Adapted from (Greenwood, 2020) (used with permission)............................................................................................................. 4

Figure 2.1: Print order for sections of a multi-material layer. Each color represents a different material. (a) All of one material is printed before switching to the next material. (b) The layer is printed from left to right continuously to minimize travel movement. ..................... 11

Figure 2.2: Two infill-patterns. (a) Rectilinear pattern with 45° infill orientation applied to each material section causing the needles to turn around and create separation at each material section. (b) Rectilinear infill-pattern applied across the entire print layer creating a continuous infill-pattern with material switching at the interface of different sections. ....... 12

Figure 2.3: Image of the first five print layers of a multi-material print with the rectilinear pattern with 45° infill orientation and section turnaround as shown in Fig. 2.2a. ............................. 12

Figure 2.4: Illustration of model fabrication process. ................................................................... 13 Figure 2.5: Image of the slicing software graphical user interface showing the g-code output (left

panel), layer-by-layer animation (center panel), and extruder values (right panel). The interface allows the user to easily navigate between layers and g-code lines to verify correct g-code output. ........................................................................................................................ 14

Figure 2.6: (Left) Rendering of the custom dual extruder. Extruders A and B were angled as shown to bring the blunt tip needles as close together as possible and minimize the required needle length. (Right) Cross-section illustration of the two blunt tip needles guided through two tapered dispensing tips in series. Two tapered dispensing tips (as opposed to one) were used to improve blunt tip needle alignment........................................................................... 16

Figure 3.1: Images of cube tensile testing between −10% and +50% strain. ............................... 20 Figure 3.2: (Left) Engineering stress from 0 to 10% strain of 3D-printed UV Electro cubes with

mixing ratios as depicted in the legend. Three cubes were printed for each ratio. The symbols represent the tensile test data points, and the dashed lines are linear curve fits. The 95% confidence interval was calculated using twice the standard deviation. (Right) Corresponding tensile modulus values (slopes of linear curve fits) as a function of the mixing ratio of UV Electro to silicone thinner. Bar chart labels are averages, with standard deviations in parentheses. ...................................................................................................... 21

Figure 3.3: Initial and refined material functions used to calculate the mixing ratio of UV Electro and silicone thinner needed to achieve a desire tensile modulus. ......................................... 22

Figure 3.4: (Left) Illustration of squares A and B side by side. (Right) Resulting material extrusion with extruder B disabled and extruder A enabled. Dashed lines outline the path traversed by the needles with extrusion disabled. ................................................................. 23

Page 9: Multi-Material 3D-Printed Silicone Vocal Fold Models

viii

Figure 3.5: Picture of single layer prints of two adjacent 10 mm squares with extruder B disabled. Each print included a perimeter to prime the extruder before printing. Prints I-IV had retraction values of 0.11, 0.14, 0.17, 0.20, 0.23, and 0.26 mm, respectively. The grains are dye that has not mixed homogeneously with the silicone. .............................................. 24

Figure 3.6: Illustration of discrete and continuous material gradients as the number of sections, n, approaches infinity. The inner sections of the discrete gradients are the mixed ratios of the dual extruders. ....................................................................................................................... 25

Figure 3.7: Illustrations and images from different views of the printed cuboids with n = 11 and 45° infill orientation (left), n = 2 and 45° infill orientation (center), and n = 2 and 90° infill orientation (right). Cuboids were printed in the orientation as shown in the perspective view, with the top face being printed as the last layer. Dimensions are given with average error shown in parentheses. The measurement method is descibed in detail in Appendix A. ....... 26

Figure 3.8: Illustration of compression testing of cuboids with n = 2 (lower left) and n = 11 (upper right) material sections. The black dots represent the 25 testing locations. ............... 27

Figure 3.9: Force vs. displacement data from the compression testing of the n = 11 (left) and n = 11 (right) cuboids with 45° infill orientation. Only 9 of the 25 experiments are shown for clarity. Similar results were found with the n = 2 cuboid with 90º infill orientation. ........... 27

Figure 3.10: (Left) Perspective view of the meshed n = 2 cuboid. Refined circular mesh area is located where the indenter is plunged into the cuboid in this instance. (Right) Perspective view of the deformed cuboid with 2 mm indentation. The same meshing and indentation procedure was followed the for the n = 11 cuboid. ............................................................... 29

Figure 3.11: Pre-tuned (left) and post-tuned (right) stiffness vs. distance data from experimental and FEA models. (Top) Cuboid with n = 11, 45° infill orientation. (Middle) n = 2, 45° infill orienation. (Bottom) n = 2, 90º infill orientation. .................................................................. 31

Figure 3.12: Stiffness vs. distance data from experimental and FEA models. (Left) Cuboid with n = 11, 45° infill orientation. (Middle) n = 2, 45° infill orientation. (Right) n = 2, 90° infill orientation. The clear to blue regions in Fig. 3.7 correspond to 0 to 33 mm, respectively. .. 32

Figure 4.1: (Top) Print paths of EPI (left) and VSG (right) VF models, with grayscale denoting material stiffness. The material gradient of the VSG VF model can be observed in the SLP layer. (Bottom) Dimensions (mm) of VF models. The 12 vertical slices in the SLP layer only existed in the VSG model. The VF model was 17 mm long in the anterior-posterior (out of page) direction. .......................................................................................................... 35

Figure 4.2: (A, B, C) 3D-printed EPI model with red and blue dye corresponding to the body and SLP layers respectively (no epithelial layer). About 2 mm of the anterior and posterior ends of the VF have been cut away to better image the layers. Scale bar is approximately 5 mm. (D) A different 3D-printed VF model glued in mount, with fiber inserted, and inclined for pouring of epithelial layer. Assuming the inferior, medial, and anterior anatomical directions correspond to positive x-, y-, and z-axes, respectively, the VF models were printed with a z-up orientation (i.e., in the anterior-posterior direction). The VF models were rotated around the z-axis −40° to orient the medial-inferior surface with the rectilinear infill-pattern to achieve a better surface finish. .............................................................................................. 37

Figure 4.3: (Left) Micro-CT scan of mounted EPI VF model. The posterior side of the VF mount was not segmented to provide a better view of the VF model. The white dashed line shows

Page 10: Multi-Material 3D-Printed Silicone Vocal Fold Models

ix

the inner 15 mm region of the vocal fold used to create the image on the right. (Right) Superimposed perimeters at over 200 sections (black) with design perimeter (solid red) and ±0.5 mm offset (dashed red) for reference. The red perimeter was defined using the same scale as the black perimeter, but positioned by minimizing the average error. ..................... 39

Figure 4.4: Onset pressure, frequency, and maximum glottal width for all EPI and VSG VF models in non-tension (top) and tension (bottom) from weeks one and two. Labels A, B, C, and D denote results from VF models that are shown in Fig. 4.5. ........................................ 43

Figure 4.5: Kymographs at 20% above onset pressure for EPI and VSG models in tension and non-tension for weeks one and two. Labels A, B, C, and D correspond to the VF models labeled in Fig. 4.4. ................................................................................................................. 45

Figure A.1: Three image views of a cuboid illustrating how 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿, 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿, 𝑊𝑊𝐿𝐿𝐿𝐿𝐿𝐿, 𝑊𝑊𝐿𝐿𝐿𝐿𝐿𝐿, 𝐻𝐻𝐿𝐿𝐿𝐿𝐿𝐿 and 𝐻𝐻𝐿𝐿𝐿𝐿𝐿𝐿 of each cuboid were measured. Only length and height measurements are shown for clarity. 𝑊𝑊𝐿𝐿𝐿𝐿𝐿𝐿, 𝑊𝑊𝐿𝐿𝐿𝐿𝐿𝐿, 𝐻𝐻𝐿𝐿𝐿𝐿𝐿𝐿 and 𝐻𝐻𝐿𝐿𝐿𝐿𝐿𝐿 were calculated from the top and side views, respectively. 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 and 𝐿𝐿𝐿𝐿𝐿𝐿𝐿𝐿 were calculated from both the top and side views and averaged. ................................................................................................................................ 60

Page 11: Multi-Material 3D-Printed Silicone Vocal Fold Models

1

1 INTRODUCTION

1.1 Background and Motivation

In vivo and excised human vocal folds (VFs) are used to study the biomechanics of

human voice production (e.g., Zhang, 2011, 2016; Mizuta et al., 2017). Synthetic, self-oscillating

VF models have been shown to constitute a viable alternative approach for studying various

physical aspects of phonation (e.g., vibration frequency, onset pressure, and glottal width), while

avoiding inherent limitations of in vivo and excised VF experiments such as restricted instrument

access, limited test duration, and potential test subject damage (Kniesburges et al., 2011).

Synthetic VF models are typically fabricated with distinct layers of silicone that are intended to

mimic the geometric and material properties of human VFs. For example, the VF layers

represented in the so-called “EPI” model (Murray and Thomson, 2011, 2012) include the body,

ligament, superficial lamina propria (SLP), and epithelium layers as shown in Fig. 1.1.

Advantages of synthetic VF models include convenient instrument access for data acquisition,

increased longevity over excised larynges, and the ability to parametrically vary geometric and

material properties of the model layers to study their effects on phonation.

Page 12: Multi-Material 3D-Printed Silicone Vocal Fold Models

2

Figure 1.1: (Left) Illustration of human larynx showing VF tissue layers (epithelium, superficial lamina propria [SLP], ligament, and body). (Right) EPI VF model with corresponding material layers. Anatomical directions are A-anterior, P-posterior, I-inferior, S-superior, M-medial, L-lateral. Adapted from Greenwood and Thomson (2021) (used with permission).

The most common method for fabricating synthetic VF models involves a sequential

casting process (Murray and Thomson, 2011, 2012). This fabrication process is a suitable

approach but is limited by high failure rate, relatively long fabrication time, and distinct casting

layers. Consequently, alternative fabrication processes based on silicone 3D printing have been

explored. In non-VF-related applications, single-material silicone 3D printing has been achieved

using approaches such as digital light processing (Patel et al., 2017; Zhao et al., 2019; Peng et

al., 2020; Du et al., 2021), inkjet printing (Sitthi-Amorn et al., 2015), stereolithography (Zhou et

al., 2013), embedded printing (O’Bryan et al., 2017; Roh et al., 2017), and direct ink-writing

(Valentine et al., 2017; Zheng et al., 2018; Hamidi and Tadesse, 2020; Luis et al., 2020; Guo et

al., 2021; Calais et al., 2022). Applications of single-material silicone 3D printing include soft

robotics (Patel et al., 2017; Hamidi and Tadesse, 2020; Yirmibesoglu et al., 2021; Calais et al.,

EpitheliumSLP

LigamentFiberBody

AP

L

MSI

Flow

Vocal Fold

Body

Ligament

SLP

Epithelium

Larynx

Page 13: Multi-Material 3D-Printed Silicone Vocal Fold Models

3

2022), flexible electronics (Sitthi-Amorn et al., 2015; Valentine et al., 2017; Zheng et al., 2020;

Guo et al., 2021), and biomedical implants (Roh et al., 2017; Cruz et al., 2020; Luis et al., 2020;

Unkovskiy et al., 2021).

Several of the above 3D printing approaches may be viable for fabricating single-material

synthetic VF models; however, further development is needed for multi-material VF model

fabrication. Several commercial companies (e.g., ACEO and Stratasys) and multiple research

groups (Zhou et al., 2013, 2019; Ruiz and Dhaher, 2021; Unkovskiy et al., 2021; Yirmibesoglu

et al., 2021; Calais et al., 2022) have developed multi-material silicone 3D printers, but have

either not shown the ability to print a true material gradient and/or the print material has not been

suitably soft for VF models.

In previous work, Romero et al. (2021) successfully 3D printed single-material VF

models by building upon the method of O’Bryan et al. (2017). In this process an open-source

slicing software (Cura, Ultimaker B.V., Utrecht, Netherlands) was used to import a computer-

generated model, configure print settings, and export code. The code was used to control a

custom 3D printer that created a part by extruding a UV-curable liquid silicone into a sacrificial

support matrix that held the part in place until the part was cured in a UV bed and removed from

the support matrix as shown in Fig. 1.2. This method was successfully used to print self-

oscillating VF models; however, small voids of uncured support matrix remained inside the VF

models. To overcome this limitation, Greenwood et al. (2021) developed a silicone oil-based

support matrix that cured in the immediate vicinity of the printed silicone to create solid, void-

less, single-layer VF models. Greenwood and Thomson (2021) developed a hybrid 3D

printing/casting process to fabricate multi-material VF models. The process used a VF-shaped

mold filled with a curable support matrix. Additional VF layers with different silicone stiffnesses

Page 14: Multi-Material 3D-Printed Silicone Vocal Fold Models

4

were sequentially 3D printed into the support matrix before it cured. This latter multi-material

3D-printed VF model concept offers a potential alternative to traditional casting by allowing the

internal geometry of the VF model to utilize the benefits of 3D printing. For example, material

and geometric properties of the internal printed layers can be rapidly changed to create different

VF models. However, the outermost geometry is still defined by a mold which creates limitations

that are common to casting, including difficulties in demolding resulting in a high failure rate

(due to the extremely soft silicone) and a specific outer geometry which can only be changed by

fabricating a new mold.

Figure 1.2: Illustration of silicone 3D printing process used by Greenwood and Thomson (2021), Greenwood et al. (2021), and Romero et al. (2021). The silicone ink was first extruded into the support matrix using a blunt tip needle (left). The silicone print was then cured (middle) and removed from the support matrix and cleaned (right). Adapted from (Greenwood, 2020) (used with permission).

1.2 Summary of Research Objectives and Contributions

The purpose of this research was to build on the silicone 3D printing techniques of

Greenwood and Thomson (2021) and Romero et al. (2021) by creating a multi-material silicone

3D printing process capable of printing multi-layer VF models. This was accomplished by

developing a slicing software, retrofitting an existing 3-axis CNC mill with a custom dual

Print Cure Remove& Clean

SupportMatrix

NeedleSiliconeInk Container

Page 15: Multi-Material 3D-Printed Silicone Vocal Fold Models

5

extruder, printing multi-material VF models, and experimentally characterizing the flow-induced

vibratory responses of the VF models. The primary contributions of this thesis research include:

• A method for slicing and printing multi-material, ultra-soft silicone prints. While the

initial application has been for synthetic VF models, the possibility of applications in and

beyond the biomedical industry is promising.

• A procedure for printing multi-material synthetic silicone VF models. It is envisioned

that this method will be further developed by researchers to improve methods for

fabricating increasingly life-like synthetic VF models.

1.3 Thesis Overview

1.3.1 Methods (Chapter 2)

Limitations of existing slicing software methods for multi-material 3D printing include

restrictions on material changes and infill-patterns that introduce unwanted flow during nozzle

movement. As a result, a custom slicing software was developed to reduce unwanted flow.

Additional print settings and visualization tools were also included in the custom slicing software

for user interaction. The print process involved using a 3-axis CNC desktop milling machine

utilized by Romero et al. (2021) with a retrofit custom dual extruder containing the UV curable

silicone. To print a part, the uncured silicone was printed into a gel-like support matrix

(Greenwood, 2020) which held the part in place until it could be cured in a UV bed. After curing,

the part was removed from the support matrix and cleaned.

1.3.2 Validation (Chapter 3)

Three tests were implemented to validate the multi-material 3D printer’s ability to (1)

print the desired range of stiffness, (2) change between materials quickly, and (3) print a material

Page 16: Multi-Material 3D-Printed Silicone Vocal Fold Models

6

gradient. To determine the printable range of stiffnesses of the 3D printer, one-centimeter

silicone cubes were printed that spanned ratios of base to silicone thinner from 1:1 to 1:12 (a

higher ratio of silicone thinner resulted in silicone with a softer material stiffness). The cubes

were tensile tested to determine the material properties and quantify the printable range of

material stiffness. To validate the ability to change between materials, a single print layer with

two materials was printed. The prints were imaged and subjectively observed to refine the ideal

print parameters and ultimately show the ability to change between two materials. To validate

the ability to print a material gradient, three 10×10×33 mm silicone cuboids with material

gradients were printed. The cuboids were imaged to visualize the material gradients using color.

Additionally, the cuboids were compression tested to quantify the stiffness variation, and a finite

element analysis was performed for comparison. The results of these three validation tests

demonstrated the ability to produce multi-layer silicone prints with material gradients.

1.3.3 3D-Printed Vocal Fold Models (Chapter 4)

Two types of VF models were printed for this thesis research. The first was the so-called

EPI model (Kniesburges et al., 2011; Murray and Thomson, 2011, 2012; Greenwood and

Thomson, 2021; see Fig. 1.1), selected to demonstrate the ability to print multi-layer VF models

that are common in current voice research activities. The second model was based on the EPI

model, but with a vertical stiffness gradient in the SLP layer. This model was selected to

demonstrate the ability to print multi-material VF models with a material gradient such as that

which may exist in the human VFs and which would otherwise be difficult to fabricate using

traditional casting methods. To validate the outer geometry, a micro-CT scan of a VF model was

acquired. The internal geometry was qualitatively observed by imaging sectioned VF models

Page 17: Multi-Material 3D-Printed Silicone Vocal Fold Models

7

using a DSLR camera. Material properties of the VF models were quantified by printing and

testing one-centimeter cubes of corresponding VF layer materials. The VF models were self-

oscillated, and flow-induced vibration data were recorded, including frequency, onset pressure,

and maximum glottal width. Both VF models were found to exhibit vibration characteristics that

are comparable to those of other synthetic VF models in the literature and to human VFs. The

multi-material 3D printing method provides the potential to create more complex geometry,

simplify the process of changing geometric material properties, and reduce manufacturing time

for synthetic VF models.

Page 18: Multi-Material 3D-Printed Silicone Vocal Fold Models

8

2 METHODS

2.1 Introduction

3D printing is rapidly growing in applications as more methods and materials are

explored. 3D printing methods include binder jetting, power bed fusion, direct energy deposition,

vat photopolymerization, sheet lamination, material jetting, and fused filament fabrication (FFF).

FFF printing with thermoplastics is the most-widely used 3D printing method. Because

thermoplastics have a relatively low melting temperature, they can be heated and extruded easily

and quickly re-harden to build a print layer-by-layer.

Other materials, including silicones, for FFF printing are continually being explored.

Favorable characteristics of silicones include low thermal conductivity, low toxicity, thermal

stability, optical transparency, electric resistivity, low chemical reactivity, and water resistance

(Moretto et al., 2000). However, the use of silicone as a material for FFF printing is difficult

because of its low uncured viscosity and long curing time. While silicone curing time can be

reduced using heat or UV light, most silicones’ cure times are still not adequate for traditional

FFF printing methods. To address this, O’Bryan et al. (2017) developed a printing method that

uses a gel-like support matrix to hold the silicone print in place until it can be cured (Fig. 1.2).

This process was further refined by Greenwood et al. (2021) and Romero et al. (2021) for single-

material prints.

Page 19: Multi-Material 3D-Printed Silicone Vocal Fold Models

9

The research described in this chapter builds on that of Greenwood et al. (2021) and

Romero et al. (2021) by adding the capability to print multi-material silicone parts. To

accomplish this, custom slicing software was developed, and additional hardware, including a

second extruder, was retrofitted onto the 3D printer. In the following sections, the 3D printing

method is described, the hardware and software specifics are detailed, and the print materials and

support matrix preparation steps are provided.

2.2 3D Printing Method Overview

To achieve multi-material silicone 3D printing, two independently-controlled extruders

were used, here denoted extruders A and B. Extruders A and B contained uncured liquid

silicones that, if allowed to cure, would each cure to a different stiffness. The relative extrusion

amounts were independently varied during printing so that the combined deposited material

contained different ratios of A and B, and hence a cured stiffness between that of A and B. The

deposited material was extruded into the gel-like silicone oil-based support matrix developed by

Greenwood et al. (2021). The print was cured, removed from the support matrix, and cleaned.

Using this method, prints with material variations could be formed. Further details are outlined in

the following sections.

2.3 3D Printer Slicing Software

The software program used for FFF 3D printing is traditionally called a slicer. A

computer-generated model of the desired print is imported into the slicer and a g-code file

containing a series of translation and extrusion commands is exported for 3D printer control.

Most FFF printing slicing software settings are specific to printing with thermoplastics; however,

Greenwood et al. (2021) and Romero et al. (2021) successfully refined the settings of an open

Page 20: Multi-Material 3D-Printed Silicone Vocal Fold Models

10

source slicer (Cura) to print with silicone. Several slicers can also “slice” multi-part CAD models

and assign different colors to different parts. While this multi-color software function can be

implemented for multi-material models, in practice the results have been poor when applied to

multi-material silicone 3D printing (Greenwood, 2020). The limitations of current FFF slicing

software and the advantages of a custom multi-material 3D printing slicer developed for this

study are discussed below.

The gel-like support matrix used in this study has thixotropic properties that allow the

support matrix to hold the print in place; however, during printing, deposited silicone is

susceptible to flow caused by the extrusion needles traversing through the support matrix. This

flow can cause unwanted deformities in the final print. It is desirable, therefore, for the slicing

software to minimize needle movement in the support matrix, especially movement across

previously-printed layers. As discussed in detail below, two examples of unnecessary needle

movement that may cause unwanted flow are material changes and 3D-print infill-patterns.

Needle movement during material changes is the first example of unwanted flow. In

standard multi-color FFF 3D printing, the 3D printer must be able to switch from one material to

another. This is often done by either retracting the current material from the extruder and then

priming the new material in the same extruder using a purge tower, or by switching between

multiple extruders with different materials. Material changes in standard multi-color FFF 3D

printing are time consuming, and as a result, slicers are typically designed to minimize the

number of material changes. While this may save time, it requires a significant amount of travel

movement where no material is being deposited. Because FFF 3D printing with thermoplastics is

not susceptible to unwanted flow, the additional travel movement required to minimize material

changes is inconsequential. However, for silicone 3D printing, the unwanted flow caused by

Page 21: Multi-Material 3D-Printed Silicone Vocal Fold Models

11

excess travel due to material changes can cause unwanted deformities in the final print. Two

infill-pattern approaches are shown in Fig. 2.1. Figure 2.1a illustrates an approach in which the

extruder prints all of one material in a layer before switching to the next material, whereas Fig.

2.1b shows the extruder moving from left to right while changing materials between each section

to minimize travel.

Figure 2.1: Print order for sections of a multi-material layer. Each color represents a different material. (a) All of one material is printed before switching to the next material. (b) The layer is printed from left to right continuously to minimize travel movement.

Excess needle movement caused by infill-patterns is the second example of unwanted

flow. Standard 3D-printing slicing software typically offers a variety of print infill-patterns that

can be selected. For single-material 3D-printed synthetic vocal fold models, the simple

rectilinear pattern with 45° infill-orientation, as shown in Fig. 2.1, was found to yield the best

printing results (Romero et al., 2021); however, these same results did not translate well to multi-

material 3D printing (Greenwood, 2020). In the latter case, the infill-pattern is applied to each

material section as shown in Fig. 2.2a. This causes the needles to turn around at each material

section interface, resulting in uncured support matrix becoming trapped between material

sections as shown in Fig. 2.3. This leads to separation between sections. To enable better

adhesion between material sections, a continuous infill-pattern across sections could be utilized

as shown in Fig. 2.2b. While this continuous infill-pattern relies heavily on accurate material

1 2 31 23

(a) (b)

Page 22: Multi-Material 3D-Printed Silicone Vocal Fold Models

12

changes when crossing each material section interface, it could decrease unwanted flow due to

excess travel movement and achieve better adhesion between sections.

Figure 2.2: Two infill-patterns. (a) Rectilinear pattern with 45° infill orientation applied to each material section causing the needles to turn around and create separation at each material section. (b) Rectilinear infill-pattern applied across the entire print layer creating a continuous infill-pattern with material switching at the interface of different sections.

Figure 2.3: Image of the first five print layers of a multi-material print with the rectilinear pattern with 45° infill orientation and section turnaround as shown in Fig. 2.2a.

The custom slicing software was designed to overcome the challenges of unwanted flow.

The software optimized the print order to reduce travel movement (Fig. 2.1b) and achieve a

Section Turnaround Continuous

(a) (b)

Page 23: Multi-Material 3D-Printed Silicone Vocal Fold Models

13

continuous rectilinear infill-pattern (Fig. 2.2b). The general fabrication overview (Fig. 2.4) is

described in detail as follows. First the user created a computer-generated model, where each

part of the model corresponded to a different material property. An .stl file of each part of the

computer-generated model was imported into the custom slicing software, and the material

property of each part was assigned in units of kPa. The slicing software then converted the

material properties for each part from kPa to a ratio of UV silicone [(base + catalyst):(thinner)]

using the material model outlined in Sec. 3.2. Using the UV silicone ratio in each extruder, the

slicing software then determined the ratio of extruder A and extruder B that was needed for each

part of the print.

Figure 2.4: Illustration of model fabrication process.

The slicing software then “sliced” the print layer-by-layer creating x-, y-, and z-

translation g-code commands for the 3D printer. The layer height was equal to the needle inner

diameter (0.21 mm), and the path width of the continuous rectilinear print pattern was equal to a

multiple of the needle inner diameter and the percent infill (60%). Other settings that were

implemented during the slicing phase of the software include print speed, extruder retraction

distance, infill angle, syringe diameter, needle outer diameter, and needle offset.

After the print was “sliced,” the part in which each path was located was determined, and

the corresponding ratio of extruder A and extruder B was assigned. This ratio was used to

calculate the A- and B-extruder g-code commands. Additionally, each path was checked to see if

Page 24: Multi-Material 3D-Printed Silicone Vocal Fold Models

14

a material change was required, and necessary g-code was added accordingly. Finally, the g-code

for each layer was compiled and exported for the entire print.

The software provided a layer-by-layer animation of the print as shown in Fig. 2.5. The

animation rendering was color-coded relative to material stiffness for visualization and

validation, allowing the user to quickly iterate through print settings and observe their effects

before finalizing the g-code. The MATLAB script for the multi-material slicing software is

included in Appendix D.1.

Figure 2.5: Image of the slicing software graphical user interface showing the g-code output (left panel), layer-by-layer animation (center panel), and extruder values (right panel). The interface allows the user to easily navigate between layers and g-code lines to verify correct g-code output.

2.4 3D Printer Hardware

The desktop 7×12 inch 3-axis linear CNC milling machine (Zen Tool Works, Concord,

CA) used by Greenwood et al. (2021) was retrofitted with a custom dual extruder (Fig. 2.6). The

dual extruder was fitted with two high-torque NEMA 17 motors coupled with high-resolution

leadscrews (AMETEK Haydon Kerk Pittman 43J4U-2.33, Waterbury, CT) to control the flow of

Input .mat File

X Y A B Rate-A Rate-B G0

5126

5127

5128

5129

5130

5131

5132

5133

5134

5135

5136

5137

5138

5139

5140

5141

5142

5143

5144

5145

5146

5147

5148

5149

5150

515151515152

5153

5154

0.9361 8.4730 1.3065 0.5403 1.0000 0

0.9361 4.7680 1.3081 0.5403 1.0000 0

0.9361 4.7680 1.3081 0.7403 1.0000 0

0.9361 3.9383 1.3081 0.7406 0.1499 0.8501

0.9361 3.1086 1.3081 0.7409 0.0749 0.9251

0.9361 3.1086 1.0481 0.7409 0.0749 0.9251

0.9361 2.2789 1.0481 0.7413 0 1.0000

0.5861 2.6960 1.0481 0.7415 0 1.0000

0.5861 3.5257 1.0481 0.7418 0 1.0000

0.5861 3.5257 1.3081 0.7418 0 1.0000

0.5861 4.3554 1.3082 0.7422 0.0749 0.9251

0.5861 5.1851 1.3082 0.7424 0.1499 0.8501

0.5861 5.1851 1.3082 0.5424 0.1499 0.8501

0.5861 8.1793 1.3094 0.5424 1.0000 0

0.2361 7.8856 1.3096 0.5424 1.0000 0

0.2361 5.6023 1.3106 0.5424 1.0000 0

0.2361 5.6023 1.3106 0.7424 1.0000 0

0.2361 4.7725 1.3106 0.7427 0.1499 0.8501

0.2361 3.9428 1.3107 0.7431 0.0749 0.9251

0.2361 3.9428 1.0507 0.7431 0.0749 0.9251

0.2361 3.1131 1.0507 0.7434 0 1.0000

-0.1139 3.5302 1.0507 0.7436 0 1.0000

-0.1139 4.3599 1.0507 0.7440 0 1.0000

-0.1139 4.3599 1.3107 0.7440 0 1.0000

-0.1139 5.1896 1.3107 0.7443 0.0749 0.9251

-0.1139 6.0194 1.3107 0.7446 0.1499 0.8501

-0.1139 6.0194 1.3107 0.5446 0.1499 0.8501

-0.1139 7.5919 1.3114 0.5446 1.0000 0

0 4639 7 2982 1 3116 0 5446 1 0000 0 Layer 19 Line 5129

Page 25: Multi-Material 3D-Printed Silicone Vocal Fold Models

15

silicone out of two 5 mL glass syringes (Fortuna Reusable Glass Syringe Luer Tip Model #

7.102-33, Italy). Glass syringes were chosen as opposed to plastic to reduce pressure-induced

mechanical capacitance in the syringes. Two 1.5-inch long, 27-gauge blunt tip needles (Howard

Electronics Blunt Tip, Grand Island, NY) were attached to the syringes. The needle tips were

guided adjacent to one another through two 27-gauge plastic tapered dispensing tips (CML

Supply, Lexington, KY) cut to length as shown in Fig. 2.6 and detailed in Appendix B. The

offset between the needle centers was 0.4 mm and was accounted for in the slicing software.

Adequate curing of the final prints demonstrated that materials from both syringes were suitably

combined when deposited; however, further research is needed to characterize mixing of the two

materials during printing and to study the effect of the needle offset. The printer hardware was

controlled using Mach3 (Livermore Falls, ME) using g-code that was generated by the custom

slicer outlined in Sec. 2.3.

The print resolution is dependent on the CNC resolution (0.0254 mm), the extruder

stepper motor resolution (0.0015 mm), and the 27-gauge blunt tip needle inner diameter (0.21

mm). The largest of these dimensions is the needle inner diameter. With the print infill set to

100%, the print resolution would be 0.21 mm. However, the ideal print infill is 60% as

demonstrated by Greenwood (2020); therefore, the actual print resolution is nominally 0.35 mm

(needle inner diameter divided by print infill).

Page 26: Multi-Material 3D-Printed Silicone Vocal Fold Models

16

Figure 2.6: (Left) Rendering of the custom dual extruder. Extruders A and B were angled as shown to bring the blunt tip needles as close together as possible and minimize the required needle length. (Right) Cross-section illustration of the two blunt tip needles guided through two tapered dispensing tips in series. Two tapered dispensing tips (as opposed to one) were used to improve blunt tip needle alignment.

2.5 3D Printing Materials

2.5.1 Printed Silicone

The printed material was the UV-curable silicone elastomer Silopren UV Electro 225

(hereafter referred to as UV Electro; Momentive Performance Materials, Inc., Waterford, NY).

Different ratios of Silicone Thinner (Smooth-On, Inc., Macungie, PA) were mixed with UV

Electro to achieve the desired material stiffness characteristics as described in Sec. 3.2. This

follows the established practice of fabricating cast VF models where adding higher ratios of

thinner results in a lower cured stiffness. The silicone was prepared by first pouring one gram of

Page 27: Multi-Material 3D-Printed Silicone Vocal Fold Models

17

thinner into the mixing container to ensure that the more viscous materials subsequently added to

the mixture would not be as susceptible to sticking to the bottom of the container. Next, the base

and catalyst of UV Electro with a 1:20 ratio (base:catalyst by weight) were added. The remaining

thinner was then added. For visual analysis, pigment (Silc Pig, Smooth-On, Inc., Macungie, PA)

was occasionally added to provide a color gradient when printing. These components were then

mixed for two minutes at 2350 RPM using a planetary centrifugal mixer (DAC 150.1 FVZ-K

SpeedMixer, FlackTek, Landrum, SC). The mixture was poured into a glass syringe and

degassed as needed.

2.5.2 Support Matrix

The support matrix into which the silicone was printed consisted of 97 parts silicone

thinner and three parts fumed silica (Ure-Fil 9, Smooth-On, Inc., Macungie, PA) by weight. The

two components were mixed for two minutes at 2350 RPM in the planetary mixer, de-gassed for

five minutes, and poured into 1 oz. plastic disposable cups for printing.

2.6 Print Process

The mounted needle tips were manually positioned into the support matrix and the print

was started. Once completed, the cup containing the uncured print and support matrix was placed

into a UV curing bed (Dreve Polylux 2000, Unna, Germany) for five minutes. The cured print

was then removed from the support matrix, cleaned lightly with a paper towel, agitated in an

acetone bath for about 10 seconds, and blotted with a paper towel to remove excess support

matrix.

Page 28: Multi-Material 3D-Printed Silicone Vocal Fold Models

18

2.7 Summary and Conclusions

Limitations of existing slicing software methods for multi-material 3D printing include

restrictions on material changes and infill-patterns that introduce unwanted flow during nozzle

movement. As a result, a custom slicing software was developed. Additional print settings and

visualization tools were also included in the custom slicing software for user interaction. The

print process involved using a 3-axis CNC desktop milling machine with a retrofit custom dual

extruder containing different ratios of UV-curable silicone. To print a part, the uncured silicone

was printed into a gel-like support matrix which held the part in place until it could be UV cured.

Page 29: Multi-Material 3D-Printed Silicone Vocal Fold Models

19

3 VALIDATION

3.1 Introduction

Three tests were performed to validate the ability to 3D print multi-material VF models.

The first test demonstrated the ability to print a desired stiffness range that is suitable for

synthetic VF modeling, the second demonstrated the ability to change between materials quickly

as required when printing multi-layer VF models, and the third demonstrated the ability to print a

material gradient such as that which may be found in the interior of the human VFs. The

following sections in this chapter further describe each test procedure and subsequent results.

3.2 Range of Material Stiffness

For the first test, UV Electro with a 1:2 [(base + catalyst):(thinner)] ratio by weight was

placed in extruder A, and UV electro with a 1:12 ratio was placed in extruder B. A computer-

generated model of a 10 mm cube was imported into the custom multi-material slicing software,

and the model was assigned a specific ratio of 1:N, where N is the desired ratio of thinner in the

cube. Triplicates of six cubes with ratios of 1:2 (i.e., printing using only extruder A), 1:4, 1:6,

1:8, 1:10, and 1:12 (i.e., printing using only extruder B) were printed (18 cubes total). The print

time per cube was approximately 11 minutes.

Each printed cube was glued to acrylic mounting plates using Sil-Poxy (Smooth-On, Inc.,

Macungie, PA) and mounted to an Instron 3342 Universal Testing System (Instron, Norwood,

MA) equipped with a 10 N load cell (2519-10N, Instron, Norwood, MA) (see Fig. 3.1). The

Page 30: Multi-Material 3D-Printed Silicone Vocal Fold Models

20

tensile test began with ten preloading cycles from −10% to +25% strain at a rate of 100 mm/min

and finished with a final cycle from −10% to +10% strain at 30 mm/min. The force-displacement

data were recorded at strain increments of 2.5% and the tensile modulus for each cube was

calculated using a linear fit from 0 to 10% strain of the final cycle data.

Figure 3.1: Images of cube tensile testing between −10% and +50% strain.

The results of the cube stiffness tests are shown in Fig. 3.2. The stress-strain data are

linear and show the capability to print UV Electro silicone within a tensile elasticity modulus

range of 1.11 kPa to 27.1 kPa. By way of comparison, the layer modulus values of the synthetic

EPI VF model of Murray and Thomson (2011), excluding the epithelium layer, were 0.2, 1.6,

and 11.8 kPa for the SLP, ligament, and body layers respectively. Only the 0.2 kPa SLP layer

does not fall within the present range. Printing silicone with a modulus of 0.2 kPa would require

large quantities of thinner for which curing becomes unpredictable. For comparison, other VF

model studies report SLP and/or cover layer stiffness values of 0.91 kPa (Greenwood and

Thomson, 2021), 1.5 kPa and 2.94 kPa (Pickup and Thomson, 2010), 4.1 kPa (Drechsel and

Thomson, 2008), and 2 kPa (Riede et al., 2008). Regarding the upper end of the stiffness range, a

UV Electro to thinner ratio of 1:1 was also attempted but was unsuccessful due to the high

viscosity of the mixture.

Page 31: Multi-Material 3D-Printed Silicone Vocal Fold Models

21

Figure 3.2: (Left) Engineering stress from 0 to 10% strain of 3D-printed UV Electro cubes with mixing ratios as depicted in the legend. Three cubes were printed for each ratio. The symbols represent the tensile test data points, and the dashed lines are linear curve fits. The 95% confidence interval was calculated using twice the standard deviation. (Right) Corresponding tensile modulus values (slopes of linear curve fits) as a function of the mixing ratio of UV Electro to silicone thinner. Bar chart labels are averages, with standard deviations in parentheses.

Using the modulus vs. mixing ratio data shown in Fig. 3.2, a material function was

created that quantified the relationship between measured tensile modulus and mixing ratio using

linear interpolation. Additional tensile modulus tests were subsequently completed during

preliminary VF model experiments. With each subsequent test, the initial material function was

updated to continue to refine the relationship between the tensile modulus and the mixing ratio of

UV Electro and thinner as shown in Fig. 3.3. The refined material function was implemented into

the slicing software and used in the remaining 3D prints of the thesis to assign material stiffness

as listed in Table 4.1.

0 0.025 0.05 0.075 0.1Engineering Strain

0

0.5

1

1.5

2

2.5

3En

gine

erin

g St

ress

(kPa

)

ConfidenceLinear Fit1:21:41:61:81:101:12

27.1(0.603)

7.59(0.266)

4.18(0.209) 2.13

(0.104)1.3

(0.0573)1.11

(0.0245)

1:2 1:4 1:6 1:8 1:10 1:12Mixing Ratio

0

5

10

15

20

25

30

Tens

ile M

odul

us (k

Pa)

Page 32: Multi-Material 3D-Printed Silicone Vocal Fold Models

22

Figure 3.3: Initial and refined material functions used to calculate the mixing ratio of UV Electro and silicone thinner needed to achieve a desire tensile modulus.

3.3 Material Changes

The ability to switch between two materials quickly as the needles transitioned from one

material section to another was necessary. This was accomplished via retraction of the material

in the needles (i.e., negative displacement of the syringe plunger). The following test was created

to select the optimum retraction value for each extruder and to demonstrate the ability to switch

between the two materials. A computer model was created of two distinct cubes joined together

as shown Fig. 3.4. The materials in extruders A and B were assigned to cubes A and B,

respectively; however, only one layer was printed. The single-layer cubes are here referred to as

squares A and B. Extruder B was physically disconnected such that square B was not printed.

The print was imaged to qualitatively observe geometric accuracy and the transition between

materials, in this case investigated by toggling extruder A on and off in the slicing software as

the needles traversed both squares A and B (i.e., on while in square A and off in square B). With

extruder A connected and extruder B disconnected, as the needles traversed into square B, the

effects of the retraction of extruder A could be seen by residual lines of material A in the space

0 5 10 15 20 25 30Tensile Modulus (kPa)

1:2

1:4

1:6

1:8

1:10

1:12

Mix

ing

Rat

io

InitialRefined

Page 33: Multi-Material 3D-Printed Silicone Vocal Fold Models

23

of square B. This test was also repeated with extruder A disconnected to observe extruder B

toggle on and off as the needles traversed the print; however, results are not shown in this study.

This testing procedure was used to demonstrate each extruder’s ability to switch between two

materials quickly and to determine the optimum retraction value for each extruder.

Figure 3.4: (Left) Illustration of squares A and B side by side. (Right) Resulting material extrusion with extruder B disabled and extruder A enabled. Dashed lines outline the path traversed by the needles with extrusion disabled.

The results of this test are presented in Fig. 3.5. Shown is the first layer of side-by-side

squares with extruder B disabled and retraction values for extruder A ranging from 0.11 to 0.26

mm. Print VI shows the least amount of material bleeding into the square B region caused by

over-extrusion; however, the image also indicates under-extrusion in square A. The under-

extrusion was most likely caused by over-retraction. Because a locally-curable support matrix

was used, under-extrusion was preferable to over-extrusion since the support matrix cured

between adjacent deposited lines. Therefore, retraction values of 0.26 mm and 0.20 were selected

for extruders A and B respectively to ensure the extruders’ ability to switch between two

materials quickly. The reason for needing different retraction values may have been due to

retraction values being dependent on the extruded material viscosity (presumably less retraction

being required for lower viscosity material). Further work is necessary to validate this

Programmed ShapeTop View

Single LayerTop View

DisabledExtruder

B(not printed)

A(printed)

MaterialTransitions

Page 34: Multi-Material 3D-Printed Silicone Vocal Fold Models

24

correlation, quantify the geometric resolution of the prints, and further explore the effects of

over- and under-extrusion.

Figure 3.5: Picture of single layer prints of two adjacent 10 mm squares with extruder B disabled. Each print included a perimeter to prime the extruder before printing. Prints I-IV had retraction values of 0.11, 0.14, 0.17, 0.20, 0.23, and 0.26 mm, respectively. The grains are dye that has not mixed homogeneously with the silicone.

3.4 Material Gradient

Stiffness gradients are found throughout the human body, including in the VFs (Oren et

al., 2014; Geng et al., 2016); therefore, a test was conducted to demonstrate the ability to 3D

print a material gradient. A computer model of a 10×10×33 mm rectangular prism (cuboid) was

created. The model was then sliced into n sections as shown in Fig. 3.6. In this manner, n = ∞

would approach a continuous material gradient. For this test, cuboid models with n = 2 and n =

11 were created, as illustrated in Fig. 3.7. These models were imported into the multi-material

slicing software and each section was assigned a specific material property linearly ranging from

1.5 kPa to 12 kPa. Two compounds of UV Electro:thinner with nominal stiffnesses of 1.5 kPa

and 12 kPa were mixed using ratios based on data shown in Fig. 3.2. Two different n = 2 cuboids

Page 35: Multi-Material 3D-Printed Silicone Vocal Fold Models

25

with 45° and 90° infill-pattern orientation, respectively, were printed and cured, along with the n

= 11 cuboid (45° infill orientation).

Figure 3.6: Illustration of discrete and continuous material gradients as the number of sections, n, approaches infinity. The inner sections of the discrete gradients are the mixed ratios of the dual extruders.

Images of these printed cuboids are shown in Fig. 3.7. The stiffness variations are

represented by color from clear (extruder B with 1:9.12 ratio) to blue (extruder A with 1:3.21

ratio). Material gradients are evident in all cuboids. The geometric accuracy of the prints is

acceptable, but additional work is needed to continue to improve accuracy and surface finish.

The top view of each cuboid shows ridges which match the orientation of the selected infill-

pattern angle. The size of these ridges is a function of needle size and percent infill. The

deformities in the cuboids increase near the ends of the cuboids and at the interfaces between

material sections. This is attributed to over-extrusion as the needles briefly come to a stop and

the extruder retracts in preparation for the next material. This is especially visible in the n = 11

cuboids where vertical ridges are seen on the side of the cuboid. Using the images shown in Fig.

3.7 and calipers, average errors for width, length, and height for each cuboid were calculated (the

measurement methods are described in Appendix A). The average error ranged from ±0.51 to

±1.1 mm, as shown in Fig. 3.7. In the perspective view, it appears that the clear section is smaller

Page 36: Multi-Material 3D-Printed Silicone Vocal Fold Models

26

than the blue section. While the exact reason is unknown, one possibility is the difference in

viscosity between the high viscosity clear section and the low viscosity blue sections (i.e., lower

material viscosity results in over-extrusion).

Figure 3.7: Illustrations and images from different views of the printed cuboids with n = 11 and 45° infill orientation (left), n = 2 and 45° infill orientation (center), and n = 2 and 90° infill orientation (right). Cuboids were printed in the orientation as shown in the perspective view, with the top face being printed as the last layer. Dimensions are given with average error shown in parentheses. The measurement method is descibed in detail in Appendix A.

The stiffness characteristics of the finished prints were measured using compression

testing (Instron 3342 Universal Testing System with 2519-10N 10 N load cell, Instron, Norwood,

MA). A custom indenter with a 3 mm diameter flat head (Appendix B) was mounted to the load

cell. The cuboid print was secured onto a linear traverse and manually positioned below the

indenter head as shown in Fig. 3.8. Compression tests were performed at lengthwise locations

from 0 to 33 mm in steps of 1.27 mm (25 total locations). For each test, the indenter was plunged

into the cuboid at a rate of 40 mm/min and returned at the same rate. The force-displacement

data were recorded, and the stiffness was calculated using a linear fit to the data from plunged

Page 37: Multi-Material 3D-Printed Silicone Vocal Fold Models

27

depths between 0.5 to 1.5 mm as shown in Fig. 3.9. The linear fits of the n = 11 and 45° infill

orientation, n = 2 and 45° infill orientation, and n = 2 and 90° infill orientation follow the data

closely with coefficients of determination (R2) values of 0.9987, 0.9970, and 0.9953,

respectively, showing a valid measurement of the compression stiffness.

Figure 3.8: Illustration of compression testing of cuboids with n = 2 (lower left) and n = 11 (upper right) material sections. The black dots represent the 25 testing locations.

Figure 3.9: Force vs. displacement data from the compression testing of the n = 11 (left) and n = 11 (right) cuboids with 45° infill orientation. Only 9 of the 25 experiments are shown for clarity. Similar results were found with the n = 2 cuboid with 90º infill orientation.

Indenter

10 mm

33 mm

10 mm

0.25 0.5 0.75 1 1.25 1.5 1.75Displacement (mm)

0

20

40

60

80

100

Forc

e (m

N)

ExperimentsLinear Fit

0.25 0.5 0.75 1 1.25 1.5 1.75Displacement (mm)

0

10

20

30

40

50

60

70

Forc

e (m

N)

ExperimentsLinear Fit

Page 38: Multi-Material 3D-Printed Silicone Vocal Fold Models

28

It was expected that compression testing near the cuboid edges as well as near interfaces

of material sections with different stiffnesses would affect compression results. Therefore, for

comparison and to confirm the effects of edges and material interfaces on the stiffness profiles,

finite element analysis (FEA) of each cuboid compression test was performed. An FEA model of

the 10×10×33 mm cuboid was created using ANSYS ADPL (Canonsburg, PA, see Appendix C

for code). Each material section of the cuboid was modeled using 1 mm high-order SOLID187

3D elements with a bonded boundary condition between each material section. The section

materials were modeled using a linear elastic material with a Poisson's ratio of 0.49, and the

bottom of the cuboid was fixed in all directions. After the initial meshing, the elements in a

hemisphere around the region of indentation were refined to improve the FEA results, with the

refinement increasing closer to the contact area as shown in Fig. 3.10.

The first refinement of the elements was within a 9.6 mm diameter sphere of the

compression testing location (Fig. 3.10). The second refinement was within a smaller hemisphere

with a diameter 6.4 mm. The last refinement was on the surface of the cuboid, using the same

refinement settings, to provide a high density of nodes in a circular pattern with a 3.4 mm

diameter.

The initial FEA analyses modeled the indenter as a cylinder and contact pairing with the

cuboid. An alternative approach was tested in which the indenter was modeled as a 3 mm

diameter circle inscribed on the top of the cuboid with the center being located at the desired

testing location. In both approaches, the cylinder or circle was displaced 2 mm into the cuboid

over 40 load steps (i.e., 0.05 mm penetration at each load step) and fixed in all other remaining

dimensions. The differences in initial cuboid stiffness results were found to be negligible;

Page 39: Multi-Material 3D-Printed Silicone Vocal Fold Models

29

however, the computational cost of the cylinder method was higher. Therefore, the final FEA

analyses were completed using an inscribed circle rather than a cylinder.

Figure 3.10: (Left) Perspective view of the meshed n = 2 cuboid. Refined circular mesh area is located where the indenter is plunged into the cuboid in this instance. (Right) Perspective view of the deformed cuboid with 2 mm indentation. The same meshing and indentation procedure was followed the for the n = 11 cuboid.

The initial FEA analyses were solved with nlgeom activated in ANSYS to account for

large deflections; however, above load step 17 (0.85 mm) the solution frequently became non-

convergent. Of the load steps that did solve, the cuboid stiffnesses with nlgeom activated and

deactivated for the n = 2 and n = 11 cuboids were a maximum of 3.62% and 3.83% different,

respectively, with averages of 1.44% and 1.35%, respectively. With the relatively small average

differences between nlgeom activated and deactivated, as well as the linearity of the

experimental force-displacement data shown in Fig. 3.9, the material for the FEA model was

assumed to be linear-elastic and the final FEA analyses were completed with nlgeom deactivated.

For the initial FEA analyses, each sections’ material model was assigned a uniform

modulus value that corresponded to the target modulus values of the printed cuboids (i.e., 1.5

0 .22 .44 .67 .89 1.11 1.33 1.56 1.78 2

Millimeters

Page 40: Multi-Material 3D-Printed Silicone Vocal Fold Models

30

kPa and 12 kPa for the two sections of the n = 2 cuboid, and 1.50 kPa, 2.55 kPa, 3.60 kPa, 4.65

kPa, 5.70 kPa, 6.75 kPa, 7.80 kPa, 8.85 kPa, 9.90 kPa, 10.95 kPa, and 12 kPa for the 11 sections

of the n = 11 cuboid). The FEA stiffness results were then analyzed and compared to the

experimental results. The FEA modulus values were then tuned to adjust the stiffness results to

more closely match the experimental compression data and the FEA analyses were repeated. The

modulus values were tuned by scaling the initial FEA modulus input values by the ratio of the

desired FEA stiffness over the actual FEA stiffness at points near the ends of the cuboids. For the

n = 11 cuboid, the 4th and 22nd data points were selected, and for the n = 2 cuboids, the 4th and

18th data points were selected. The primary purpose behind performing FEA analyses was to

validate the trends (i.e., stiffness gradients, edge effects, and material interfaces) that were

present in the experimental data, therefore, stiffness tuning was deemed to be an acceptable

approach to better compare the trends. Final FEA modulus values are listed in Table 3.1, and a

comparison between pre- and post-tuned stiffness plots are shown in Fig. 3.11.

Table 3.1:Post-tuned lower and upper modulus values for the cuboid FEA models. The initial (pre-tuned) lower and upper modulus values were 1.5 and 12 kPa, respectively.

Cuboid Model Lower Modulus (kPa)

Upper Modulus (kPa)

n = 11, 45° 2.24 13.4

n = 2, 45° 1.80 8.75

n = 2, 90° 1.26 7.41

Page 41: Multi-Material 3D-Printed Silicone Vocal Fold Models

31

Figure 3.11: Pre-tuned (left) and post-tuned (right) stiffness vs. distance data from experimental and FEA models. (Top) Cuboid with n = 11, 45° infill orientation. (Middle) n = 2, 45° infill orienation. (Bottom) n = 2, 90º infill orientation.

The experimental compression test and post-tuned FEA analysis results are shown in Fig.

3.12. The n = 11 cuboid increased in stiffness with distance, thereby demonstrating the ability to

print a material gradient; however, the gradient was not as linear as expected. The compression

tests from the n = 2 cuboids showed the ability to transition between the two materials. The

correlation between the trends of the experimental and FEA results are encouraging. The edge

0 10 20 30Distance Along Cuboid (mm)

0

20

40

60

Stiff

ness

(mN

/mm

) ExperimentsFEA

0 10 20 30Distance Along Cuboid (mm)

0

20

40

60

Stiff

ness

(mN

/mm

) ExperimentsFEA

0 10 20 30Distance Along Cuboid (mm)

0

10

20

30

40

50

Stiff

ness

(mN

/mm

) ExperimentsFEA

0 10 20 30Distance Along Cuboid (mm)

0

10

20

30

40

Stiff

ness

(mN

/mm

) ExperimentsFEA

0 10 20 30Distance Along Cuboid (mm)

0

10

20

30

40

50

Stiff

ness

(mN

/mm

) ExperimentsFEA

0 10 20 30Distance Along Cuboid (mm)

0

10

20

30

40

Stiff

ness

(mN

/mm

) ExperimentsFEA

Page 42: Multi-Material 3D-Printed Silicone Vocal Fold Models

32

effects from the experimental and FEA results are comparable, as well as the material interfaces

in the n = 2 cuboids. However, several artifacts in the printed cuboid specimens are evident.

Each shows a rise in stiffness near the 30 mm mark, possibly due to accumulated over extrusion.

This is also visible in Fig. 3.7 where the darker color gradients and geometric defects appear to

correspond with the stiffer trends at the end of each cuboid in the experimental data.

Additionally, the transition at the material interfaces in the experimental data for the n = 2

cuboids is more gradual than the FEA data. The data in Fig. 3.12 for the n = 11 cuboid show that

the experimental data are not as linear as the FEA data predicted. This may indicate accumulated

over-extrusion or dragging near the cuboid ends as the needles travel from the end of one print

layer to the start of a new print layer.

Figure 3.12: Stiffness vs. distance data from experimental and FEA models. (Left) Cuboid with n = 11, 45° infill orientation. (Middle) n = 2, 45° infill orientation. (Right) n = 2, 90° infill orientation. The clear to blue regions in Fig. 3.7 correspond to 0 to 33 mm, respectively.

The results from the two n = 2 cases show that print quality is affected by infill

orientation. When comparing the images of the n = 2 cuboids in Fig. 3.7, the cuboid with a 90°

infill orientation has less color bleeding between the two material sections. Additionally, the data

in Fig. 3.12 show that the stiffness of the 90° cuboid follows that of the FEA model slightly more

closely between the two material sections. This has implications to printing complex geometries,

0 10 20 30Distance Along Cuboid (mm)

0

20

40

60

Stiff

ness

(mN

/mm

) ExperimentsFEA

0 10 20 30Distance Along Cuboid (mm)

0

10

20

30

40

Stiff

ness

(mN

/mm

) ExperimentsFEA

0 10 20 30Distance Along Cuboid (mm)

0

10

20

30

40St

iffne

ss (m

N/m

m) Experiments

FEA

Page 43: Multi-Material 3D-Printed Silicone Vocal Fold Models

33

such as VF models, and future work will be required to study the effects of infill orientation to

optimize print quality.

3.5 Summary and Conclusions

Three tests were implemented to validate the multi-material 3D printer’s ability to (1)

print the desired range of stiffness, (2) change between materials quickly, and (3) print a material

gradient. To determine the printable range of stiffness, silicone cubes with ratios of base to

silicone thinner from 1:1 to 1:12 were printed and tensile tested, resulting in a stiffness range of

1.11 kPa to 27.1 kPa. To validate the ability to change between materials, two side-by-side

single-layer squares were each assigned different extruders and printed. With only one extruder

active, prints were observed, and retraction values of 0.26 mm and 0.20 mm were chosen for

extruders A and B, respectively. To validate the ability to print a material gradient, three

10×10×33 mm silicone cuboids with material gradients were printed. The cuboids were imaged

to visualize the material gradients using color. Additionally, the cuboids were compression tested

to quantify the stiffness variation and FEA analyses were performed for comparison. The results

of these three validation tests demonstrated the ability to produce multi-layer silicone prints with

material gradients.

Page 44: Multi-Material 3D-Printed Silicone Vocal Fold Models

34

4 3D-PRINTED VOCAL FOLD MODELS

4.1 Introduction

In this chapter, the ability to print multi-layer self-oscillating VF models using the multi-

material 3D printing method discussed in Chapter 2 is presented. Two different VF models are

first described, followed by the geometric and material characteristics of the printed VF models.

Lastly, test results are presented to characterize the flow-induced vibratory responses of the

models.

4.2 Vocal Fold Model Design and Printing

The two types of VF models illustrated in Fig. 4.1 were printed. The first was the so-

called EPI model (Murray and Thomson, 2011, 2012) and was chosen to demonstrate the ability

to 3D print a multi-layer VF model. The second, here referred to as the vertical stiffness gradient

(VSG) model, was chosen to demonstrate the ability to fabricate multi-material VF models with

geometries and material properties that would be difficult to cast. While the EPI model has

discrete layers (SLP, body, ligament, and epithelium), human VFs do not have distinct

boundaries between all soft tissues. One example of this is the inferior-superior VSG that has

been previously studied (Oren et al., 2014; Geng et al., 2016; Farbos de Luzan et al., 2021). The

VSG model in this study was a combination of the EPI model and the model created by Geng et

al. (2016). The VSG model geometric and material stiffness characteristics are shown in Fig. 4.1,

and corresponding material properties are listed in Table 4.1. The VSG model was designed and

Page 45: Multi-Material 3D-Printed Silicone Vocal Fold Models

35

used in this study for demonstration purposes only and was not intended to precisely simulate the

actual VSG found in human VFs.

Figure 4.1: (Top) Print paths of EPI (left) and VSG (right) VF models, with grayscale denoting material stiffness. The material gradient of the VSG VF model can be observed in the SLP layer. (Bottom) Dimensions (mm) of VF models. The 12 vertical slices in the SLP layer only existed in the VSG model. The VF model was 17 mm long in the anterior-posterior (out of page) direction.

6.8212 x 0.53 2.09

2.00

R0.99

1.60

R6.00

R0.51

1.00

2.00

10.40 5°

50°

R2.00

1.5 kPa 12 kPa6.75 kPa

EPI VF Model VSG VF Model

LMS

ILMS

I

Page 46: Multi-Material 3D-Printed Silicone Vocal Fold Models

36

Table 4.1: Components of synthetic VF model layers. The mixing ratios of UV Electro are denoted as (base + catalyst):(thinner) by weight. As further defined in Sec. 4.2, “SLP EPI”

corresponds to the homogeneous SLP layer of the EPI model, and “SLP VSG” corresponds to the SLP layer with a vertical stiffness gradient. The ratios for the SLP VSG layer were chosen so that the design stiffness gradient would decrease linearly in the superior direction by a factor of three. The relative amounts of material deposited by extruders A and B required to achieve

the desired mixing ratios are also shown.

Model Layer

Target Tensile Modulus

UV Electro Mixing Ratio Extruder A (%) Extruder B (%)

Body 12 kPa 1:3.21 100 0

Ligament 2 kPa 1:8.23 14.98 85.02

SLP EPI 1.5 kPa 1:9.12 0 100

SLP VSG 1.5 to 4.5 kPa 1:9.12 to 1:5.81 0 to 55.92 100 to 44.08

The approximate print times for EPI and VSG VF models were 47 and 44 minutes,

respectively. After printing and curing, the models were adhered to polylactic acid (PLA)

thermoplastic 3D-printed mounts using Sil-Poxy, with threads inserted into the ligament layers

following the practice of Murray and Thomson (2011, 2012), as shown in Fig. 4.2. The epithelial

layer was added similar to the process outlined by Murray and Thomson (2011) as follows. First,

Ecoflex 00-35 Part B and 2% of the cure decelerator Slo-Jo (Smooth-On, Inc., Macungie, PA) by

weight of Part B were hand mixed. Slo-Jo was used to increase the pot life of Ecoflex 00-35 to

enable pouring before curing. Ecoflex 00-35 Part A and silicone thinner were then added with a

ratio of 1:1:1 by weight ([Part B + Slo-Jo]:Part A:thinner) and mixed for two minutes at 2350

RPM in the planetary centrifugal mixer. The model was placed on an incline (see Fig. 4.2) and

the Ecoflex 00-35 mixture was poured over the model, allowing gravity to distribute the coating

Page 47: Multi-Material 3D-Printed Silicone Vocal Fold Models

37

in a thin layer along the outer surface. The incline prevented pooling on the medial surface of the

VF model. The poured epithelial layer provided a slightly smoother surface finish and protected

the softer SLP layer during vibration. After curing, excess epithelial layer material was trimmed,

and baby powder (Johnson & Johnson, Skillman, NJ) was applied to the surface of the VF

models to reduce surface tackiness.

Figure 4.2: (A, B, C) 3D-printed EPI model with red and blue dye corresponding to the body and SLP layers respectively (no epithelial layer). About 2 mm of the anterior and posterior ends of the VF have been cut away to better image the layers. Scale bar is approximately 5 mm. (D) A different 3D-printed VF model glued in mount, with fiber inserted, and inclined for pouring of epithelial layer. Assuming the inferior, medial, and anterior anatomical directions correspond to positive x-, y-, and z-axes, respectively, the VF models were printed with a z-up orientation (i.e., in the anterior-posterior direction). The VF models were rotated around the z-axis −40° to orient the medial-inferior surface with the rectilinear infill-pattern to achieve a better surface finish.

Sets of models were printed on different days. Eight EPI models (i.e., four model pairs)

were printed on day one and eight VSG models on day two. The UV Electro was mixed on day

one and used for both days but stored in a dark cabinet between days to prevent curing. The

Page 48: Multi-Material 3D-Printed Silicone Vocal Fold Models

38

process was repeated one week later with a new UV Electro mixture, with eight VSG models

printed on day seven and eight EPI models on day eight.

4.3 Vocal Fold Model Geometry Results

To characterize the geometric accuracy of a printed VF model, a micro-CT scanner

(Quantum GX, Hopkinton, MA; 72 µm resolution) was used to image a printed EPI VF model

that had been previously vibrated. The reconstructed geometry is shown in Fig. 4.3. Since the

interior layers could not be differentiated in the micro-CT images, only the outer geometry of the

print was analyzed. Over 200 frontal plane images from a 15 mm section of the VF model from

anterior to posterior were imported and analyzed; 1 mm each of the anterior and posterior ends

were excluded due to the glued regions at these locations. The outer perimeters were identified

using a custom MATLAB script (Appendix D.2), superimposed on each other, registered, and

overlaid with a stencil of the desired geometry as shown in Fig. 4.3. The CT images were

registered because the model was not oriented perfectly orthogonally in the micro-CT scanner.

Additionally, the thickness of the mount in the inferior-superior direction (10.51 mm) was used

to scale the CT images because the provided scale bar was calibrated incorrectly. A comparison

of the desired vs. actual VF outer geometry can be seen in the image on the right of Fig. 4.3. The

thickness of the black perimeter represents the outer geometry consistency in the anterior-

posterior direction, and the distance between the black perimeter and red stencil overlay

represents the error at a given point on the VF perimeter. Much of the black perimeter is less

than 0.5 mm thick and falls within the ±0.5 mm offset bands. The error of the outer perimeter of

the VF model was quantified by averaging the distance of each black pixel in each frontal plane

image to the nearest point on the perimeter of the stencil (solid red line) in Fig. 4.3. This average

error was calculated to be ±0.29 mm.

Page 49: Multi-Material 3D-Printed Silicone Vocal Fold Models

39

Figure 4.3: (Left) Micro-CT scan of mounted EPI VF model. The posterior side of the VF mount was not segmented to provide a better view of the VF model. The white dashed line shows the inner 15 mm region of the vocal fold used to create the image on the right. (Right) Superimposed perimeters at over 200 sections (black) with design perimeter (solid red) and ±0.5 mm offset (dashed red) for reference. The red perimeter was defined using the same scale as the black perimeter, but positioned by minimizing the average error.

4.4 Vocal Fold Model Material Properties

To test the tensile properties of the materials used to print the VF models, six 10 mm

cubes were printed, three of the extruder A material and three of the extruder B material, which

correspond to the materials of the body and SLP VF layers, respectively. Cubes were printed on

the same day as the corresponding VF models using the same print settings and silicone material

mixtures. The cubes were mounted using the procedure described in Sec. 3.2 and tensile tested

approximately 24 hours after being printed.

The tensile modulus data of the cubes representing the body and SLP layers are provided

in Table 4.2. Additionally, data from cast EPI VF models (Murray and Thomson, 2011) and

embedded 3D-printed EPI VF models (Greenwood and Thomson, 2021) are included for

reference.

Page 50: Multi-Material 3D-Printed Silicone Vocal Fold Models

40

Table 4.2: Comparison of VF model layer modulus values for current multi-material 3D printed models (first three columns) with previous cast (fourth column) and embedded 3D-printed (last

column) VF models. Column one lists the target tensile modulus values for this study. The values in columns two and three are the average tensile moduli of the printed cubes,

with the standard deviations in parentheses.

Tensile Modulus (kPa)

Target Values

Week One Models

Week Two Models

Previous Cast EPI VF Model

Previous Embedded 3D-printed EPI VF Model

Body 12 13.3 (±1.51) 15.8 (±1.78) 11.8a 12.9b

SLP EPI 1.5 1.94 (±0.131) 2.45 (±0.152) 0.200a 0.910b

a Murray and Thomson, 2011 b Greenwood and Thomson, 2021

As shown in Table 4.2, the stiffness of the body and SLP EPI layers of the multi-material

3D-printed VF models were comparable to, but somewhat greater than desired. Week one layers

were 1.3 kPa and 0.44 kPa stiffer than desired (by 10.9% and 29.5%, respectively) and week two

layers were 3.8 kPa and 0.95 kPa stiffer than desired (by 31.8% and 63.3%, respectively).

Possible reasons for these variations may include inherent 3D printing variability, small

differences in material mixing ratios, amounts of glue used when attaching the cubes to the

tensile mounting plates, specimen alignment during tensile testing, and fluctuations in room

temperature and humidity during material preparation and testing. Furthermore, experience has

shown that these silicones are very sensitive to processing parameters such as these, so the

variations seen in Table 4.2 are not unexpected.

4.5 Vocal Fold Model Vibration Testing

The vibration testing setup and procedure were similar to those outlined by Greenwood

and Thomson (2021) and Romero et al. (2021). Two models in a full larynx configuration were

Page 51: Multi-Material 3D-Printed Silicone Vocal Fold Models

41

mounted at the end of a 33-cm-long, 2.4-cm-diameter tube attached to a rigid plenum connected

to a compressed air source. The subglottal air flow was gradually increased until a sudden

audible vibration noise indicated that vibration had commenced. The onset pressure was

manually recorded by monitoring a custom LabVIEW VI (National Instruments, Austin, TX)

with a subglottal pressure transducer (26PC 6CF6G, Honeywell, Charlotte, NC) mounted 1.5 cm

upstream of the VF models. The air was then decreased until vibration stopped. This process was

repeated two more times and the average onset pressure was calculated. A video was captured at

20% above onset pressure using a high-speed camera (SC2+, Edgertronic, San Jose, CA,

640×480 pixel resolution) at 5912 fps with a 50 mm f/1.8 AF-D lens (Nikon, Melville, NY), 12

mm extension tube (Zeikos, Edison, NJ), and LED illumination (Model 900420H, Visual

Instrumentation, Lancaster, CA). The video was analyzed using a custom MATLAB script to

calculate vibration frequency, glottal width, and glottal area over seven periods (see Appendix

D.3). Testing for each model was performed 24 hours after fabrication. Two sets of thread

tension conditions were tested: one in which two 21.5 gram weights were hung from threads tied

together on the anterior and posterior ends (one weight on each side), and the other in which no

weight was applied.

Vibration test data for the EPI and VSG models, with and without tension, are listed in

Table 4.3. Corresponding data for the previous cast EPI VF models (Murray and Thomson, 2011,

2012), single-material 3D-printed VF models (Romero et al., 2021), embedded 3D-printed

models (Greenwood and Thomson, 2021), as well as human in vivo VFs are also included for

reference. Additionally, the onset pressure, maximum glottal width, and frequency data for each

of the printed EPI and VSG VF models in tension and non-tension can be found in Fig. 4.4. The

Page 52: Multi-Material 3D-Printed Silicone Vocal Fold Models

42

data in Fig. 4.4 allow for an objective comparison between the EPI and VSG VF models, as well

as between VF models from weeks one and two. Statistical comparisons are reported below.

Table 4.3: Synthetic VF model vibration test data. The data from weeks one and two were combined and averaged, with standard deviations in parentheses. Data from previous

studies included for comparison.

Model Onset

Pressure (kPa)

Vibration Frequency (Hz)

Maximum Glottal

Width (mm)

3D-printed EPI model, no tension 1.07 (±0.16) 164 (±30.16) 1.21 (±0.47)

3D-printed EPI model, tension 1.04 (±0.17) 181 (±26.70) 1.03 (±0.30)

3D-printed VSG model, no tension 1.25 (±0.14) 123 (±12.71) 2.40 (±0.51)

3D-printed VSG model, tension 1.28 (±0.16) 139 (±31.21) 2.04 (±0.67)

Cast model, no tensiona 0.37 86b 2.4b

Cast model, tensiona 0.27 102b 1.4b

Single-material 3D-printed model, no tensionc 3.8 to 3.9 181 to 214 -

Embedded 3D-printed model, tensiond 0.82 to 1.24 125 to 180 0.91 to 3.2

Human 0.29-0.49e 100-136 (male)e

189-224 (female)e 2f

a Murray and Thomson, (2011, 2012) b Values are approximated from plots at 120% onset pressure (Murray and Thomson, 2012) c Romero et al., (2021) d Greenwood and Thomson, (2021) e Baken and Orlikoff, (2000) f Schuberth et al., (2002)

Page 53: Multi-Material 3D-Printed Silicone Vocal Fold Models

43

Figure 4.4: Onset pressure, frequency, and maximum glottal width for all EPI and VSG VF models in non-tension (top) and tension (bottom) from weeks one and two. Labels A, B, C, and D denote results from VF models that are shown in Fig. 4.5.

The onset pressures for individual multi-material 3D-printed VF models ranged from

0.86 to 1.53 kPa. These are higher than the range of human VF onset pressures reported by

Baken and Orlikoff (2000) of 0.29 to 0.49 kPa, but still within the range of human lung pressure

during voicing (at least as high as 2.72 kPa at loud intensities; Baken and Olikoff, 2000).

Additionally, the onset pressures of the models in this study are lower than those of the single-

material 3D-printed models (3.8 to 3.9 kPa) (Romero et al., 2021) and of a cast VF model based

on MRI data reported by Murray and Thomson (2012) (1.68 kPa).

The frequencies of the printed models in this study (111 to 214 Hz) are within the human

frequency range listed in Table 4.3. The average frequencies for the EPI VF models in tension

were approximately 17 Hz higher than those not in tension. Increased frequency with added

tension has also been previously reported (Murray and Thomson, 2012), as seen in Table 4.3.

AB C

D

00.20.40.60.8

11.21.41.6

Ons

et P

ress

ure

(kPa

)

Wk 1 Wk 2 Wk 1 Wk 2EPI VSG

Wk 1 Wk 2 Wk 1 Wk 2EPI VSG

Wk 1 Wk 2 Wk 1 Wk 2EPI VSG

Wk 1 Wk 2 Wk 1 Wk 2EPI VSG

Wk 1 Wk 2 Wk 1 Wk 2EPI VSG

Wk 1 Wk 2 Wk 1 Wk 2EPI VSG

0

50

100

150

200

250

Freq

uenc

y (H

z)

A BC

D

0

0.5

1

1.5

2

Ons

et P

ress

ure

(kPa

)

00.5

11.5

22.5

33.5

Max

Glo

ttal W

idth

(mm

)

0

50

100

150

200

250

Freq

uenc

y (H

z)

00.5

11.5

22.5

33.5

Max

Glo

ttal W

idth

(mm

)

Page 54: Multi-Material 3D-Printed Silicone Vocal Fold Models

44

The maximum glottal widths of the 3D-printed VF models in this study are comparable to

those of human VFs as shown in Table 4.3. The glottal widths for VF models in tension were

lower than those not in tension, with an average difference of 0.18 mm for the EPI VF models.

This is expected as the thread in tension restrains inferior-superior model motion during

vibration.

An alternative method for analyzing VF model vibration is a kymograph which shows

spatial position over time (see Appendix D.3 for MATLAB script). Grayscale values along a line

near the anterior-posterior midplane were extracted from the high-speed videos and plotted over

time as shown in Fig. 4.5. The kymographs show consistency in vibration from week one to

week two for both EPI and VSG models. It can also be visually observed that models in tension

generally vibrated with smaller glottal widths, that the VSG model frequencies were lower than

those of the EPI models, and that the VSG glottal widths were greater than those of the EPI

model (each of these are also evident in the Table 4.3 data). The finding that the VSG models

had lower frequencies and higher glottal widths than the EPI models is unexpected as the stiffer

material in the VSG SLP layer would be expected to increase the frequency and decrease the

glottal width. It is possible that this may have been caused by acoustic effects due to acoustic

coupling of the subglottal tube with the EPI and/or VSG models, although effects due to printing

imprecision or errors cannot be ruled out, and further exploration is needed.

Page 55: Multi-Material 3D-Printed Silicone Vocal Fold Models

45

Figure 4.5: Kymographs at 20% above onset pressure for EPI and VSG models in tension and non-tension for weeks one and two. Labels A, B, C, and D correspond to the VF models labeled in Fig. 4.4.

Two-tailed Student t-tests were performed to determine statistical significance between

week one vs. week two, tension vs. non-tension, and EPI vs. VSG models using the three

vibration metrics of onset pressure, frequency, and maximum glottal width. The results are listed

in Table 4.4. Each metric indicates that the EPI and VSG models were statistically different, with

all P-values less than 0.05. The vibration data (Fig. 4.4) and kymographs (Fig. 4.5) seem to

exhibit differences in trends in vibration frequency and maximum glottal width between

tensioned and non-tensioned synthetic VF models; however, Table 4.4 shows that the differences

were not statistically significant. Furthermore, the high statistical P-values for onset pressure for

the EPI and VSG models are notably indicative of an absence of statistical difference between

tensioned and non-tensioned VF models. Care was taken to follow similar fabrication and

vibration testing procedures of models from weeks one and two. Nine of the twelve P-values

comparing week one and week two are not statistically significant. This is encouraging from the

standpoint of process repeatability, although research to further improve consistency is certainly

desirable.

Page 56: Multi-Material 3D-Printed Silicone Vocal Fold Models

46

Table 4.4: Statistical P-values of two-tailed Student t-tests for all vibration testing values and VF model categories. Asterisk denotes P-value less than 0.05.

Test Comparison

Statistical P-value

Onset Pressure

Vibration Frequency

Maximum Glottal Width

EPI vs VSG Non-tension 0.029* 0.006* 0.0002*

EPI vs VSG Tension 0.012* 0.012* 0.003*

EPI Tension vs Non-tension 0.755 0.243 0.388

VSG Tension vs Non-tension 0.723 0.203 0.239

EPI Week 1 vs Week 2 Non-tension 0.038* 0.094 0.009*

EPI Week 1 vs Week 2 Tension 0.127 0.040* 0.102

VSG Week 1 vs Week 2 Non-tension 0.929 0.731 0.249

VSG Week 1 vs Week 2 Tension 0.939 0.381 0.253

4.6 Summary and Conclusions

Two types of VF models were printed for this thesis research. A micro-CT scan of a VF

model demonstrated the geometric accuracy of the print with an average error of ±0.29 mm. The

frequency, onset pressure, and maximum glottal width for both types of VF models were

comparable to synthetic VF models in literature and to human VFs. As expected, VF models in

tension had higher frequencies and smaller glottal widths. The finding that the EPI models had

higher frequencies and smaller glottal widths than VSG models is of note, and future work is

Page 57: Multi-Material 3D-Printed Silicone Vocal Fold Models

47

needed to explore possible causes such as printing imprecision or acoustic coupling of the

subglottal tube with the EPI and/or VSG models.

Page 58: Multi-Material 3D-Printed Silicone Vocal Fold Models

48

5 CONCLUSIONS

5.1 Motivation

The purpose of this research was to build on the research of Greenwood and Thomson

(2021) and Romero et al. (2021) to develop a method to 3D print multi-material silicone vocal

fold models for use in voice research applications. This research was performed in three stages.

First, the slicing software and hardware for the multi-material 3D printer was developed. Second,

three tests were created to show the ability to print the range of stiffness that is characteristic of

synthetic VF models, to switch between materials quickly, and to print a material stiffness

gradient. Third, two different types of synthetic VF models were fabricated and tested to measure

their geometric, material, and vibration characteristics. The results demonstrate that the multi-

material 3D printing method is a viable option for fabricating synthetic VF models; however,

further refinement is desired. Summaries of each of the three stages listed above along with

suggestions for future work are outlined below.

5.2 Methods (Chapter 2)

To achieve multi-material silicone 3D printing, two independently-controlled extruders

were used, each containing uncured silicone of different material stiffness. The relative extrusion

amounts of each extruder were independently varied during printing so that the combined

silicone consisted of different ratios from each extruder. The deposited silicone was extruded

into a gel-like silicone oil-based support matrix, cured, removed from the support matrix, and

Page 59: Multi-Material 3D-Printed Silicone Vocal Fold Models

49

cleaned. The deposited material was a UV-curable silicone, Silopren UV Electro 225, that was

mixed with various ratios of thinner to span a range of stiffnesses that is suitable for synthetic VF

modeling.

The hardware of the multi-material 3D printer included a desktop 3-axis linear CNC

milling machine retrofitted with a custom dual extruder. The g-code used by the printer was

created by custom slicing software. The software solved several problems that are inherent to

current slicing software options which do not account for printing with a low-viscosity material

such as silicone. The software reduced needle movement by creating a continuous infill-pattern

and generated an animation of the print to allow the user to quickly change print settings and see

their effects before printing. The nominal print resolution for this study was 0.35 mm, calculated

as the ratio of the needle inner diameter and print infill setting.

5.2.1 Suggested Future Work

The spatial resolution of the prints discussed in this thesis is limited and inferior to

casting. Suggestions for future work include improving the spatial resolution through hardware

refinement, such as by using higher-resolution stepper motors and decreasing the blunt tip needle

size. Additionally, print accuracy may be improved by reducing printer vibrations by developing

a more rigid gantry system and dual-extruder mount. Additionally, 3D printing introduces a

complex set of hardware and software settings and parameters. Further research exploring the

effects of print parameters on print quality would be valuable. Lastly, the use of UV Electro

silicone as the 3D printing material is also somewhat limiting. The material characteristics and

UV curability of UV Electro are favorable for multi-material silicone 3D printing, but UV

Electro is expensive, and, at present, only available in bulk quantities. Future work implementing

Page 60: Multi-Material 3D-Printed Silicone Vocal Fold Models

50

more accessible materials or the development of a new UV curable silicone with similar material

properties to those of UV Electro would be valuable.

The newly developed slicing software reduces travel movement. This approach is highly

dependent on the extruder’s ability to retract effectively when switching between materials or

traversing a hole or a gap. In the scenario where the needles approach a hole or gap, all currently

active extruders are retracted, the needles traverse the hole or gap, the necessary extruders are

un-retracted, and printing continues. In principle this is the most effective way to reduce travel

movement; however, if retraction is not perfect, unwanted material can continue to flow out of

the needles while traversing the hole or gap. This is often referred to “stringing” or “oozing.”

One solution to reduce stringing is to modify the custom slicing software to create a print path

that goes around holes and bridges gaps only once. While this would cause additional and/or

asymmetric travel movement which can cause unwanted flow, it may provide a better print

quality. Stringing also occurs when the needles transition from one material section to another,

but it is less visible. Another area for future work is removing the current slicing software’s

dependence on retraction while still optimizing reduced travel movement, possibly by

developing a micro-fluidic chip that combines the flow from both extruders into one needle. By

knowing the volume of the microfluidic chip and needles, the expected extrusion delay could be

accounted for by offsetting the translation g-code commands relative to the extrusion g-code

commands. This would synchronize translation and extrusion movements so that no retraction

would be needed. With the current slicing software optimizing travel movements, this method

will only work for parts without holes or gaps; however, by combining the one needle method

with the method of creating a print path that goes around holes and passes over gaps once,

printing parts with holes or gaps may be possible.

Page 61: Multi-Material 3D-Printed Silicone Vocal Fold Models

51

5.3 Validation (Chapter 3)

Three tests were implemented to validate the multi-material 3D printing method. The first

test demonstrated the ability to print ultra-soft silicone with a range of stiffnesses suitable for

synthetic VF modeling. Triplicates of six cubes with ratios of UV Electro to silicone thinner

ranging from 1:2 to 1:12 were printed. The print time for a single cube was approximately 11

minutes. The cubes were tensile tested with resulting tensile modulus values ranging from 1.11

kPa to 27.1 kPa. While cast models have been fabricated using a wider range of stiffnesses, this

range is adequate for VF modeling.

The second test demonstrated the ability to change between materials quickly via

retraction of the material. A model of two adjacent 10 mm squares was created and each square

was assigned an extruder. During printing only one layer was printed and one of the extruder’s

wires was disconnected, allowing only one square to be printed. The print was imaged and

observed for over- and under-extrusion as the needles moved from one cube to the other.

Retraction values ranging from 0.11 to 0.26 mm were tested, and values of 0.26 and 0.20 mm

were selected for extruders A and B, respectively.

Material gradients are common throughout the human body tissue. Most tissue structures

do not have sharp boundaries between different types of tissues. Material stiffness gradients can

be found throughout human. One example is the VSG; another is in developing nodules. The

third validation test demonstrated the ability to print a material stiffness gradient. Three

10×10×33 mm cuboids were modeled and split lengthwise into n sections. Using the custom

slicing software, the first and last sections were assigned a stiffness of 1.5 and 12 kPa,

respectively, with the interior sections being assigned stiffness values using linear interpolation

between the first and last section stiffnesses. One cuboid was printed with n = 11 sections and a

Page 62: Multi-Material 3D-Printed Silicone Vocal Fold Models

52

infill orientation of 45°. The second and third cuboids were printed with n = 2 sections and infill

orientations of 45° and 90°, respectively. Colored images and data from compression testing

showed stiffness gradients along the cuboids as expected. FEA analyses were conducted for

comparison with the compression data. The similarity of trends between the compression data

and initial FEA data was encouraging. Additionally, when comparing the n = 2 cuboids with

different infill orientations, it was shown that an infill orientation of 90° followed the FEA data

more closely. This indicates that infill orientation does affect print quality.

5.3.1 Suggested Future Work

The range of stiffness characterized by the first validation test is acceptable. However,

the lower stiffness value of 1.11 kPa could ideally be lowered for more life-like models. This

study found that high ratios of thinner to UV Electro caused curing to become unpredictable.

Suggestions for future work include identifying materials and/or processes that would yield

lower stiffnesses.

To improve the print quality of the multi-material printing method, the accuracy and

speed of switching between materials must also improve. This is highly dependent on the

printer’s ability to retract quickly and accurately. As outlined in Sec. 5.2.1, the imperfections of

retraction can be partially accounted for in the slicing software, but suggestions for future work

include implementing hardware changes. Future work may also include removing retraction

dependence altogether as discussed in Sec. 5.2.1.

The ability to print true material gradients will improve with the above suggestions;

however, additional future work may include continued exploration on how print orientation

Page 63: Multi-Material 3D-Printed Silicone Vocal Fold Models

53

and/or increasing 𝐿𝐿, the number of sections in a cuboid, affects the print quality of material

gradients.

5.4 3D-Printed Vocal Fold Models (Chapter 4)

Two VF models were described in this thesis, the so-called EPI model and the VSG

model. Printing and testing were conducted over two weeks, with eight model pairs each week

(four EPI, four VSG), for a total of sixteen model pairs. In addition, six 10 mm cubes were

printed and tensile tested each week, resulting in average lower and upper stiffness values of

1.94 kPa and 13.3 kPa, respectively, for week one, and 2.45 kPa and 15.8 kPa for week two. A

micro-CT scan of a VF model was acquired, and a custom MATLAB script was used to estimate

outer geometry accuracy of ±0.29 mm.

Data from the vibration testing of the VF models with and without tension included onset

pressure, frequency, and glottal width. The onset pressures for both models were higher than

human VFs, but still within human lung capabilities and comparable to other synthetic VF

models. The frequencies and glottal widths of both VF models were comparable to human VFs

and, as expected, the frequency increased while the glottal width decreased when tension was

applied. The VSG model frequencies were lower than those of the EPI models and the glottal

widths were greater. This finding was unexpected as the VSG SLP layer was designed to be

stiffer than the EPI SLP layer. A possible cause of the finding may include acoustic coupling of

the subglottal tube with the EPI and/or VSG models, although effects due to printing imprecision

or errors cannot be ruled out, and further exploration is needed.

EPI and VSG VF models were determined to be statistically different with P-values less

than 0.05; however, differences between VF models with and without tension were determined

not to be statistically significant. Additionally, nine of the twelve P-values indicate that there was

Page 64: Multi-Material 3D-Printed Silicone Vocal Fold Models

54

no statistical significance when comparing VF models from weeks one and two, which is

favorable from a process repeatability standpoint.

5.4.1 Suggested Future Work

Future work is suggested to improve the accuracy of the material model in Sec. 3.2 and

decrease the variability of the UV Electro tensile stiffness. All tensile modulus values of the 10

mm cubes were higher than expected; therefore, further testing to update and validate the

material model is recommended. Additionally, while the CT images provided an accurate

measurement of the external geometry, a method to evaluate the accuracy of the internal VF

model layers would be valuable, such as adding CT-traceable particles to the silicone in one

extruder, for example.

A revised vibration testing procedure to rule out the effect of acoustical coupling in the

vibration data would also be important to future work. This could be done by conducting tests

with a shorter subglottal flow supply tube. It is also recommended to print more models that

demonstrate the capabilities of the multi-material printing method, such as complex internal and

external geometries, as well as material stiffness gradients that are not possible with traditional

casting methods.

Improved repeatability in the 3D printing process is needed. It is difficult to determine all

of the places where variability in printing is introduced, but a recommended starting point would

be the retraction issues addressed in Sec. 5.2.1. It is also recommended to create a more

repeatable material preparation process or to explore alternative silicones with more consistent

cured and uncured material properties.

Page 65: Multi-Material 3D-Printed Silicone Vocal Fold Models

55

REFERENCES

Baken, R. J., and Orlikoff, R. F. (2000). Clinical Measurement of Speech and Voice, San Diego Singular Thomson Learning, pages 327–330.

Calais, T., Sanandiya, N. D., Jain, S., Kanhere, E. V., Kumar, S., Yeow, R. C.-H., and Valdivia y Alvarado, P. (2022). “Freeform liquid 3D printing of soft functional components for soft robotics,” ACS Appl. Mater. Interfaces, 14, 2301–2315. doi:10.1021/acsami.1c20209

Cruz, R. L. J., Ross, M. T., Powell, S. K., and Woodruff, M. A. (2020). “Advancements in soft-tissue prosthetics part A: The art of imitating life,” Front. Bioeng. Biotechnol., 8, 1–20. doi:10.3389/fbioe.2020.00121

Drechsel, J. S., and Thomson, S. L. (2008). “Influence of supraglottal structures on the glottal jet exiting a two-layer synthetic, self-oscillating vocal fold model,” J. Acoust. Soc. Am., 123, 4434–4445. doi:10.1121/1.2897040

Du, K., Basuki, J., Glattauer, V., Mesnard, C., Nguyen, A. T., Alexander, D. L. J., and Hughes, T. C. (2021). “Digital light processing 3D printing of PDMS-based soft and elastic materials with tunable mechanical properties,” ACS Appl. Polym. Mater., 3, 3049–3059. doi:10.1021/acsapm.1c00260

Farbos de Luzan, C., Maddox, A., Oren, L., Gutmark, E., Howell, R. J., and Khosla, S. M. (2021). “Impact of vertical stiffness gradient on the maximum divergence angle,” Laryngoscope, 131, E1934–E1940. doi:10.1002/lary.29345

Geng, B., Xue, Q., and Zheng, X. (2016). “The effect of vocal fold vertical stiffness variation on voice production,” J. Acoust. Soc. Am., 140, 2856–2866. doi:10.1121/1.4964508

Greenwood, T. E. (2020). Silicone 3D printing processes for fabricating synthetic, self-oscillating vocal fold models, Brigham Young University, Provo, Utah, USA. Retrieved from https://scholarsarchive.byu.edu/etd

Greenwood, T. E., Hatch, S. E., Colton, M. B., and Thomson, S. L. (2021). “3D printing low-stiffness silicone within a curable support matrix,” Addit. Manuf., 37, 101681. doi:10.1016/j.addma.2020.101681

Greenwood, T. E., and Thomson, S. L. (2021). “Embedded 3D printing of multi-layer, self-oscillating vocal fold models,” J. Biomech., 121, 110388. doi:10.1016/j.jbiomech.2021.110388

Guo, Z., Yu, P., Liu, Y., and Zhao, J. (2021). “High-precision resistance strain sensors of multilayer composite structure via direct ink writing: Optimized layer flatness and interfacial strength,” Compos. Sci. Technol., 201, 108530. doi:10.1016/j.compscitech.2020.108530

Page 66: Multi-Material 3D-Printed Silicone Vocal Fold Models

56

Hamidi, A., and Tadesse, Y. (2020). “3D printing of very soft elastomer and sacrificial carbohydrate glass/elastomer structures for robotic applications,” Mater. Des., 187, 108324. doi:10.1016/j.matdes.2019.108324

Kniesburges, S., L. Thomson, S., Barney, A., Triep, M., Sidlof, P., Horacek, J., Brucker, C., and Becker, S. (2011). “In vitro experimental investigation of voice production,” Curr. Bioinform., 6, 305–322. doi:10.2174/157489311796904637

Luis, E., Pan, H. M., Bastola, A. K., Bajpai, R., Sing, S. L., Song, J., and Yeong, W. Y. (2020). “3D printed silicone meniscus implants: influence of the 3d printing process on properties of silicone implants,” Polymers (Basel)., 12, 2136. doi:10.3390/polym12092136

Mizuta, M., Kurita, T., Dillon, N. P., Kimball, E. E., Garrett, C. G., Sivasankar, M. P., Webster, R. J., and Rousseau, B. (2017). “In vivo measurement of vocal fold surface resistance,” Laryngoscope, 127, E364–E370. doi:10.1002/lary.26715

Moretto, H.-H., Schulze, M., and Wagner, G. (2000). “Silicones,” Ullmann’s Encycl. Ind. Chem., Wiley-VCH Verlag GmbH & Co. KGaA, Weinheim, Germany. doi:10.1002/14356007.a24_057

Murray, P. R., and Thomson, S. L. (2011). “Synthetic, multi-layer, self-oscillating vocal fold model fabrication,” J. Vis. Exp., e3498. doi:10.3791/3498

Murray, P. R., and Thomson, S. L. (2012). “Vibratory responses of synthetic, self-oscillating vocal fold models,” J. Acoust. Soc. Am., 132, 3428–3438. doi:10.1121/1.4754551

O’Bryan, C. S., Bhattacharjee, T., Hart, S., Kabb, C. P., Schulze, K. D., Chilakala, I., Sumerlin, B. S., Sawyer, W. G., and Angelini, T. E. (2017). “Self-assembled micro-organogels for 3D printing silicone structures,” Sci. Adv., 3, e1602800. doi:10.1126/sciadv.1602800

Oren, L., Dembinski, D., Gutmark, E., and Khosla, S. (2014). “Characterization of the vocal fold vertical stiffness in a canine model,” J. Voice, 28, 297–304. doi:10.1016/j.jvoice.2013.11.001

Patel, D. K., Sakhaei, A. H., Layani, M., Zhang, B., Ge, Q., and Magdassi, S. (2017). “Highly stretchable and UV curable elastomers for digital light processing based 3D printing,” Adv. Mater., 29, 1–7. doi:10.1002/adma.201606000

Peng, S., Li, Y., Wu, L., Zhong, J., Weng, Z., Zheng, L., Yang, Z., and Miao, J. T. (2020). “3D printing mechanically robust and transparent polyurethane elastomers for stretchable electronic sensors,” ACS Appl. Mater. Interfaces, 12, 6479–6488. doi:10.1021/acsami.9b20631

Pickup, B. A., and Thomson, S. L. (2010). “Flow-induced vibratory response of idealized versus magnetic resonance imaging-based synthetic vocal fold models,” J. Acoust. Soc. Am., 128, EL124. doi:10.1121/1.3455876

Page 67: Multi-Material 3D-Printed Silicone Vocal Fold Models

57

Riede, T., Tokuda, I. T., Munger, J. B., and Thomson, S. L. (2008). “Mammalian laryngseal air sacs add variability to the vocal tract impedance: Physical and computational modeling,” J. Acoust. Soc. Am., 124, 634–647. doi:10.1121/1.2924125

Roh, S., Parekh, D. P., Bharti, B., Stoyanov, S. D., and Velev, O. D. (2017). “3D printing by multiphase silicone/water capillary inks,” Adv. Mater., 29, 1–7. doi:10.1002/adma.201701554

Romero, R. G. T., Colton, M. B., and Thomson, S. L. (2021). “3D-printed synthetic vocal fold models,” J. Voice, 35, 685–694. doi:10.1016/j.jvoice.2020.01.030

Ruiz, O. G., and Dhaher, Y. (2021). “Multi-color and multi-material 3D printing of knee joint models,” 3D Print. Med., 7, 1–16. doi:10.1186/s41205-021-00100-0

Schuberth, S., Hoppe, U., Döllinger, M., Lohscheller, J., and Eysholdt, U. (2002). “High-precision measurement of the vocal fold length and vibratory amplitudes,” Laryngoscope, 112, 1043–1049. doi:10.1097/00005537-200206000-00020

Sitthi-Amorn, P., Ramos, J. E., Wangy, Y., Kwan, J., Lan, J., Wang, W., and Matusik, W. (2015). “MultiFab,” ACM Trans. Graph., 34, 1–11. doi:10.1145/2766962

Unkovskiy, A., Wahl, E., Huettig, F., Keutel, C., and Spintzyk, S. (2021). “Multimaterial 3D printing of a definitive silicone auricular prosthesis: An improved technique,” J. Prosthet. Dent., 125, 946–950. doi:10.1016/j.prosdent.2020.02.021

Valentine, A. D., Busbee, T. A., Boley, J. W., Raney, J. R., Chortos, A., Kotikian, A., Berrigan, J. D., Durstock, M. F., and Lewis, J. A. (2017). “Hybrid 3D printing of soft electronics,” Adv. Mater., 29, 1–8. doi:10.1002/adma.201703817

Yirmibesoglu, O. D., Simonsen, L. E., Manson, R., Davidson, J., Healy, K., Menguc, Y., and Wallin, T. (2021). “Multi-material direct ink writing of photocurable elastomeric foams,” Commun. Mater., 2, 82. doi:10.1038/s43246-021-00186-3

Zhang, Z. (2011). “Restraining mechanisms in regulating glottal closure during phonation,” J. Acoust. Soc. Am., 130, 4010–4019. doi:10.1121/1.3658477

Zhang, Z. (2016). “Mechanics of human voice production and control,” J. Acoust. Soc. Am., 140, 2614–2635. doi:10.1121/1.4964509

Zhao, T., Yu, R., Li, S., Li, X., Zhang, Y., Yang, X., Zhao, X., Wang, C., Liu, Z., Dou, R., and Huang, W. (2019). “Superstretchable and processable silicone elastomers by digital light processing 3D printing,” ACS Appl. Mater. Interfaces, 11, 14391–14398. doi:10.1021/acsami.9b03156

Zheng, R., Chen, Y., Chi, H., Qiu, H., Xue, H., and Bai, H. (2020). “3D printing of a polydimethylsiloxane/polytetrafluoroethylene composite elastomer and its application in a triboelectric nanogenerator,” ACS Appl. Mater. Interfaces, 12, 57441–57449. doi:10.1021/acsami.0c18201

Page 68: Multi-Material 3D-Printed Silicone Vocal Fold Models

58

Zheng, S., Zlatin, M., Selvaganapathy, P. R., and Brook, M. A. (2018). “Multiple modulus silicone elastomers using 3D extrusion printing of low viscosity inks,” Addit. Manuf., 24, 86–92. doi:10.1016/j.addma.2018.09.011

Zhou, C., Chen, Y., Yang, Z., and Khoshnevis, B. (2013). “Digital material fabrication using mask-image-projection-based stereolithography,” Rapid Prototyp. J., 19, 153–165. doi:10.1108/13552541311312148

Zhou, L. Y., Gao, Q., Fu, J. Z., Chen, Q. Y., Zhu, J. P., Sun, Y., and He, Y. (2019). “Multimaterial 3D printing of highly stretchable silicone elastomers,” ACS Appl. Mater. Interfaces, 11, 23573–23583. doi:10.1021/acsami.9b04873

Page 69: Multi-Material 3D-Printed Silicone Vocal Fold Models

59

APPENDIX A. CUBOID DIMENSION ERROR CALCULATIONS

The following method was used to calculate the average error for each dimension

(𝐿𝐿𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 ,𝑊𝑊𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 ,𝐻𝐻𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒) of the cuboids in Sec. 3.4. First, the actual length, 𝐿𝐿𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎, of each cuboid

was measured using calipers (mm) (see Fig. A.1). Next, 𝐿𝐿𝑖𝑖𝑖𝑖𝑎𝑎𝑖𝑖𝑒𝑒 was measured in Adobe

Illustrator (pixel) by importing the images shown in Fig. 3.7. Using the 𝐿𝐿𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 and 𝐿𝐿𝑖𝑖𝑖𝑖𝑎𝑎𝑖𝑖𝑒𝑒

measurements, a millimeter-to-pixel scale, 𝐾𝐾, was calculated for each cuboid using Eq. A.1.

Finally, 𝐿𝐿𝑖𝑖𝑎𝑎𝑚𝑚 and 𝐿𝐿𝑖𝑖𝑖𝑖𝑚𝑚 for each cuboid was determined using the image as the method shown in

Fig. A.1, and 𝐿𝐿𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 was calculated using Eq. A.2. 𝐻𝐻𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 and 𝑊𝑊𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 were also calculated

following the pattern of Eq. A.2 with 𝐻𝐻𝑖𝑖𝑎𝑎𝑚𝑚, 𝑊𝑊𝑖𝑖𝑎𝑎𝑚𝑚, 𝐻𝐻𝑖𝑖𝑖𝑖𝑚𝑚, and 𝑊𝑊𝑖𝑖𝑖𝑖𝑚𝑚. By way of illustration, for

the n = 11 cuboid, the scale factor, 𝐾𝐾𝑚𝑚=11, and average width error, 𝑊𝑊𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒, are shown in Eq. A.3

and Eq. A.4, respectively.

Page 70: Multi-Material 3D-Printed Silicone Vocal Fold Models

60

Figure A.1: Three image views of a cuboid illustrating how 𝐿𝐿𝑖𝑖𝑖𝑖𝑚𝑚, 𝐿𝐿𝑖𝑖𝑎𝑎𝑚𝑚, 𝑊𝑊𝑖𝑖𝑖𝑖𝑚𝑚, 𝑊𝑊𝑖𝑖𝑎𝑎𝑚𝑚, 𝐻𝐻𝑖𝑖𝑖𝑖𝑚𝑚 and 𝐻𝐻𝑖𝑖𝑎𝑎𝑚𝑚 of each cuboid were measured. Only length and height measurements are shown for clarity. 𝑊𝑊𝑖𝑖𝑖𝑖𝑚𝑚, 𝑊𝑊𝑖𝑖𝑎𝑎𝑚𝑚, 𝐻𝐻𝑖𝑖𝑖𝑖𝑚𝑚 and 𝐻𝐻𝑖𝑖𝑎𝑎𝑚𝑚 were calculated from the top and side views, respectively. 𝐿𝐿𝑖𝑖𝑖𝑖𝑚𝑚 and 𝐿𝐿𝑖𝑖𝑎𝑎𝑚𝑚 were calculated from both the top and side views and averaged.

𝐾𝐾 � 𝑖𝑖𝑖𝑖𝑝𝑝𝑖𝑖𝑚𝑚𝑒𝑒𝑎𝑎

� = 𝐿𝐿𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 [𝑖𝑖𝑖𝑖]𝐿𝐿𝑖𝑖𝑖𝑖𝑎𝑎𝑖𝑖𝑖𝑖 [𝑝𝑝𝑖𝑖𝑚𝑚𝑒𝑒𝑎𝑎]

(A.1)

±𝐿𝐿𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 [𝐿𝐿𝐿𝐿] = ± 𝐿𝐿𝑖𝑖𝑎𝑎𝑚𝑚 [𝑝𝑝𝑖𝑖𝑚𝑚𝑒𝑒𝑎𝑎]−𝐿𝐿𝑖𝑖𝑖𝑖𝑚𝑚 [𝑝𝑝𝑖𝑖𝑚𝑚𝑒𝑒𝑎𝑎]2

× 𝐾𝐾 � 𝑖𝑖𝑖𝑖𝑝𝑝𝑖𝑖𝑚𝑚𝑒𝑒𝑎𝑎

� (A.2)

𝐾𝐾𝑚𝑚=11 = 34.05 [𝑖𝑖𝑖𝑖]114.90 [𝑝𝑝𝑖𝑖𝑚𝑚𝑒𝑒𝑎𝑎]

= 0.30 � 𝑖𝑖𝑖𝑖𝑝𝑝𝑖𝑖𝑚𝑚𝑒𝑒𝑎𝑎

� (A.3)

±𝑊𝑊𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 [𝐿𝐿𝐿𝐿] = ± 35.77 [𝑖𝑖𝑖𝑖]−28.20 [𝑖𝑖𝑖𝑖]2

× 0.30 � 𝑖𝑖𝑖𝑖𝑝𝑝𝑖𝑖𝑚𝑚𝑒𝑒𝑎𝑎

� = ±1.14 [𝐿𝐿𝐿𝐿] (A.4)

Page 71: Multi-Material 3D-Printed Silicone Vocal Fold Models

61

APPENDIX B. DRAWINGS

Page 72: Multi-Material 3D-Printed Silicone Vocal Fold Models

62

6

6

10

2

1

7 8 5

9

4

ITEM NO. PART NAME

QTY

.

1 Acrylic Support Frame 1

2Haydon-43F4P-2.33-6-12-M3_43000_Non_CaptiveNema17

2

3Haydon-43F4P-2.33-6-12-M3_43000_Non_Captive_Screw Nema17

2

4 5ml Glass Syringe Plunger 25 5ml Glass Syringe Body 26 5ml Glass NEMA 17 Adapter 2

7 27 Gauge Blunt Tip Needle1.5in Bent 2

8 27 Gauge Cut Dispensing Tip 29 2.5M Socket Head Bolt 15mm 4

10 4-40 Socket Head Bolt 0.5in 8A A

B B

2

2

1

1

-SHEET 1 OF 1SCALE: 1:2

DRAW N BY:

ASIZE: M ATERIAL:

Angled Dual ExtruderAssembly

TITLE:

DIMENSIONS ARE IN MILLIMETERS

Clayton Young

Page 73: Multi-Material 3D-Printed Silicone Vocal Fold Models

63

7.50

30.0072.00

R1.654 X 3.30

4 X 20.00

08.0013.45

37.35

62.35

81.0086.4588.45

111.45113.45136.45

159.55

184.55193.45209.55215.00225.00230.00240.00

05.

0010

.45

15.4

535

.45

61.0005.

0010

.45

20.4

529

.00

34.4

042

.95

52.9

558

.40

63.4

0

23.75

71.00

SYMMETRYLINE

5.45MM ACRYLICW/ HOLES THRU ALL

A A

B B

2

2

1

1

AcrylicSHEET 1 OF 7

Back Plate

SCALE: 1:2

DRAW N BY:

ASIZE: M ATERIAL:

TITLE:

DIMENSIONS ARE IN MILLIMETERS

Clayton Young

Acrylic Support

Page 74: Multi-Material 3D-Printed Silicone Vocal Fold Models

64

2 X 2.00 THRU

R7.50

0

10.00

32.50

42.5047.95

05.

45

15.4

5

37.9

5

47.9

553

.40

21.25

26.7

0

8.70

44.7

0

5.45MM ACRYLICW/ HOLES THRU ALL

A A

B B

2

2

1

1

ACRYLICSHEET 6 OF 7SCALE: 1:1

DRAW N BY:

ASIZE: M ATERIAL:

Acrylic Support:Middle Plate

TITLE:

DIMENSIONS ARE IN MILLIMETERS

Clayton Young

Page 75: Multi-Material 3D-Printed Silicone Vocal Fold Models

65

2 X 2.00 THRUR6.00

05.

458.

70

22.9

530

.45

47.9

553

.40

20.7

0

32.7

0

0

17.50

21.8025.00

42.5047.95 5.45MM ACRYLIC

W/ HOLES THRU ALL

A A

B B

2

2

1

1

ACRYLICSHEET 5 OF 7SCALE: 1:1

DRAW N BY:

ASIZE: M ATERIAL:

Acrylic Support:Retraction Plate

TITLE:

DIMENSIONS ARE IN MILLIMETERS

Clayton Young

Page 76: Multi-Material 3D-Printed Silicone Vocal Fold Models

66

4 X 2.84 THRU

22.00 THRU0

5.7310.00

21.25

32.5036.7742.5047.95

05.

4511

.18

15.4

5

26.7

0

37.9

542

.22

47.9

553

.40

5.45MM ACRYLICW/ HOLES THRU ALL

A A

B B

2

2

1

1

ACRYLICSHEET 4 OF 7SCALE: 1:1

DRAW N BY:

ASIZE: M ATERIAL:

Acrylic Support:Top Plate

TITLE:

DIMENSIONS ARE IN MILLIMETERS

Clayton Young

Page 77: Multi-Material 3D-Printed Silicone Vocal Fold Models

67

015.2325.2335.2340.6842.68

67.6865.68

90.68

113.78

138.78

163.78169.23179.23184.23194.23

010

.00

17.5

025

.00

32.5

042

.50

47.9

5

5.45MM ACRYLICW/ HOLES THRU ALL

158°

A A

B B

2

2

1

1

ACRYLICSHEET 3 OF 7SCALE: 1:2

DRAW N BY:

ASIZE: M ATERIAL:

Acrylic Support:Inside Plate

TITLE:

DIMENSIONS ARE IN MILLIMETERS

Clayton Young

Page 78: Multi-Material 3D-Printed Silicone Vocal Fold Models

68

08.0013.45

37.35

62.3581.0086.4588.45

113.45111.45

136.45

159.55

184.55

209.55215.00225.00230.00240.00

010

.00

17.5

025

.00

32.5

042

.50

47.9

5

5.45MM ACRYLICW/ HOLES THRU ALL

A A

B B

2

2

1

1

ACRYLICSHEET 2 OF 7SCALE: 1:2

DRAW N BY:

ASIZE: M ATERIAL:

Acrylic Support:Outside Plate

TITLE:

DIMENSIONS ARE IN MILLIMETERS

Clayton Young

Page 79: Multi-Material 3D-Printed Silicone Vocal Fold Models

69

9.20

04.

44

24.4

429

.44

34.8

9

8.19

0

10.00

32.50

42.50

21.25

47.955.45MM ACRYLIC

W/ HOLES THRU ALL

112°

A A

B B

2

2

1

1

ACRYLICSHEET 7 OF 7SCALE: 1:1

DRAW N BY:

ASIZE: M ATERIAL:

Acrylic Support:Bottom Plate

TITLE:

DIMENSIONS ARE IN MILLIMETERS

Clayton Young

Page 80: Multi-Material 3D-Printed Silicone Vocal Fold Models

70

8

2

4

57

1

36

ITEM NO. PART NUMBER

QTY

.

1 Syringe Adapter Front 12 Syringe Adapter Back 13 2.5M Socket Head Bolt 25mm 24 2.5M Hex Nut 25 2.5M Socket Head Bolt 15mm 16 8-32 Hex Nut 27 5ml Glass Syringe Plunger 1

8Haydon-43F4P-2.33-6-12-M3_43000_Non_Captive_Screw Nema17

1

A A

B B

2

2

1

1

PLASHEET 1 OF 1SCALE: 1:1

DRAW N BY:

ASIZE: M ATERIAL:

5ml glass NEMA17 AdapterTITLE:

DIMENSIONS ARE IN MILLIMETERS

Clayton Young

Page 81: Multi-Material 3D-Printed Silicone Vocal Fold Models

71

R14.00

R2.05 THRU

20.70

R5.40 1.00AA

12.85

14.00

2.50 THRUM2.5 THREAD

2 X 3.40 THRUM2.5 HEX NUT 3.855.35

3.20

2 X 3.40 THRU6.70 3.85

2.75

R2.05 THRU8-32 HEX NUT 3.18

8.74

1.002.02

3.18

SECTION A-ACAVITY OF 5MLGLASS SYRINGE

A A

B B

2

2

1

1

PLASHEET 1 OF 1SCALE: 2:1

DRAW N BY:

ASIZE: M ATERIAL:

5ml Glass Syringe AdapterTITLE:

DIMENSIONS ARE IN MILLIMETERS

Clayton Young

Page 82: Multi-Material 3D-Printed Silicone Vocal Fold Models

72

21.05

0.81R2.24

0.88

4.25

A A

B B

2

2

1

1

PP Plast icSHEET 1 OF 1SCALE: 4:1

DRAW N BY:

ASIZE: M ATERIAL:

Cut Dispensing Tip with LuerLock Connection

TITLE:

DIMENSIONS ARE IN MILLIMETERS

Clayton Young

Page 83: Multi-Material 3D-Printed Silicone Vocal Fold Models

73

Page 84: Multi-Material 3D-Printed Silicone Vocal Fold Models

74

APPENDIX C. ANSYS ADPL CODE

1 FINISH ! Make sure we are at BEGIN level 2 /NOPR ! Suppress printing of UNDO process 3 /PMACRO ! Echo following commands to log 4 /CLEAR,NOSTART ! Clear model 5 /PREP7 6 /VIEW,1,1,1,1 7 /ANG,1 8 /REP,FAST 9 *SET,X_LOC , 24 10 *SET,RadCyl,1.5 11 *SET,rad_bound,0.1 12 *SET,RadRef,RadCyl+rad_bound 13 *SET,NumOfSlices, 2 14 15 ExLow = 0.0015 16 ExHigh = 0.012 17 18 !ExLow = 0.0022397 19 !ExHigh = 0.0134172 20 21 22 !Loading Conditions 23 *SET,PENETRATION_DEPTH,-2 24 *SET,MaxSteps,40 25 26 27 28 !* 29 ET,1,SOLID187 30 !* 31 MPTEMP,,,,,,,, 32 MPTEMP,1,0 33 MPDATA,EX,1,,ExLow 34 MPDATA,PRXY,1,,0.49 35 MPTEMP,,,,,,,, 36 MPTEMP,1,0 37 MPDATA,EX,2,,ExHigh 38 MPDATA,PRXY,2,,0.49 39 MPTEMP,,,,,,,, 40 MPTEMP,1,0 41 MPDATA,EX,3,,60000000 42 MPDATA,PRXY,3,,0.3 43 44

Page 85: Multi-Material 3D-Printed Silicone Vocal Fold Models

75

45 !!!!!Define all the other materials !!!!! 46 47 *Do,MatlNum,1,NumOfSlices,1 48 49 stiffness = ExLow + (MatlNum-1)*(ExHigh-ExLow)/(NumOfSlices-1) 50 MPTEMP,1,0 51 MPDATA,EX,MatlNum+3,,stiffness 52 MPDATA,PRXY,MatlNum+3,,0.49 53 *ENDDO 54 !!!!!Other Material's Defined!!!!!!!!! 55 56 57 !Create Volumes 58 59 !Save Cylinder Number 60 !!Create Cylinder of penetration 61 CYL4,0,0,RadCyl, , , ,2.5 62 63 *Do,BlockNum,0,NumOfSlices-1,1 64 blockWidth = 33/NumOfSlices 65 BLOCK,BlockNum*blockWidth,(blockNum+1)*blockWidth,0,10,0,10, 66 *ENDDO 67 68 !Glue Volumes Together 69 *Do,BlockNum,NumOfSlices+1,3,-1 70 VGLUE,BlockNum,BlockNum-1 71 *ENDDO 72 73 !!!ASSIGN MAT'L PROPS!!!! - not perfectly Parametric!!!!!!! 74 *Do,BlockNum,2,NumofSlices,1 75 allsel 76 vsel,s,,,BlockNum+2 77 VATT,BlockNum+3,,1,0 !Remember to offset mat'l number by

3 so we don't make anything steel by accident 78 *ENDDO 79 80 ALLSEL 81 82 !!!!!!!!!!!!Assign the very last of the volume mat'l props 83 vsel,s,,,2 84 VATT,4,,1,0 85 ALLSEL 86 87 !Delete Cylinder 88 VDELE,1, , ,1 89 90 91 92 !Move working plane 93 wpoffs,X_LOC,5,10 !Move Working Plane to us 94 CSYS,4 !Lock coord system 95 96 !!Create Cylinder of penetration 97 !CYL4,0,0,RadCyl, , , ,2.5 98 !VSEL,S,,,1 !Select Cylinder 99 !VATT,3,,1,0 !Material Assignment 100

Page 86: Multi-Material 3D-Printed Silicone Vocal Fold Models

76

101 !!Hide Cylinder 102 !VSEL,INVE 103 !VPLOT 104 !ALLSEL 105 106 107 !Lock in the view perspective 108 /USER,1 109 /VIEW,1,1,1,1 110 /ANG,1 111 /REP,FAST 112 113 ! Mesh CUBES!!!! 114 ESIZE,1,0 !Generally big everywhere 115 vmesh,ALL 116 117 118 !Sphyrical Coord System 119 WPSTYL,,,,,,2 120 !CSWPLA,11,2 !Sphyrical coord system 121 nsel,s,loc,x,0,RadRef*3 !Select Nodes around the Target Area 122 123 ! Refine Nodes in a broad sphere around 124 nrefine,all,,,1,1,1,1 125 126 allsel !Second, tighter refinement 127 nsel,s,loc,x,0,RadRef*2 !Select Nodes around the Target Area 128 nrefine,all,,,1,1,1,1 129 130 !Third, surface refinement (for contact) 131 WPSTYL,,,,,,1 !Cylindrical 132 allsel 133 nsel,s,loc,x,0,RadRef+rad_bound 134 nsel,r,loc,z,-0.4,0.1 135 nrefine,all,,,1,1,1,1 136 137 !Fourth, surface refinement (for edge contact) 138 !allsel 139 !nsel,s,loc,x,RadCyl-0.1,RadCyl+0.1 140 !nsel,r,loc,z,-0.04,0.1 141 !nrefine,all,,,1,1,1,1 142 143 !Fifth, edge Refinement 144 allsel 145 !nsel,s,loc,x,RadCyl-0.03,RadCyl+0.03 146 !nsel,r,loc,z,-0.001,0.1 147 !nrefine,all,,,1,1,1,1 148 149 !nplot 150 151 !WPSTYL,,,,,,0 !Back to cartesian 152 153 !Mesh the cylendar 154 !allsel 155 !ESIZE,1 156 157 !Refine at the nose of the cylinder

Page 87: Multi-Material 3D-Printed Silicone Vocal Fold Models

77

158 !asel,s,,,1 159 !lsla 160 !AESIZE,ALL,.3, !The area is small-ish 161 !LESIZE,ALL,.09, !The edges where contact gets dicey is refined further 162 163 !vmesh,1 164 165 166 !ALLSEL 167 168 169 170 171 !Define Displacements 172 173 174 !Define Load Steps 175 *set,LoadStepParam,1 176 *Do,LoadStepParam,1,MaxSteps,1 177 AllSEL 178 !Fix the cubes in place 179 180 WPSTYL,,,,,,0 !Back to cartesian 181 wpoffs,-1*X_LOC,-5,-10 !Move Working Plane to us 182 183 184 185 !Select all nodes on back plane 186 nsel,s,loc,z,-1,0 187 D,ALL,ALL,0 188 189 AllSEL 190 191 192 wpoffs,X_LOC,5,10 !Move Working Plane to indenter 193 WPSTYL,,,,,,2 !Back to cylidrical 194 195 !Select Circular Nodes for indentation 196 allsel 197 !asel,s,,,8 198 !asel,a,,,14 199 !lsla,s !Select all lines associated with areas 200 !KSLL,S !Select Keypoints on the lines 201 !nsla,s !Select nodes from current area selection 202 !nsll,a !Add to node selection nodes from current line

selection 203 !nslK,a !Add to node selection nodes from current

keypoint selection 204 205 nsel,s,loc,x,0,RadCyl 206 nsel,r,loc,z,0,1 207 208 209 210 211 !DA,2,UZ,PENETRATION_DEPTH*LoadStepParam/MaxSteps 212 D,all,UX,0

Page 88: Multi-Material 3D-Printed Silicone Vocal Fold Models

78

213 D,all,UY,0 214 D,all,UZ,PENETRATION_DEPTH*LoadStepParam/MaxSteps, 215 ALLSEL !Necessary to allow all nodes to be selected 216 NCNV,2 217 LSWRITE,LoadStepParam, 218 *ENDDO 219 220 FINISH 221 222 223 224 225 226 !!!Solve!!! 227 /SOL 228 !NLGEOM, ON !!! BE SURE TO TURN THIS ON!!!! 229 230 !/STATUS,SOLU 231 LSSOLVE,1,LoadStepParam,1, !USE THIS - to run through all load steps 232 !LSSOLVE,1,3,1, 233 234 FINISH 235 236 237 238 239 240 !!! DISPLAY RESULTS !!!!! 241 /POST1 242 !SET,LAST 243 !allsel 244 245 !WPSTYL,,,,,,0 !Back to cartesian 246 !nsel,s,loc,x,-100,0 247 !esln 248 !/DSCALE,ALL,1.0 249 !/EDGE,1,0,45 250 !/GLINE,1,-1 251 !/REPLOT 252 !PLNSOL, U,SUM, 0,1.0 253 254 AllSEL 255 256 !!! OUTPUT DATA !!!!! 257 wpoffs,-1*X_LOC,-5,-10 !Move Working Plane to cubes 258 !Select all nodes on back of cube 259 nsel,s,loc,z,-1,0 260 261 262 263 !!!Saving data to files!!!! 264 265 *Get,NoNodes,node,0,count !Get the number of nodes in the selected set 266 267 *Dim, MyNodeNoArray,array, NoNodes !Array used to save nodes No. 268 *Dim, MyNodeFX,array, NoNodes !Array used to save nodes FX 269 *Dim, MyNodeFY,array, NoNodes !Array used to save nodes FY

Page 89: Multi-Material 3D-Printed Silicone Vocal Fold Models

79

270 *Dim, MyNodeFz,array, NoNodes !Array used to save nodes FZ 271 272 SET,first 273 *do,load_placement,1,LoadStepParam,1 !USE THIS FOR ALL OF THE LOAD

STEPS 274 !*do,load_placement,1,3,1 275 276 set,load_placement 277 278 279 SelNode=0 !Counter to save the selected node number 280 281 *Do,i,1,NoNodes 282 NodeNo=NDNEXT(SelNode) !NDNEXT(N) Next selected node having a node

number greater than N. 283 MyNodeNoArray(i)= NodeNo 284 *get,MyNodeFX(i),node,NodeNo,RF,FX 285 *get,MyNodeFy(i),node,NodeNo,RF,FY 286 *get,MyNodeFz(i),node,NodeNo,RF,FZ 287 SelNode = NodeNo 288 *Enddo 289 290 291 *cfopen, node_Dist%%X_LOC%%_LS%%load_placement%%,txt !Create a

txt file called "node_data_file" 292 *vwrite,MyNodeNoArray(1),MyNodeFX(1),MyNodeFY(1),MyNodeFZ(1) 293 (1F16.0, 3F16.12) 294 *cfclos 295 296 *enddo 297 298 allsel 299 300 !!!Comments Below are FYI's 301 !asel,s,,,1 !Select areas 302 !aplot 303 !lsla,s !Select all lines associated with areas 304 !KSLL,S 305 !nsla,s !Select nodes from current area selection 306 !nsll,a !Add to node selection nodes from current line

selection 307 !nslK,a 308 !PRNLD, , ,ALL 309 310 311 !allsel 312 !asel,s,,,13 !Select areas 313 !asel,a,,,7 !Add any additional areas 314 !!aplot 315 !lsla,s !Select all lines associated with areas 316 !KSLL,S 317 !nsla,s !Select nodes from current area selection 318 !nsll,a !Add to node selection nodes from current line

selection 319 !nslK,a 320 321 /EXIT

Page 90: Multi-Material 3D-Printed Silicone Vocal Fold Models

80

APPENDIX D. MATLAB CODE

D.1 Multi-Material Slicer

D.1.1 Multi_Material_Slicer_v12.m

The following code is a multi-material slicer in which STL files are imported and a g-

code file is exported. Before execution settings should be adjusted as commented in the code.

During execution, the user is asked to select STL files for import. The created g-code file is

saved in the same folder as the code. At the end of the code, a GUI is initialized which allows the

user to review the g-code with a layer-by-layer animation plot as well as corresponding extrusion

values. This is the main code and all other code in this section will be executed by this code.

1 % Filename: Multi_Material_Slicer_v12.m 2 % Written by: Clayton Young 3 % For: Thomson Lab, BYU 4 % Date: 4/13/2022 5 6 %Script used to create Gcode for multi-material silicone 3D printer. 7 %Input multiple STL files, assign material properties, and choose print 8 %settings. 9 10 uifigure('HandleVisibility', 'on') 11 clear; clc; close all; close all hidden; 12 13 %% Set tool/material ratios: tool = Nx2. N is the number of STL files. 14 15 % For multi-material EPI model: 16 17 % Material Model for Vertical Stiffness Gradient EPI Model 18 materialModelThinner = [2, 3.2937, 3.3924, 3.5491, 4, 6, 8, 10]; %1:Ratio

Momentive Silicone 19 materialModelModulus = [27.15, 10.943, 10.845, 10.295, 7.59, 4.18, 2.13,

1]; %kPa Single-Mixed-Hybrid Material 2nd Printer 4/2/2021 20

Page 91: Multi-Material 3D-Printed Silicone Vocal Fold Models

81

21 % Assign extruder material properties 22 extruderAModulus = 12; %kPa 23 extruderBModulus = 1.5; %kPa 24 25 % Assign VF model material properties 26 body = extruderAModulus; %kPa 27 ligament = 2; %kPa, [] if no ligament layer 28 coverLow = 1.5; %kPa Medial-Superior VF stiffness (Geng 2016) 29 VSGM = 1; % Vertical Stiffness Gradient Multiplier 30 coverHigh = coverLow*VSGM; %kPa Table 1 Chhetri 2014, Difference in Human

inferior to superior ~2kPa 31 32 numCover = 1; %Number of sections in cover layer cad resolution 33 numVF = 1; % Number of vocal folds being printed at once. Typically just

one. 34 35 if numCover == 1 && VSGM == 1 % For single material cover layer 36 cover = coverLow; 37 else % For multi-material cover layer with a vertical stiffness gradient 38 cover = coverHigh:-(coverHigh-coverLow)/(numCover-1):coverLow; 39 end 40 41 desiredSTLModulus = [body,ligament,cover]; %Should be in order of STL

input 42 tool = zeros([length(desiredSTLModulus),2]); %create variable to store

tool 43 44 desiredSTLThinnerRatio =

interp1(materialModelModulus,materialModelThinner,desiredSTLModulus,'linear'); %1:? Momentive to Silicone Thinner

45 extruderARatio = interp1(materialModelModulus,materialModelThinner,extruderAModulus,'linear'); %1:? Momentive to Silicone Thinner

46 extruderBRatio = interp1(materialModelModulus,materialModelThinner,extruderBModulus,'linear'); %1:? Momentive to Silicone Thinner

47 48 % Solve for ratios of ExtruderA and ExtruderB for correct final stiffness

of each STL file. 49 for i = 1:length(desiredSTLThinnerRatio) 50 eq1 = [1 1; extruderARatio extruderBRatio]; % Governing Equations Aa

+Bb = Cc, A+B = C, C = 1 51 eq2 = [1; desiredSTLThinnerRatio(i)]; 52 tool(i,:) = lsqnonneg(eq1,eq2); %Solve Matrices for percent ratio of A

and B extruders 53 idxG1 = find(tool(i,:) > 1); %Find if any tool assignment that is

greater than 1. Only possible if STL is assigned material property higher than available.

54 if ~isnan(idxG1) 55 tool(i,idxG1) = 1; 56 end 57 end 58 59 % If more than one VF, double the length of the tool. 60 if numVF > 1 61 toolTemp = zeros([length(tool(:,1))*2,2]); 62 for i = 1:length(tool)

Page 92: Multi-Material 3D-Printed Silicone Vocal Fold Models

82

63 toolTemp(i*2,:) = tool(i,:); 64 toolTemp(i*2-1,:) = tool(i,:); 65 end 66 tool = toolTemp; 67 end 68 69 %} 70 71 % For 3 layer EPI model: 72 %{ 73 tool(1,1) = 100/100; %Extruder A Body 74 tool(2,1) = 100/100; %Mixed Ligament 75 tool(3,1) = 100/100; %Extruder B 1:1 Cover 76 tool(:,2) = 1-tool(:,1); 77 %} 78 79 %For 10mm cube: 80 81 %{ 82 % Assign material according to Momentive to Silicone Thinner Ratios in

Extruders A and B. 83 extruderARatio = 3.2093; %1:? Momentive to Silicone Thinner 84 extruderBRatio = 9.115; %1:? Momentive to Silicone Thinner 85 materialThinnerRatio = 3.2093; %1:? Desired Momentive to Silicone Thinner 86 eq1 = [extruderARatio extruderBRatio; 1 1]; % Governing Equations Aa +Bb =

Cc, A+B = C, C = 1 87 eq2 = [materialThinnerRatio; 1]; 88 tool = lsqnonneg(eq1,eq2)'; %Solve Matrices for percent ratio of A and B

extruders 89 %} 90 91 % For retraction testing: 92 %{ 93 tool(1,1) = 0/100; 94 tool(2,1) = 100/100; 95 tool(3,1) = 0/100; 96 tool(4,1) = 100/100; 97 tool(5,1) = 0/100; 98 tool(6,1) = 100/100; 99 tool(7,1) = 0/100; 100 tool(8,1) = 100/100; 101 tool(9,1) = 0/100; 102 tool(10,1) = 100/100; 103 tool(11,1) = 0/100; 104 tool(12,1) = 100/100; 105 tool(13,1) = 0/100; 106 tool(14,1) = 100/100; 107 tool(15,1) = 0/100; 108 tool(16) = 100/100; 109 110 tool(:,2) = 1-tool(:,1); 111 %} 112 113 % For cube side by side: 114 %{ 115 tool(1,1) = 0/100; 116 tool(2,1) = 100/100;

Page 93: Multi-Material 3D-Printed Silicone Vocal Fold Models

83

117 118 tool(:,2) = 1-tool(:,1); 119 %} 120 121 % For 33x10mm gradient: 122 %{ 123 numGradient = 11; 124 for i = 1:numGradient 125 tool(i,1) = (i-1)/(numGradient-1); 126 end 127 tool(:,2) = 1-tool(:,1); 128 %} 129 130 %% Set Print Settings 131 132 % Set retraction distance: 133 retractA = 0.26; % mm (0.11 to 0.26) 134 retractB = 0.20; % mm (0.11 to 0.26) 135 136 % Printer Hardware Settings 137 syringe = 11.68; % (mm) syringe ID diameter 5mL glass 138 % syringe = 8.66; % (mm) alternative syringe diameter 3mL plastic Care

Touch 139 % nozzleID = 0.229; % (mm) alternative ID nozzle diameter 27 gauge

needle https://www.howardelectronics.com/industrial-needles/stainless-steel-blunt-needles/blunt-needles/jensen-global-27-gauge-blunt-stainless-steel-needle/

140 nozzleID = 0.21; % (mm) ID nozzle diameter 27 gauge needle wikipedia 141 nozzleOD = 0.406; % (mm) OD nozzle diameter 27 gauge needle

https://www.howardelectronics.com/industrial-needles/stainless-steel-blunt-needles/blunt-needles/jensen-global-27-gauge-blunt-stainless-steel-needle/

142 % nozzleID = 0.305; % (mm) ID nozzle diameter 25 gauge needle https://www.howardelectronics.com/industrial-needles/stainless-steel-blunt-needles/blunt-needles/jensen-global-25-gauge-blunt-stainless-steel-needle/

143 % nozzleOD = 0.508; % (mm) OD nozzle diameter 25 gauge needle https://www.howardelectronics.com/industrial-needles/stainless-steel-blunt-needles/blunt-needles/jensen-global-25-gauge-blunt-stainless-steel-needle/

144 145 % Print Infill Settings 146 angle = -40; % (degrees) 0 for retraction testing 45 for printing. For

X-up VF 40 deg. 147 printSpeed = 10*120; % converted (mm/s) to gcode value (mm/min)(600 to

1800) 148 percentInfill = 0.6; % decimal percent: 1.0 for retraction testing. 0.6

for printing. 149 EM = 1; % (percent/100) extrusion multiplier 150 layerheight = nozzleID; % layerheight is nozzle diameter 151 offset = nozzleOD; % (mm) distance between needles. See offset section

below to set offset mode 152 threshold = 0; % (mm) distance between points at which retraction

happens 153 154 % Extrusion Calculations

Page 94: Multi-Material 3D-Printed Silicone Vocal Fold Models

84

155 actNozzleArea = (pi*nozzleID^2)/4; % actual needle cross sectional area (circle volume calc)

156 nozzleArea = nozzleID^2; % needed cross sectional area per line (square volume calc per line)

157 syringeArea = (pi*syringe^2)/4; % syringe cross sectional area 158 159 %% File Selection 160 161 file = 1; 162 i = 1; 163 filter = '*.STL'; 164 Multiselect = 'on'; 165 file = uigetfile('*.STL',... 166 'Select One or More Files', ... 167 'MultiSelect', 'on'); 168 if ischar(file) 169 temp = read_binary_stl_file(file); 170 obj{1} = temp; 171 else 172 for i = 1:length(file) 173 obj{i} = read_binary_stl_file(file{i}); 174 end 175 end 176 177 %% Rotate STL 178 179 for i = 1:length(obj) 180 obj{i} = orient_stl(obj{i},'x'); %'x' is default. Choose 'y' or 'z' 181 end 182 183 %% Find max and min Z of STL's and create layers 184 185 for i = 1:length(obj) 186 if i == 1 187 min_z = min([obj{i}(:,3); obj{i}(:,6);obj{i}(:,9)]); 188 max_z = max([obj{i}(:,3); obj{i}(:,6);obj{i}(:,9)]); 189 else 190 min_z_temp = min([obj{i}(:,3); obj{i}(:,6);obj{i}(:,9)]); 191 max_z_temp = max([obj{i}(:,3); obj{i}(:,6);obj{i}(:,9)]); 192 if min_z_temp < min_z 193 min_z = min_z_temp; 194 end 195 if max_z_temp > max_z 196 max_z = max_z_temp; 197 end 198 end 199 end 200 201 layers = min_z:layerheight:max_z; 202 203 %% Plot combined STL files 204 205 fig1 = figure('Units','inches'); 206 fig1.Position = [2,2,16,6]; 207 for i = 1:length(obj) 208 [movelist{i},z_slices{i}] = slice_stl_create_path(obj{i},layers); 209 hold on

Page 95: Multi-Material 3D-Printed Silicone Vocal Fold Models

85

210 figure(1) 211 subplot(1,3,1) 212 axis tight 213 plot_slices(movelist{i},z_slices{i}, 0.0000) 214 movelist{1,i}(1) = []; % remove first movelist 215 z_slices{1,i}(1) = []; % remove first slice 216 z_slices{1,i} = z_slices{1,i}(1:length(movelist{1,i})); 217 end 218 hold off 219 view(3) % ISO view of model 220 221 %% Combine STL slices by layer into "movelist" 222 223 % Movelist is the XY coordinates of the polygons on each layer. 224 lh_max = max([z_slices{:}]); % max layer height 225 lh_min = min([z_slices{:}]); % min layer height 226 k = 1; 227 for i = lh_min:layerheight:lh_max 228 nA = numel(z_slices); 229 Match = cell(nA, 3); % Pre-allocate 230 iMatch = 0; % reset 231 for iA = 1:nA 232 [i1, i2] = find(abs([z_slices{iA}] - i) < 0.0001); 233 if ~isempty(i1) 234 iMatch = iMatch + 1; 235 Match{iMatch, 1} = iA; % Index of the cell 236 Match{iMatch, 2} = i1; % Row and column indices 237 Match{iMatch, 3} = i2; 238 end 239 end 240 241 Match = Match(1:iMatch, :); % Crop unused elements 242 243 for j = 1:length(Match(:,1)) 244 xys = [movelist{Match{j,1}}{Match{j,3}},

Match{j,1}*ones(length(movelist{Match{j,1}}{Match{j,3}}),1)]; 245 idxNaN = find(isnan(xys(:,1))); 246 if length(idxNaN) > 1 247 xys = [NaN, NaN, NaN; xys]; 248 idxNaN = find(isnan(xys(:,1))); 249 for n = 1:length(idxNaN)-1 250 x = xys(idxNaN(n)+1:idxNaN(n+1),1); 251 y = xys(idxNaN(n)+1:idxNaN(n+1),2); 252 253 % check if movelist is CCW 254 for m = 1:length(x)-1 255 if m ~= length(xys(:,1))-1 256 edge(m) = (x(m+1) - x(m)) * (y(m) + y(m+1)); 257 else 258 edge(m) = (x(1) - x(m)) * (y(m) + y(1)); 259 end 260 end 261 if sum(edge) < 0 262 CCW = 1; 263 else 264 CCW = 0; 265 end

Page 96: Multi-Material 3D-Printed Silicone Vocal Fold Models

86

266 267 % Rotate polygon direction if needed. 268 if CCW == 0 && n == 1 269 x(1:end-1) = flip(x(1:end-1)); 270 y(1:end-1) = flip(y(1:end-1)); 271 xys(idxNaN(n)+1:idxNaN(n+1),1) = x; 272 xys(idxNaN(n)+1:idxNaN(n+1),2) = y; 273 end 274 if CCW == 1 && n > 1 275 x(1:end-1) = flip(x(1:end-1)); 276 y(1:end-1) = flip(y(1:end-1)); 277 xys(idxNaN(n)+1:idxNaN(n+1),1) = x; 278 xys(idxNaN(n)+1:idxNaN(n+1),2) = y; 279 end 280 end 281 xys = xys(2:end,:); 282 end 283 284 if j > 1 285 movelist_comb(k) = {[movelist_comb{k}; xys]}; 286 else 287 movelist_comb(k) = {xys}; 288 end 289 end 290 k = k + 1; 291 end 292 293 %% Find translation needed to move STL to origin for rotation 294 295 max_space = 0; 296 min_space = 0; 297 for i = 1:length(movelist_comb) % Sort through each layer and find the

x- and y-max and min for the entire print 298 max_x = max(movelist_comb{i}(:,1)); 299 min_x = min(movelist_comb{i}(:,1)); 300 max_y = max(movelist_comb{i}(:,2)); 301 min_y = min(movelist_comb{i}(:,2)); 302 if i == 1 303 max_spacex = max_x; 304 min_spacex = min_x; 305 max_spacey = max_y; 306 min_spacey = min_y; 307 end 308 if max_x > max_spacex 309 max_spacex = max_x; 310 end 311 if max_y > max_spacey 312 max_spacey = max_y; 313 end 314 if min_x < min_spacex 315 min_spacex = min_x; 316 end 317 if min_y < min_spacey 318 min_spacey = min_y; 319 end 320 end 321 spacey = (max_spacey - min_spacey)/2 + min_spacey;

Page 97: Multi-Material 3D-Printed Silicone Vocal Fold Models

87

322 spacex = (max_spacex - min_spacex)/2 + min_spacex; 323 324 %% Rotate and translate print 325 326 ca = cosd(angle); sa = sind(angle); % cosine of angle, sine of angle 327 Rot = [ca -sa 0; sa ca 0; 0 0 1]; % rotation matrix 328 Tpo = [1 0 -spacex; 0 1 -spacey; 0 0 1]; % translation matrix from

center of part to origin 329 Top = [1 0 spacex; 0 1 spacey; 0 0 1]; % translation matrix from origin

to the center of part 330 331 movelist_rot = movelist_comb; 332 for i = 1: length(movelist_rot) 333 movelist_rot{i}(:,:) = (Top*Rot*Tpo*[movelist_rot{i}(:,1:2),

ones([length(movelist_rot{i}(:,1)),1])]')'; % translate, rotate, and translate movelist_comb to creat movelist_rot

334 movelist_rot{i}(:,:) = [movelist_rot{i}(:,1:2), movelist_comb{i}(:,3)]; % keep STL number data from original movelist_comb

335 end 336 337 %% Slicer 338 339 % initialize variables 340 allPath = zeros([1 9]); % variable that holds all values for g-code 341 count = 1; % count each layer 342 hatchDirection = 1; % toggle to alternate hatch diretion every other

layer 343 sort1 = 2; % alternate column 344 sort2 = 1; 345 spacer = 0.1; % buffer for max and min x- and y-data 346 cornerStart = 1; % initialize starting corner 347 allDistance = 0; % total distance traversed 348 349 for l = 1:length(movelist_rot) 350 %% Dual needle offset selection (three offsets to choose from) 351 352 % Offset last STL file 353 %{ 354 idx = find(movelist_rot{l}(:,3) == length(tool)); % find points of

the last material to offset by OD needle 355 movelist_rot{l}(idx,1) = movelist_rot{l}(idx,1) + offset %offset in

x-direction by OD needle 356 %} 357 358 % Offset sections that have more than 50% B-Extruder 359 %{ 360 idx = find(tool(movelist_rot{l}(:,3)) < 0.5); %Find layers that are

more than 50% B-Extruder 361 movelist_rot{l}(idx,1) = movelist_rot{l}(idx,1) + offset; %Offset

full amount by those that are more than 50% B-Extruder 362 %} 363 364 % Offset sections by percent that it contains B-Extruder 365 366 idxNAN = find(~isnan(movelist_rot{l}(:,2))); %Find layers that are

not NAN

Page 98: Multi-Material 3D-Printed Silicone Vocal Fold Models

88

367 movelist_rot{l}(idxNAN,1) = movelist_rot{l}(idxNAN,1) + offset*(1-tool(movelist_rot{l}(idxNAN,3),1)); %Offset by percent of B-Extruder

368 %} 369 370 %% Create hatch to slice current layer 371 372 % x- y-max and min for current layer +/- spacer 373 max_x = max(movelist_rot{l}(:,1)) + spacer; 374 min_x = min(movelist_rot{l}(:,1)) - spacer; 375 max_y = max(movelist_rot{l}(:,2)) + spacer; 376 min_y = min(movelist_rot{l}(:,2)) - spacer; 377 378 % x- y-max for hatch height/width divisible by

nozzleID/PercentInfill 379 max_hatch_y = min_y + (nozzleID/percentInfill)*ceil((max_y-

min_y)/(nozzleID/percentInfill)); 380 max_hatch_x = min_x + (nozzleID/percentInfill)*ceil((max_x-

min_x)/(nozzleID/percentInfill)); 381 382 % hatch x- and y-values 383 hatchy = linspace(min_y,max_hatch_y,(max_hatch_y -

min_y)/(nozzleID/percentInfill) + 1); 384 hatchx = linspace(min_x,max_hatch_x,(max_hatch_x -

min_x)/(nozzleID/percentInfill) + 1); 385 386 alt = 1; 387 clear HatchXY 388 if hatchDirection == 1 389 for i = 1:length(hatchy) 390 insert = [min_x,hatchy(i); max_x,hatchy(i)]; 391 if alt == -1 392 insert = flip(insert,1); 393 end 394 HatchXY(i+2*(i-1):i+2*(i-1)+1,:) = insert; 395 alt = alt*-1; 396 end 397 hatchDirection = hatchDirection*-1; 398 elseif hatchDirection == -1 399 for i = 1:length(hatchx) 400 insert = [hatchx(i),min_y; hatchx(i),max_y]; 401 if alt == -1 402 insert = flip(insert,1); 403 end 404 HatchXY(i+2*(i-1):i+2*(i-1)+1,:) = insert; 405 alt = alt*-1; 406 end 407 hatchDirection = hatchDirection*-1; 408 end 409 HatchXY = HatchXY(HatchXY(:,1) ~= 0,:); 410 411 %% Plot hatch with original polygon layer orientation and rotated

polygon orientation 412 figure(1) 413 subplot(1,3,2) 414 axis equal

Page 99: Multi-Material 3D-Printed Silicone Vocal Fold Models

89

415 plot(HatchXY(:,1),HatchXY(:,2),movelist_comb{l}(:,1),movelist_comb{l}(:,2),movelist_rot{l}(:,1),movelist_rot{l}(:,2))

416 417 %% Find intersection of hatch and rotated polygons 418 419 [xi,yi] =

polyxpoly(HatchXY(:,1),HatchXY(:,2),movelist_rot{l}(:,1),movelist_rot{l}(:,2));

420 421 intersection = [xi,yi,zeros(length(xi),1)]; % Combine to one 422 423 %% Sort the intersections in order to create path 424 425 j = 1; 426 i = 1; 427 428 [~,int_idx] = sort(intersection(:,sort1)); % Find idx to sort by x-

values 429 intersection = intersection(int_idx,:); % Sort by x-values 430 431 while i < length(intersection(:,1)) 432 idx_check = find(abs((intersection(i,sort1) -

intersection(:,sort1))) < 0.00001); % find all matching x/y-values 433 srt = intersection(idx_check,:); 434 435 if j == 1 436 [~,idx] = sort(srt(:,sort2)); % sort by other axis column 437 j = j*-1; 438 elseif j == -1 439 [~,idx] = sort(srt(:,sort2),'descend'); % sort just the

first column 440 j = j*-1; 441 end 442 443 sorted = srt(idx,:); % sort the whole matrix using the sort

indices 444 445 intersection(idx_check,:) = sorted; 446 i = i + length(srt(:,1)); 447 end 448 449 if sort2 == 1 450 sort2 = 2; 451 else 452 sort2 = 1; 453 end 454 455 if sort1 == 2 456 sort1 = 1; 457 else 458 sort1 = 2; 459 end 460 461 %% Remove repeat intersections if two polygons share a line 462 ii = 1; 463 while ii < length(intersection(:,1))

Page 100: Multi-Material 3D-Printed Silicone Vocal Fold Models

90

464 if abs(intersection(ii,1) - intersection(ii+1,1)) < 0.0001 && abs(intersection(ii,2) - intersection(ii+1,2)) < 0.0001

465 intersection = [intersection(1:ii,:); intersection(ii+2:end,:)];

466 else 467 ii = ii + 1; 468 end 469 end 470 471 %% Plot intersections in order to show path 472 figure(1) 473 subplot(1,3,3) 474 axis equal 475 plot(intersection(:,1),intersection(:,2)) 476 477 % Create path variable for current layer 478 path = intersection(:,1:2); % path = [x,y] 479 480 %% Find closest corner to start at or rotate corner 481 482 closestCorner = 0; 483 rotateCorner = 1; 484 if rotateCorner == 1 && l > 1 485 if cornerStart == 1 486 cornerStart = cornerStart + 1; 487 elseif cornerStart == 2 488 cornerStart = cornerStart + 1; 489 elseif cornerStart == 3 490 path = flip(path); 491 cornerStart = cornerStart + 1; 492 elseif cornerStart == 4 493 path = flip(path); 494 cornerStart = 1; 495 end 496 elseif closestCorner == 1 && l > 1 497 front = sqrt((path(1,1) - allPath(end-1,1))^2 + (path(1,2) -

allPath(end-1,2))^2); 498 back = sqrt((path(end,1) - allPath(end-1,1))^2 + (path(end,2) -

allPath(end-1,2))^2); 499 if back < front 500 path = flip(path); 501 end 502 end 503 504 505 %% Insert Perimeter (old code, may need updating) 506 507 yesPerimeter = 0; 508 if yesPerimeter == 1 509 510 % Import STL that is all STL's combined 511 if l == 1 512 file_perimeter = 1; 513 i = 1; 514 filter = '*.STL'; 515 % Multiselect = 'on'; 516 file_perimeter = uigetfile('*.STL',...

Page 101: Multi-Material 3D-Printed Silicone Vocal Fold Models

91

517 'Select One or More Files', ... 518 'MultiSelect', 'on'); 519 if ischar(file_perimeter) 520 temp = read_binary_stl_file(file_perimeter); 521 obj_p{1} = temp; 522 else 523 for i = 1:length(file_perimeter) 524 obj_p = read_binary_stl_file(file_perimeter{i}); 525 end 526 end 527 528 for i = 1:length(obj_p) 529 [movelist{i},z_slices{i}] =

slice_stl_create_path(obj{i},layers); 530 hold on 531 figure(4) 532 axis('equal') 533 plot_slices(movelist{i},z_slices{i}, 0.0000) 534 movelist{1,i}(1) = []; % remove first movelist 535 z_slices{1,i}(1) = []; % remove first slice 536 z_slices{1,i} = z_slices{1,i}(1:length(movelist{1,i})); 537 538 end 539 end 540 hold off 541 542 % Rotate perimeter 543 movelist_prot = (Top*Rot*Tpo*[movelist_p{1}{1,l},

ones([length(movelist_p{1}{:,1}),1])]')'; 544 545 Perim = movelist_prot(:,1:2); 546 Xperim = Perim(1:end-1,1); 547 Yperim = Perim(1:end-1,2); 548 549 % Step 4: Flip order (CW & CCW) every other layer: 550 if mod(l,2) == 0 551 order =

linspace(length(Xperim(:,1)),1,length(Xperim(:,1))); 552 else 553 order =

linspace(1,length(Xperim(:,1)),length(Xperim(:,1))); 554 end 555 556 % Step 5: Reorder the coordinates: 557 Xperim = Xperim(order); 558 Yperim = Yperim(order); 559 560 561 % Step 6: Close loop 562 Xperim = [Xperim; Xperim(1)]; 563 Yperim = [Yperim; Yperim(1)]; 564 565 i = 1; 566 while i < length(Xperim(:,1))-1 567 for j = 1:length(movelist_rot{l}(:,1))

Page 102: Multi-Material 3D-Printed Silicone Vocal Fold Models

92

568 R = IsPointWithinLine(Xperim(i),Yperim(i),Xperim(i+1),Yperim(i+1),movelist_rot{l}(j,1),movelist_rot{l}(j,2),Xperim,Yperim)

569 if R == 1 && movelist_rot{l}(j,1) ~= Xperim(i) && movelist_rot{l}(j,2) ~= Yperim(i)

570 Xperim = [Xperim(1:i); movelist_rot{l}(j,1); Xperim(i+1:end)]

571 Yperim = [Yperim(1:i); movelist_rot{l}(j,2); Yperim(i+1:end)]

572 % i = i + 1; 573 end 574 end 575 i = i + 1; 576 end 577 578 579 % Step 7: Combine into one matrix 580 Perimeter = [Xperim Yperim]; 581 582 % Step 8: Find starting point of perimter and put in order 583 lastpoint = path(end,:); 584 distances = sqrt(sum(bsxfun(@minus, Perimeter,

lastpoint).^2,2)); 585 idx = find(distances==min(distances)); 586 Perimeter = [Perimeter(idx:end,:); Perimeter(1:idx,:)]; 587 588 % Step 9: Append to perimter to path 589 path = [path; Perimeter]; 590 591 end 592 %% Insert prime perimeter around model. (old code, may need

updating) 593 594 yesPrime = 0; 595 prime = 0; 596 if yesPrime == 1 && l == 1 597 598 skirt = 4; %mm distance from part 599 600 Xmin_prime = min(path(:,1)) - skirt; 601 Xmax_prime = max(path(:,1)) + skirt; 602 Ymin_prime = min(path(:,2)) - skirt; 603 Ymax_prime = max(path(:,2)) + skirt; 604 605 Xprime = [Xmin_prime; Xmax_prime; Xmax_prime; Xmin_prime]; 606 Yprime = [Ymin_prime; Ymin_prime; Ymax_prime; Ymax_prime]; 607 prime = [Xprime Yprime]; 608 extr1 = 1; 609 extr2 = 1; 610 RetractNeed = max([retractA retractB]); 611 PrimeDistNeed = RetractNeed/(extr1*EM*nozzleArea/syringeArea); 612 polyin = polyshape(prime); 613 PerimDist = perimeter(polyin); 614 NumPerim = ceil(PrimeDistNeed/PerimDist); 615 PrimePerim = prime; 616 for i = 1:NumPerim-1 617 PrimePerim = [PrimePerim; prime];

Page 103: Multi-Material 3D-Printed Silicone Vocal Fold Models

93

618 end 619 PrimePerim(end+1,:) = PrimePerim(1,:); 620 path = [PrimePerim; path]; 621 end 622 623 624 625 %% Allocate space for A, B, retract A, retract B, Travel, and

Retract 626 627 path = [path, zeros(length(path(:,1)),6)]; % path =

[X,Y,A,B,rtA,rtB,travel,retract] 628 629 %% Append previous layer A- B-values to beginning of path 630 631 if l ~= 1 632 path(1,3) = allPath(end-1,4); 633 path(1,4) = allPath(end-1,5); 634 end 635 636 %% Set A- and B- extruder values 637 638 % pre-determine values based on last layer or if it is first layer 639 if l == 1 640 path(1,5) = 0; % Set A-extruder to 100% 641 path(1,6) = 0; % Set B-extruder to 0% 642 else 643 path(1,5) = allPath(end-1,6); % Set A-extruder to 100% 644 path(1,6) = allPath(end-1,7); % Set B-extruder to 0% 645 end 646 647 p = 2; 648 while p <= length(path(:,1)) 649 650 % Find midpoint between two points 651 midx = (path(p,1)+ path(p-1,1))/2; 652 midx = round(midx,5); 653 midy = (path(p,2)+ path(p-1,2))/2; 654 midy = round(midy,5); 655 656 % Find which polygon the midpoint lies 657 idx_nan = find(isnan(movelist_rot{l}(:,1))); 658 659 [idxC,idxR] = groupcounts(movelist_rot{l}(idx_nan,3)); 660 661 t = 0; 662 tolerance = 0.00001; 663 for po = 1:length(idxR) 664 idxF = find(movelist_rot{l}(:,3) == idxR(po)); 665 id = 'MATLAB:polyshape:repairedBySimplify'; 666 warning('off',id) 667 P = polyshape((movelist_rot{l}(idxF(1:end-

2),1))',(movelist_rot{l}(idxF(1:end-2),2))'); % create polygon 668 [in, on] = isinterior( polybuffer(P,tolerance) ,

midx,midy); % find if midpoint is in or on polygon 669 if in == 1 || on == 1 670 t = idxR(po); % flag polygon if midpoint is in or on

Page 104: Multi-Material 3D-Printed Silicone Vocal Fold Models

94

671 end 672 end 673 674 % extruder are set if midpoint is in or on polygon, else, they

are set to 0. 675 if t == 0 676 t = 0; 677 extr1 = 0; 678 extr2 = 0; 679 else 680 extr1 = round(tool(t,1),5); 681 extr2 = round(tool(t,2),5); 682 end 683 684 % Plot mid-point on polygons. Easy way to visualize how

materials are assigned to each polygon. 685 plotPolygons = 0; 686 if plotPolygons == 1 && l == 8 % set which layers to plot (i.e.

l = 21, l > 3, 3 > l > 1 687 figure(4) 688 axis('equal') 689 for po = 1:length(idx_nan) 690 plot(midx,midy,'*','Color',[1*extr1 0 1*extr2]) 691 hold on 692 if po == 1 693 plot(movelist_rot{l}(1:idx_nan(po)-

1,1),movelist_rot{l}(1:idx_nan(po)-1,2)) 694 else 695 plot(movelist_rot{l}(idx_nan(po-1)+1:idx_nan(po)-

1,1),movelist_rot{l}(idx_nan(po-1)+1:idx_nan(po)-1,2)) 696 end 697 end 698 end 699 700 % Insert prime perimeter 701 if yesPrime == 1 && l == 1 702 prime_length = length(PrimePerim(:,1)); 703 if p < prime_length+2 && prime_length > 1 704 extr1 = 1; 705 extr2 = 1; 706 end 707 end 708 709 % Calculate distance between two points 710 711 distance = sqrt((path(p,1) - path(p-1,1))^2 + (path(p,2) -

path(p-1,2))^2); 712 713 % Set A- and B-retraction/extrusion values 714 715 path(p,3) = path(p-1,3) +

extr1*distance*EM*nozzleArea/syringeArea; 716 path(p,4) = path(p-1,4) +

extr2*distance*EM*nozzleArea/syringeArea; 717 path(p,5) = extr1; 718 path(p,6) = extr2; 719

Page 105: Multi-Material 3D-Printed Silicone Vocal Fold Models

95

720 if yesPrime == 1 && l == 1 721 if p == prime_length + 2 && prime_length > 1 722 path(p,3) = path(p-1,3); 723 path(p,4) = path(p-1,4); 724 end 725 end 726 727 %% Retraction 728 729 % calculate difference between A- and B-retraction/extrusion

value and 730 % previous point to calculate retraction and insert 731 if path(p,5) ~= path(p-1,5) || path(p,6) ~= path(p-1,6) 732 ratein3 = path(p-1,5); 733 ratein4 = path(p-1,6); 734 rateout3 = path(p,5); 735 rateout4 = path(p,6); 736 diff3 = rateout3 - ratein3; 737 diff4 = rateout4 - ratein4; 738 739 740 if any(round(abs([ratein3, rateout3]),2) == 0) 741 p3retract = path(p-1,3) + sign(diff3)*retractA; 742 else 743 p3retract = path(p-1,3); 744 end 745 746 if any(round(abs([ratein4, rateout4]),2) == 0) 747 p4retract = path(p-1,4) + sign(diff4)*retractB; 748 else 749 p4retract = path(p-1,4); 750 end 751 752 % Don't re-retract for first instance on each extruder 753 754 if diff3 > 0.001 && max(path(:,3)) < retractA 755 p3retract = max([path(:,3);allPath(:,4)]); 756 % p3retract = max(path(:,3)); 757 end 758 if diff4 > 0.001 && max(path(:,4)) < retractB 759 p4retract = max([path(:,4);allPath(:,5)]); 760 761 end 762 763 % Check if difference in extruder rate is greater than

retraction 764 % threshold. 765 766 if ~(any(round(abs([ratein3, ratein4, rateout3,

rateout4]),2) == 0)) 767 768 % Insert retraction if distance between points is above

threshold 769 % else, move on. 770 elseif abs(distance) > threshold 771 retractinsert = [path(p-1,1) path(p-1,2) p3retract

p4retract path(p-1,5) path(p-1,6) 0 1];

Page 106: Multi-Material 3D-Printed Silicone Vocal Fold Models

96

772 path = [path(1:p-1,:); retractinsert; path(p:end,:)]; 773 path(p+1,3) = p3retract + (path(p+1,3) - path(p-1,3)); 774 path(p+1,4) = p4retract + (path(p+1,4) - path(p-1,4)); 775 p = p+1; 776 else 777 retractinsert = [path(p,1) path(p,2) p3retract

p4retract path(p,5) path(p,6) 0 1]; 778 path = [path(1:p-1,:); retractinsert; path(p+1:end,:)]; 779 p = p+1; 780 end 781 else 782 783 end 784 785 if path(p,3) ~= 0 || path(p,4) ~= 0 || p >= length(path(:,1))-1 786 p = p+1; 787 end 788 end 789 790 %% Insert z-value for layer height change 791 792 zinsert = zeros([length(path(:,1)) 1]); 793 path = [path(:,1:2) zinsert path(:,3:end)]; % path =

[X,Y,Z,A,B,rtA,rtB,travel,retract] 794 path(end+1,:) = [NaN NaN l*layerheight 0 0 0 0 0 0]; 795 796 %% Append layer path to allpath 797 798 allPath = [allPath; path]; % allpath =

[X,Y,Z,A,B,rtA,rtB,travel,retract] 799 count = count + 1 800 801 Xmin = min(allPath(:,1)); 802 Xmax = max(allPath(:,1)); 803 Ymin = min(allPath(:,2)); 804 Ymax = max(allPath(:,2)); 805 806 %% Plot a specific layer 807 808 specific_layer = 0; 809 if specific_layer == 1 810 if (l == 1) 811 812 %remove 0 values 813 idx_extr_neg3 = find(path(:,4) < 0); 814 idx_extr_neg4 = find(path(:,5) < 0); 815 path(idx_extr_neg3,4) = 0; 816 path(idx_extr_neg4,5) = 0; 817 818 edge = 2; 819 figure(1) 820 subplot(1,3,3); 821 axis equal 822 LXmin = Xmin; 823 LXmax = Xmax; 824 LYmin = Ymin; 825 LYmax = Ymax;

Page 107: Multi-Material 3D-Printed Silicone Vocal Fold Models

97

826 axis([LXmin-edge,LXmax+edge,LYmin-edge,LYmax+edge]) 827 828 pathTable = array2table(path(:,1:7),... 829 'VariableNames',{'X','Y','Z','A','B','Rate-A','Rate-

B'}); 830 831 832 fig5 = uifigure('Position',[200 200 1500 400]); 833 tbl = uitable(fig5,'Position',[20 20 600

350],'ColumnWidth','auto'); 834 pnl1 = uipanel(fig5,'Position',[620 20 450 350]); 835 pnl2 = uipanel(fig5,'Position',[1070 20 450 350]); 836 837 slhan=uicontrol(fig5,'style','slider','position',[100 280

200 20],'min',2,'max',(length(path(:,1))-1)); 838 addlistener(slhan, 'Value', 'PostSet', @callbackfn); 839 840 tbl.Data = pathTable; 841 tbl.RowName = 'numbered'; 842 843 ax1 = uiaxes(pnl1); 844 ax1.XLim = ([LXmin-0.1,LXmax+0.1]); 845 ax1.YLim = ([LYmin-0.1,LYmax+0.1]); 846 axis(ax1,'equal') 847 set(ax1,'visible','off') 848 849 ax2 = uiaxes(pnl2); 850 % legend(ax2,{'Extruder-A','Extruder-

B','location','NorthWest'}) 851 xlabel(ax2,'Travel Distance (mm)') 852 ylabel(ax2,'Extruder Distance (mm)') 853 854 for v = 2:length(path(:,1))-1 855 distance = sqrt((path(v,1) - path(v-1,1))^2 +

(path(v,2) - path(v-1,2))^2); 856 857 if distance == 0 858 distance = 0.1; 859 end 860 861 if v >= 3 862 removeStyle(tbl,1); 863 end 864 s = uistyle('BackgroundColor',[1 0.6 0.6]); 865 addStyle(tbl,s,'cell',[v*ones([1,7]);1:1:7]'); 866 if v >= 6 867 scroll(tbl,'row',v-5) 868 end 869 870 hold( ax1, 'on' ) 871 if v == 2 872 hold( ax1, 'off' ) 873 874 end 875 color = [1*path(v,7) 0 1*path(v,6)]; 876 graylow = 0.20; 877 grayhigh = 0.85;

Page 108: Multi-Material 3D-Printed Silicone Vocal Fold Models

98

878 gray = path(v,7)*(grayhigh-graylow)+graylow; %scale extrusion to grayscale

879 if path(v,7) == 0 && path(v,6) == 0 880 gray = 0; 881 end 882 if color == [0 0 0] 883 color = [1 1 1]; 884 end 885 % plot(ax1,path(v-1:v,1),path(v-

1:v,2),'-','Color',[0 0 0]+gray,'LineWidth',2) %grayscale 886 plot(ax1,path(v-1:v,1),path(v-1:v,2),'-

','Color',flip(color),'LineWidth',2) %color 887 hold( ax1, 'off' ) 888 889 890 hold( ax2, 'on' ) 891 allDistance = allDistance + distance; 892 ax2.XLim = ([allDistance-20,allDistance+20]); 893 plot(ax2,[(allDistance-distance),allDistance],path(v-

1:v,4),'r') 894 plot(ax2,[(allDistance-distance),allDistance],path(v-

1:v,5),'b') 895 hold( ax2, 'off' ) 896 897 pause(0.0001) 898 899 end 900 end 901 colormap gray 902 end 903 figure(1) 904 end 905 906 %% Remove all negative extrusion values 907 908 idx_extr_neg3 = find(allPath(:,4) < 0); 909 idx_extr_neg4 = find(allPath(:,5) < 0); 910 allPath(idx_extr_neg3,4) = 0; 911 allPath(idx_extr_neg4,5) = 0; 912 913 %% Plot entire print 914 915 edge = 2; 916 figure(1) 917 subplot(1,3,3); 918 axis equal 919 LXmin = Xmin; 920 LXmax = Xmax; 921 LYmin = Ymin; 922 LYmax = Ymax; 923 LZmin = min(allPath(:,3)); 924 LZmax = max(allPath(:,3)); 925 axis([LXmin-edge,LXmax+edge,LYmin-edge,LYmax+edge,LZmin-

edge,LZmax+edge],'equal') 926 927 allPathPlot = allPath(allPath(:,9) == 0,:); 928 v = 1;

Page 109: Multi-Material 3D-Printed Silicone Vocal Fold Models

99

929 930 % to remove repeat values 931 while v < length(allPathPlot(:,1))-1 932 if abs(allPathPlot(v,1) - allPathPlot(v+1,1)) < 0.001 &&

abs(allPathPlot(v,2) - allPathPlot(v+1,2)) < 0.001 933 allPathPlot = [allPathPlot(1:v-1,:); allPathPlot(v+1:end,:)]; 934 else 935 v = v+1; 936 end 937 end 938 allPathPlot = allPath(allPath(:,9) == 0,:); 939 allPathPlot = [NaN([1 length(allPathPlot(1,:))]); allPathPlot(2:end,:);

NaN([1 length(allPathPlot(1,:))])]; %add NaN to beginning and end 940 % allpathplot = [allpathplot(2:end,:); NaN([1

length(allpathplot(1,:))])]; 941 942 lh = 0; 943 % Assign layer height to column 3 944 for v = 1:length(allPathPlot)-1 945 allPathPlot(v,3) = lh; 946 if allPathPlot(v,3) ~= allPathPlot(v+1,3) && allPathPlot(v+1,3) ~=

0 && ~isnan(allPathPlot(v+1,3)) 947 lh = allPathPlot(v+1,3); 948 end 949 end 950 951 color = [1*allPathPlot(:,6) zeros([length(allPathPlot(:,1)) 1])

1*allPathPlot(:,7)]; 952 colorArray = zeros([length(color(:,1)),1,3]); %convert to n-by-1-by-3

array of RGB values 953 954 for i = 1:length(color(:,1)) 955 if color(i,(1:3)) == [0 0 0] 956 color(i,(1:3)) = [1 1 1]; 957 end 958 colorArray(i,:,:) = color(i,(1:3)); 959 end 960 961 colorArray = colorArray(2:end,:,:); 962 colorArray(end+1,:,:) = [NaN, NaN, NaN]; 963 964 figure(5) 965 hold off 966 patch(allPathPlot(:,1),allPathPlot(:,2),allPathPlot(:,3),colorArray,'Fa

ceColor','flat','EdgeColor','flat','LineWidth',2) 967 axis('equal') 968 view(3) 969 970 %% Animate Plot 971 972 yes_animate = 0; 973 if yes_animate == 1 974 edge = 0; 975 figure(4) 976 LXmin = Xmin; 977 LXmax = Xmax; 978 LYmin = Ymin;

Page 110: Multi-Material 3D-Printed Silicone Vocal Fold Models

100

979 LYmax = Ymax; 980 LZmin = min(allPath(:,3)); 981 LZmax = max(allPath(:,3)); 982 axis([LXmin-edge,LXmax+edge,LYmin-edge,LYmax+edge,LZmin-

edge,LZmax+edge],'equal') 983 figure(6) 984 view([1 1 1]) 985 axis([LXmin-edge,LXmax+edge,LYmin-edge,LYmax+edge,LZmin-

edge,LZmax+edge],'equal') 986 for v = 2:length(allPathPlot(:,1))-1 987

patch(allPathPlot(1:v,1),allPathPlot(1:v,2),allPathPlot(1:v,3),colorArray(v,:,:),'EdgeAlpha',0.25,'FaceColor','flat','EdgeColor','flat','LineWidth',2)

988 patch(allPathPlot(v:v+1,1),allPathPlot(v:v+1,2),allPathPlot(v:v+1,3),colorArray(v-1:v,:,:),'FaceColor','flat','EdgeColor','flat','LineWidth',2)

989 pause(0.00001) 990 end 991 end 992 993 %% Export GCode 994 995 %Starting GCode 996 gcode = [';G-Code Created by Clayton Young' newline]; 997 998 % Insert model part names 999 if ischar(file) 1000 part = file(1:end-4); 1001 else 1002 for i = 1:length(file) 1003 if i == 1 1004 part = [file{i}(1:end-4)]; 1005 else 1006 part = [part file{i}(1:end-4)]; 1007 end 1008 end 1009 end 1010 1011 % Insert print parameters 1012 if length(part) > 256 && exist('VSGM','var') 1013 parameters = [';Part: ' part(1:50) '...' newline ';VSG: '

num2str(VSGM) newline ';Offset: ' num2str(offset) newline ';Layer Height: ' num2str(layerheight) newline ';Print Speed: ' num2str(printSpeed) newline ';RetractA: ' num2str(retractA) newline ';RetractB: ' num2str(retractB) newline ';Angle: ' num2str(angle) newline ';Percent Infill: ' num2str(percentInfill) newline ';Extrusion Multiplier: ' num2str(EM) newline];

1014 elseif exist('VSGM','var') 1015 parameters = [';Part: ' part newline newline ';VSG: ' num2str(VSGM)

newline ';Offset: ' num2str(offset) newline ';Layer Height: ' num2str(layerheight) newline ';Print Speed: ' num2str(printSpeed) newline ';RetractA: ' num2str(retractA) newline ';RetractB: ' num2str(retractB) newline ';Angle: ' num2str(angle) newline ';Percent Infill: ' num2str(percentInfill) newline ';Extrusion Multiplier: ' num2str(EM) newline];

1016 else

Page 111: Multi-Material 3D-Printed Silicone Vocal Fold Models

101

1017 parameters = [';Part: ' part newline newline newline ';Offset: ' num2str(offset) newline ';Layer Height: ' num2str(layerheight) newline ';Print Speed: ' num2str(printSpeed) newline ';RetractA: ' num2str(retractA) newline ';RetractB: ' num2str(retractB) newline ';Angle: ' num2str(angle) newline ';Percent Infill: ' num2str(percentInfill) newline ';Extrusion Multiplier: ' num2str(EM) newline];

1018 end 1019 gcode = [gcode parameters]; 1020 1021 %Only nonzero rows selected 1022 B = allPath; 1023 allPath = B(any(B,2),:); 1024 1025 % Convert from num to string line by line 1026 layer = 1; 1027 for p = 2:length(allPath(:,1)) 1028 if allPath(p,1) ~= 0 1029 X = [' X' num2str(allPath(p,1))]; 1030 else 1031 X = ['']; 1032 end 1033 1034 if allPath(p,2) ~= 0 1035 Y = [' Y' num2str(allPath(p,2))]; 1036 else 1037 Y = ['']; 1038 end 1039 1040 if allPath(p,3) ~= 0 1041 Z = [' Z' num2str(allPath(p,3))]; 1042 layer = layer + 1; 1043 else 1044 Z = ['']; 1045 end 1046 1047 A = [' A' num2str(allPath(p,4))]; 1048 1049 B = [' B' num2str(allPath(p,5))]; 1050 1051 if allPath(p,9) ~= 0 %if not extruding, use G0 command 1052 gcodeInsert = ['G0' X Y Z A B newline]; 1053 elseif allPath(p,8) ~= 0 %if retracting, use G0 command 1054 gcodeInsert = ['G0' X Y Z newline 'G0' A B newline]; 1055 else 1056 if allPath(p,3) ~= 0 || isnan(allPath(p,3)) %if start of new

layer 1057 gcodeInsert = [';Layer ' num2str(layer) newline 'G1' Z

newline]; 1058 else %if normal move and extrude used G1 command 1059 gcodeInsert = ['G1' X Y Z A B newline]; 1060 end 1061 end 1062 1063 if p == 2 1064 G1F = ['G1 F' num2str(printSpeed) newline]; 1065 G92 = ['G92' X Y ' Z0' ' A0' ' B0' newline]; 1066 gcodeInsert = [G1F G92 gcodeInsert];

Page 112: Multi-Material 3D-Printed Silicone Vocal Fold Models

102

1067 end 1068 1069 gcode = [gcode gcodeInsert]; 1070 end 1071 1072 % End Gcode 1073 endGcode = ['G1 Z28' newline 'G1 X-10']; 1074 1075 gcode = [gcode endGcode]; 1076 1077 % Print and close Gcode file 1078 % To label file by part 1079 % f = fopen([Part '_LH-' num2str(layerheight) '_PS-'

num2str(PrintSpeed) '_PI' num2str(PercentInfill) '_EM' num2str(EM) '_RtA-' num2str(retractA) '_RtB-' num2str(retractB) '_Ang-' num2str(angle) '.txt'],'w');

1080 % else 1081 filename = matlab.desktop.editor.getActiveFilename; 1082 1083 if exist('ExtruderARatio','var') == 1 && numel(part) <= 15 1084 % f = fopen([Part ' ExtA-' num2str(ExtruderARatio) ' ExtB-'

num2str(ExtruderBRatio) ' MatRat-' num2str(MaterialThinnerRatio(1:length(numel(Part)))) ' LH-' num2str(layerheight) ' PS-' num2str(PrintSpeed) ' PI' num2str(PercentInfill) ' EM' num2str(EM) ' RtA-' num2str(retractA) ' RtB-' num2str(retractB) ' Ang-' num2str(angle) '.txt'],'w');

1085 gcodeFilename = [part ' ExtA-' num2str(extruderARatio) ' ExtB-' num2str(extruderBRatio) ' MatRat-' num2str(MaterialThinnerRatio(1:length(numel(part)))) ' RtA-' num2str(retractA) ' RtB-' num2str(retractB) ' Ang-' num2str(angle) ' DT-' datestr(now,'dd.mm.yy-HH.MM') ' ' filename(end-4:end-2) '.txt'];

1086 elseif exist('ExtruderARatio','var') == 1 && numel(part) > 15 1087 gcodeFilename = [part(1:15) '...ExtA-' num2str(extruderARatio) '

ExtB-' num2str(extruderBRatio) ' VSGM-' num2str(VSGM) ' RtA-' num2str(retractA) ' RtB-' num2str(retractB) ' Ang-' num2str(angle) ' DT-' datestr(now,'dd.mm.yy-HH.MM') ' ' filename(end-4:end-2) '.txt'];

1088 else 1089 gcodeFilename = ['_LH-' num2str(layerheight) '_RtA-'

num2str(retractA) '_RtB-' num2str(retractB) '_Ang-' num2str(angle) '_-' num2str(closestCorner) ' DT-' datestr(now,'dd.mm.yy-HH.MM') ' ' filename(end-4:end-2) '.txt'];

1090 end 1091 1092 f = fopen(gcodeFilename,'w'); 1093 fprintf(f, gcode); 1094 fclose(f); 1095 1096 save('newest.mat','allPath') 1097 save([gcodeFilename(1:end-3) '.mat'],'allPath') 1098 1099 1100 1101 done = 1 1102 1103 %% Plot Extrusion 1104 1105 plotExtrusion = 1;

Page 113: Multi-Material 3D-Printed Silicone Vocal Fold Models

103

1106 1107 if plotExtrusion == 1 1108 allDistance = 0; 1109 distanceLast = 0; 1110 p = 2; 1111 while p < length(allPath(:,1)) 1112 if isnan(allPath(p,1)) 1113 p = p + 2; 1114 end 1115 distance = sqrt((allPath(p,1) - allPath(p-1,1))^2 +

(allPath(p,2) - allPath(p-1,2))^2); 1116 allDistance(p) = distanceLast + distance; 1117 distanceLast = allDistance(p); 1118 p = p + 1; 1119 end 1120 1121 allpathextplot = allPath; 1122 idxnaninsrt = find(allpathextplot(:,3) ~= 0); 1123 allpathextplot(idxnaninsrt,4:5) = nan; 1124 1125 allDistance(allDistance == 0) = nan; 1126 1127 figure(7) 1128 plot(allDistance,allpathextplot(2:end,4),'r'); 1129 hold on 1130 plot(allDistance,allpathextplot(2:end,5),'b'); 1131 legend('Extruder-A','Extruder-B','location','NorthWest') 1132 xlabel('Travel Distance (mm)') 1133 ylabel('Extruder Distance (mm)') 1134 end 1135 1136 %% Volume calc validation 1137 1138 1139 1140 toolVSG3 = [1,1.37928618980138e-

17;0.249930648055221,0.750069351944779;0.559242362672205,0.440757637327795;0.534414293861717,0.465585706138283;0.497726886036971,0.502273113963030;0.456427513040012,0.543572486959988;0.415128140043054,0.584871859956946;0.373828767046095,0.626171232953904;0.332529394049138,0.667470605950863;0.291230021052179,0.708769978947821;0.249930648055221,0.750069351944779;0.208631275058263,0.791368724941738;0.149847282555336,0.850152717444665;0.0749236412776676,0.925076358722332;0,1];

1141 % toolVSG1 = [1,1.37928618980138e-17;0.249930648055221,0.750069351944779;0,1];

1142 toolVSG1 = [1,1.37928618980138e-17;0.149847282555336,0.850152717444665;0,1];

1143 1144 VolumeVSG3 = [643.27 1145 32.64 1146 200.66 1147 22.57 1148 22.57 1149 22.42 1150 21.33 1151 19.23 1152 17.03

Page 114: Multi-Material 3D-Printed Silicone Vocal Fold Models

104

1153 16.47 1154 17.03 1155 18.98 1156 94.05 1157 94.05 1158 91.05]; 1159 1160 VolumeVSG1 = [VolumeVSG3(1:2); sum(VolumeVSG3(3:end))]; 1161 1162 AVSG1 = toolVSG1(:,1).*VolumeVSG1; 1163 BVSG1 = toolVSG1(:,2).*VolumeVSG1; 1164 AsumVSG1 = sum(AVSG1); 1165 BsumVSG1 = sum(BVSG1); 1166 AextDist1 = AsumVSG1*(EM*percentInfill/syringeArea) 1167 BextDist1 = BsumVSG1*(EM*percentInfill/syringeArea) 1168 ABVSG1ratio = AsumVSG1/BsumVSG1 1169 1170 AVSG3 = toolVSG3(:,1).*VolumeVSG3; 1171 BVSG3 = toolVSG3(:,2).*VolumeVSG3; 1172 AsumVSG3 = sum(AVSG3); 1173 BsumVSG3 = sum(BVSG3); 1174 AextDist3 = AsumVSG3*(EM*percentInfill/syringeArea) 1175 BextDist3 = BsumVSG3*(EM*percentInfill/syringeArea) 1176 ABVSG3ratio = AsumVSG3/BsumVSG3 1177 1178 [ExtA] = allPath(end-1,4) 1179 [ExtB] = allPath(end-1,5) 1180 1181 ExtAExtBRatio = ExtA/ExtB 1182 1183 %% Launch Gcode Viewer 1184 GcodeViewer

1185

D.1.2 GcodeViewer.mlapp

Matlab App Designer Code that is executed at the end of the

Multi_Material_Slicer_v12.m code. The code creates the GUI as shown in Fig. 2.5.

1 classdef GcodeViewer < matlab.apps.AppBase 2 3 % Properties that correspond to app components 4 properties (Access = public) 5 UIFigure matlab.ui.Figure 6 GridLayout matlab.ui.container.GridLayout 7 LeftPanel matlab.ui.container.Panel 8 InputmatFileButton matlab.ui.control.Button 9 UITable matlab.ui.control.Table 10 CenterPanel matlab.ui.container.Panel 11 UIAxes matlab.ui.control.UIAxes 12 Label matlab.ui.control.Label 13 Slider matlab.ui.control.Slider

Page 115: Multi-Material 3D-Printed Silicone Vocal Fold Models

105

14 RightPanel matlab.ui.container.Panel 15 UIAxes2 matlab.ui.control.UIAxes 16 end 17 18 % Properties that correspond to apps with auto-reflow 19 properties (Access = private) 20 onePanelWidth = 576; 21 twoPanelWidth = 768; 22 end 23 24 properties (Access = private) 25 allpath % Description 26 end 27 28 % Callbacks that handle component events 29 methods (Access = private) 30 31 % Code that executes after component creation 32 function startupFcn(app) 33 % GcodeFile = open(".mat"); 34 GcodeMat = open(".mat"); 35 GcodeMat.allpath( ~any(GcodeMat.allpath,2), : ) = []; %remove 0 rows 36 app.allpath = GcodeMat.allpath(:,[1,2,4:9,3]); 37 GcodeTable = array2table(app.allpath); 38 app.UITable.Data = GcodeTable; 39 app.UITable.RowName = 'numbered'; 40 app.UITable.ColumnName = {'X','Y','A','B','Rate-A','Rate-

B','G0','G1','Z'}; 41 app.UITable.ColumnFormat 42 app.Slider.Limits = [2,length(app.allpath(:,1))]; 43 end 44 45 % Changes arrangement of the app based on UIFigure width 46 function updateAppLayout(app, event) 47 currentFigureWidth = app.UIFigure.Position(3); 48 if(currentFigureWidth <= app.onePanelWidth) 49 % Change to a 3x1 grid 50 app.GridLayout.RowHeight = {716, 716, 716}; 51 app.GridLayout.ColumnWidth = {'1x'}; 52 app.CenterPanel.Layout.Row = 1; 53 app.CenterPanel.Layout.Column = 1; 54 app.LeftPanel.Layout.Row = 2; 55 app.LeftPanel.Layout.Column = 1; 56 app.RightPanel.Layout.Row = 3; 57 app.RightPanel.Layout.Column = 1; 58 elseif (currentFigureWidth > app.onePanelWidth && currentFigureWidth <=

app.twoPanelWidth) 59 % Change to a 2x2 grid 60 app.GridLayout.RowHeight = {716, 716}; 61 app.GridLayout.ColumnWidth = {'1x', '1x'}; 62 app.CenterPanel.Layout.Row = 1; 63 app.CenterPanel.Layout.Column = [1,2]; 64 app.LeftPanel.Layout.Row = 2; 65 app.LeftPanel.Layout.Column = 1; 66 app.RightPanel.Layout.Row = 2; 67 app.RightPanel.Layout.Column = 2; 68 else

Page 116: Multi-Material 3D-Printed Silicone Vocal Fold Models

106

69 % Change to a 1x3 grid 70 app.GridLayout.RowHeight = {'1x'}; 71 app.GridLayout.ColumnWidth = {515, '1x', 322}; 72 app.LeftPanel.Layout.Row = 1; 73 app.LeftPanel.Layout.Column = 1; 74 app.CenterPanel.Layout.Row = 1; 75 app.CenterPanel.Layout.Column = 2; 76 app.RightPanel.Layout.Row = 1; 77 app.RightPanel.Layout.Column = 3; 78 end 79 end 80 81 % Button pushed function: InputmatFileButton 82 function InputmatFileButtonPushed(app, event) 83 GcodeFile = uigetfile('.mat'); 84 GcodeMat = open(GcodeFile); 85 GcodeMat.allpath( ~any(GcodeMat.allpath,2), : ) = []; %remove 0 rows 86 app.allpath = GcodeMat.allpath(:,[1,2,4:9,3]); 87 GcodeTable = array2table(app.allpath); 88 app.UITable.Data = GcodeTable; 89 app.UITable.RowName = 'numbered'; 90 app.UITable.ColumnName = {'X','Y','A','B','Rate-A','Rate-

B','G0','G1','Z'}; 91 app.UITable.ColumnFormat 92 app.Slider.Limits = [2,length(app.allpath(:,1))]; 93 end 94 95 % Value changed function: Slider 96 function SliderValueChanged(app, event) 97 end 98 99 % Cell selection callback: UITable 100 function UITableCellSelection(app, event) 101 indices = event.Indices; 102 end 103 104 % Value changing function: Slider 105 function SliderValueChanging(app, event) 106 if strcmp('KeyPress',event.EventName) 107 changingValue = app.Slider.Value; 108 else 109 changingValue = event.Value; 110 end 111 v = round(changingValue,0); 112 if v > 152 113 sliderlow = v-150; 114 else 115 sliderlow = 2; 116 end 117 if v > 5 118 scroll(app.UITable,'row',v - 3) 119 else 120 scroll(app.UITable,'row',v) 121 end 122 if ~isempty(app.UITable.StyleConfigurations) 123 removeStyle(app.UITable); 124 end

Page 117: Multi-Material 3D-Printed Silicone Vocal Fold Models

107

125 s = uistyle('BackgroundColor',[1 0.6 0.6]); 126 addStyle(app.UITable,s,'row',v); 127 colorArray = [app.allpath(sliderlow:v,5),

zeros([length(app.allpath(sliderlow:v,1)),1]), app.allpath(sliderlow:v,6)];

128 for i = 1:length(colorArray(:,1)) 129 if all(colorArray(i,:) == 0,2) 130 colorArray(i,:) = [1 1 1]; 131 end 132 end 133 if isempty(colorArray) 134 else 135 colororder(app.UIAxes,colorArray) 136 end 137 allDistance = 0; 138 hold(app.UIAxes, 'off' ) 139 edge = 0.25; 140 app.UIAxes.XLim = [min(app.allpath(:,1))-edge

max(app.allpath(:,1))+edge]; 141 app.UIAxes.YLim = [min(app.allpath(:,2))-edge

max(app.allpath(:,2))+edge]; 142 143 for i = sliderlow:v 144 plot(app.UIAxes,app.allpath(i-1:i,1),app.allpath(i-1:i,2),'-

','LineWidth',2); 145 hold(app.UIAxes, 'on' ) 146 distance = sqrt((app.allpath(i,1) - app.allpath(i-1,1))^2 +

(app.allpath(i,2) - app.allpath(i-1,2))^2); 147 if distance == 0 || isnan(distance) 148 distance = 0.1; 149 end 150 if isnan(distance) 151 elseif allDistance == 0 152 allDistance(i) = distance; 153 else 154 allDistance(i) = allDistance(i-1) + distance; 155 end 156 end 157 hold(app.UIAxes2, 'off' ) 158 app.UIAxes2.XLim = ([allDistance(end)-20,allDistance(end)+20]); 159 plot(app.UIAxes2,allDistance(sliderlow:v),app.allpath(sliderlow:v,3),'r

') 160 hold(app.UIAxes2, 'on' ) 161 plot(app.UIAxes2,allDistance(sliderlow:v),app.allpath(sliderlow:v,4),'b

') 162 end 163 164 % Key press function: UIFigure 165 function UIFigureKeyPress(app, event) 166 key = event.Key; 167 value = app.Slider.Value; % get the slider value 168 if strcmp(key,'leftarrow') && value > app.Slider.Limits(1) + 1 169 value = value-1; % left value 170 elseif strcmp(key,'rightarrow') && value < app.Slider.Limits(2) - 1 171 value = value+1; % right value 172 end 173 app.Slider.Value = value; % set the slider value

Page 118: Multi-Material 3D-Printed Silicone Vocal Fold Models

108

174 SliderValueChanging(app, event); % execute the slider callback 175 end 176 end 177 178 % Component initialization 179 methods (Access = private) 180 181 % Create UIFigure and components 182 function createComponents(app) 183 184 % Create UIFigure and hide until all components are created 185 app.UIFigure = uifigure('Visible', 'off'); 186 app.UIFigure.AutoResizeChildren = 'off'; 187 app.UIFigure.Position = [100 100 1307 716]; 188 app.UIFigure.Name = 'MATLAB App'; 189 app.UIFigure.SizeChangedFcn = createCallbackFcn(app, @updateAppLayout,

true); 190 app.UIFigure.KeyPressFcn = createCallbackFcn(app, @UIFigureKeyPress,

true); 191 192 % Create GridLayout 193 app.GridLayout = uigridlayout(app.UIFigure); 194 app.GridLayout.ColumnWidth = {515, '1x', 322}; 195 app.GridLayout.RowHeight = {'1x'}; 196 app.GridLayout.ColumnSpacing = 0; 197 app.GridLayout.RowSpacing = 0; 198 app.GridLayout.Padding = [0 0 0 0]; 199 app.GridLayout.Scrollable = 'on'; 200 201 % Create LeftPanel 202 app.LeftPanel = uipanel(app.GridLayout); 203 app.LeftPanel.Layout.Row = 1; 204 app.LeftPanel.Layout.Column = 1; 205 206 % Create InputmatFileButton 207 app.InputmatFileButton = uibutton(app.LeftPanel, 'push'); 208 app.InputmatFileButton.ButtonPushedFcn =

createCallbackFcn(app, @InputmatFileButtonPushed, true); 209 app.InputmatFileButton.Position = [206 688 100 22]; 210 app.InputmatFileButton.Text = 'Input .mat File'; 211 212 % Create UITable 213 app.UITable = uitable(app.LeftPanel); 214 app.UITable.ColumnName = {'Column 1'; 'Column 2'; 'Column

3'; 'Column 4'}; 215 app.UITable.RowName = {}; 216 app.UITable.CellSelectionCallback = createCallbackFcn(app,

@UITableCellSelection, true); 217 app.UITable.Position = [0 7 509 671]; 218 219 % Create CenterPanel 220 app.CenterPanel = uipanel(app.GridLayout); 221 app.CenterPanel.Layout.Row = 1; 222 app.CenterPanel.Layout.Column = 2; 223 224 % Create UIAxes 225 app.UIAxes = uiaxes(app.CenterPanel);

Page 119: Multi-Material 3D-Printed Silicone Vocal Fold Models

109

226 title(app.UIAxes, '') 227 xlabel(app.UIAxes, '') 228 ylabel(app.UIAxes, '') 229 zlabel(app.UIAxes, '') 230 app.UIAxes.DataAspectRatio = [1 1 1]; 231 app.UIAxes.Box = 'on'; 232 app.UIAxes.XTick = []; 233 app.UIAxes.YTick = []; 234 app.UIAxes.Position = [8 48 457 662]; 235 236 % Create Label 237 app.Label = uilabel(app.CenterPanel); 238 app.Label.HorizontalAlignment = 'right'; 239 app.Label.Position = [7 28 25 22]; 240 app.Label.Text = ''; 241 242 % Create Slider 243 app.Slider = uislider(app.CenterPanel); 244 app.Slider.Limits = [1 100]; 245 app.Slider.ValueChangedFcn = createCallbackFcn(app,

@SliderValueChanged, true); 246 app.Slider.ValueChangingFcn = createCallbackFcn(app,

@SliderValueChanging, true); 247 app.Slider.Position = [53 37 300 3]; 248 app.Slider.Value = 1; 249 250 % Create RightPanel 251 app.RightPanel = uipanel(app.GridLayout); 252 app.RightPanel.Layout.Row = 1; 253 app.RightPanel.Layout.Column = 3; 254 255 % Create UIAxes2 256 app.UIAxes2 = uiaxes(app.RightPanel); 257 title(app.UIAxes2, '') 258 xlabel(app.UIAxes2, 'Travel Distance (mm)') 259 ylabel(app.UIAxes2, 'Extrusion Distance (mm)') 260 zlabel(app.UIAxes2, 'Z') 261 app.UIAxes2.PlotBoxAspectRatio = [1 2.39325842696629 1]; 262 app.UIAxes2.Position = [7 17 315 682]; 263 264 % Show the figure after all components are created 265 app.UIFigure.Visible = 'on'; 266 end 267 end 268 269 % App creation and deletion 270 methods (Access = public) 271 272 % Construct app 273 function app = GcodeViewer 274 275 % Create UIFigure and components 276 createComponents(app) 277 278 % Register the app with App Designer 279 registerApp(app, app.UIFigure) 280

Page 120: Multi-Material 3D-Printed Silicone Vocal Fold Models

110

281 % Execute the startup function 282 runStartupFcn(app, @startupFcn) 283 284 if nargout == 0 285 clear app 286 end 287 end 288 289 % Code that executes before app deletion 290 function delete(app) 291 292 % Delete UIFigure when app is deleted 293 delete(app.UIFigure) 294 end 295 end 296 end

D.1.3 IsPointWithinLine.m

1 Function R = IsPointWithinLine(x1, y1, x2, y2, x3, y3, Xperim, Yperim) 2 % Line equation: y = m*x + b; 3 Limit = 100 * eps(max(abs([x1,y1,x2,y2,x3,y3]))); 4 if x1 ~= x2 && all(Xperim - x3) && all(Yperim - y3) && ~isnan(x3) &&

~isnan(y3) 5 m = (y2-y1) / (x2-x1); 6 yy3 = m*x3 + y1 - m*x1; 7 if (y1 > yy3) & (yy3 > y2) || (y2 > yy3) & (yy3 > y1) 8 R = (abs(y3 - yy3) < 100 * Limit); 9 else 10 R = 0; 11 end 12 else 13 if abs(x3) < Limit 14 ghg = 1; 15 end 16 17 R = (abs(x3) < Limit); 18 end

D.1.4 orient_stl.m

1 function [rotated] = orient_stl(tri, ax) 2 %%%orients the stl file in either x, y or z axis. input is oriented in x 3 %%%axis 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5 %%%%Author: Sunil Bhandari%%%%%%%% 6 %%%%Date: Mar 12, 2018 %%%%%%%%%%% 7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8 9 if ax == 'x' 10 rotated = tri; 11 elseif ax == 'y'

Page 121: Multi-Material 3D-Printed Silicone Vocal Fold Models

111

12 rotated = [tri(:,2),tri(:,1),tri(:,3), tri(:,5),tri(:,4),tri(:,6),tri(:,8),tri(:,7),tri(:,9),tri(:,10:12)];

13 elseif ax == 'z' 14 rotated = [tri(:,3:-1:1),tri(:,6:-1:4),tri(:,9:-1:7),tri(:,10:12)]; 15 else 16 error('ax needs to be x, y or z'); 17 end 18 19 End

D.1.5 plot_slices.m

1 function []= plot_slices(movelist_all, z_slices,delay) 2 %this function plots the movement path for countour creation computed by 3 %slice_stl_create_path 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 5 %Sunil Bhandari 6 %3/17/2017 7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 8 hold on; 9 view(15,23); 10 axis([-Inf Inf -Inf Inf z_slices(1) z_slices(end)]) 11 for i = 1: size(movelist_all,2) 12 mlst_all = movelist_all{i}; 13 if delay >0 14 if ~isempty(mlst_all) 15 for j = 1:size(mlst_all,1)-1 16

plot3(mlst_all(j:j+1,1),mlst_all(j:j+1,2),ones(2,1)*z_slices(i),'b') 17 pause(delay) 18 end 19 end 20 else 21 if ~isempty(mlst_all) 22

plot3(mlst_all(:,1),mlst_all(:,2),ones(size(mlst_all,1),1)*z_slices(i),'b')

23 end 24 end 25 end 26 end

D.1.6 polyxpoly.m

1 function [xi, yi] = polyxpoly(x1, y1, x2, y2) 2 [xi, yi] = intersections(x1, y1, x2, y2); 3 End

Page 122: Multi-Material 3D-Printed Silicone Vocal Fold Models

112

D.1.7 read_binary_stl_file.m

1 function triangles = read_binary_stl_file(filename) 2 %this function reads the binary stl file and gives out triangles as output 3 %to be processed by slice_stl_create_path function. 4 f = fopen(filename,'r'); 5 rd = fread(f,inf,'uint8=>uint8'); 6 numTriangles = typecast(rd(81:84),'uint32'); 7 triangles = zeros(numTriangles,12); 8 sh = reshape(rd(85:end),50,numTriangles); 9 tt =

reshape(typecast(reshape(sh(1:48,1:numTriangles),1,48*numTriangles),'single'),12,numTriangles)';

10 triangles(:,1:9) = tt(:,4:12); 11 triangles(:,10:12) = tt(:,1:3); 12 fclose(f); 13 end

D.1.8 slice_stl_create_path.m

1 function [movelist_all,z_slices] = slice_stl_create_path(triangles,layers) 2 % this function takes triangles generated by reading stl files and slices 3 % them into layers of height defined by slice height. It generates a list 4 % of coordinates a 3D printer needs to move through to create a contour of 5 % the stl part at different heights. 6 7 %if problem is encountered while slicing due to bad stl file, the

commented 8 %section in the code might be uncommented. 9 10 %the function first finds the triangles that intersect with the slicing 11 %plane. It computes the lines created on the triangle face by the 12 %intersection. It creates a continuous path joining the lines by using a 13 %graph depth first search. 14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 15 %Sunil Bhandari 16 %3/17/2017 17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 18 19 %% Modified Code Clayton 20 21 % min_z = min([triangles(:,3); triangles(:,6);triangles(:,9)])-1e-5; 22 % min_z = min([triangles(:,3); triangles(:,6);triangles(:,9)])-0.21/2; 23 % max_z = max([triangles(:,3); triangles(:,6);triangles(:,9)])-1e-5; 24 % max_z = max([triangles(:,3); triangles(:,6);triangles(:,9)])-0.21/2; 25 26 % V = [9,13,18,25,34]; 27 % N = 8; 28 % N*floor(V/N) 29 % min([triangles(:,3); triangles(:,6);triangles(:,9)]) 30 % max([triangles(:,3); triangles(:,6);triangles(:,9)]) 31 % min_z = slice_height*floor(min([triangles(:,3);

triangles(:,6);triangles(:,9)])/slice_height);

Page 123: Multi-Material 3D-Printed Silicone Vocal Fold Models

113

32 % if min_z < 0 33 % min_z = -0.00005; 34 % end 35 % max_z = slice_height*ceil(max([triangles(:,3);

triangles(:,6);triangles(:,9)])/slice_height); 36 37 38 %% 39 40 41 42 % z_slices = min_z: slice_height :max_z; 43 z_slices = layers; 44 45 movelist_all = {}; 46 triangles_new = [triangles(:,1:12),min(triangles(:,[3 6 9]),[],2),

max(triangles(:,[ 3 6 9]),[],2)]; 47 48 49 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 50 %find intersecting triangles% 51 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 52 slices = z_slices; 53 z_triangles = zeros(size(z_slices,2),4000); 54 z_triangles_size=zeros(size(z_slices,2),1); 55 for i = 1:size(triangles_new,1) 56 node = triangles_new(i,13); 57 high= size(slices,2); 58 low = 1; 59 %start_point = floor((max+min)/2); 60 not_match = true; 61 include1 = true; 62 include2 = true; 63 while not_match 64 mid = low + floor((high - low)/2); 65 %check = comparator_floating2(match_node,nodes(mid,:),tol); 66 % mid 67 % slices(mid) 68 % node 69 %triangles(i,:) 70 if mid == 1 && slices(mid) >= node 71 check = 2; 72 elseif slices(mid) <= node && mid == size(slices,2) 73 check = 2; 74 elseif slices(mid)>node && slices(mid-1)<node 75 check = 0; 76 elseif slices(mid)>node 77 check = -1; 78 elseif slices(mid) < node 79 check = 1; 80 end 81 % check 82 if check == -1 83 high = mid - 1; 84 elseif check == 1

Page 124: Multi-Material 3D-Printed Silicone Vocal Fold Models

114

85 low = mid + 1; 86 elseif check == 0 87 node = mid; 88 not_match = false; 89 elseif high > low || check == 2 90 include1 = false; 91 not_match = false; 92 end 93 end 94 z_low_index = mid; 95 96 %binary check high 97 node = triangles_new(i,14); 98 99 high= size(slices,2); 100 low = 1; 101 102 %start_point = floor((max+min)/2); 103 not_match = true; 104 while not_match 105 mid = low + floor((high - low)/2); 106 %check = comparator_floating2(match_node,nodes(mid,:),tol); 107 % if mid <= 1 108 % ghgh = 0; 109 % end 110 if mid == 1 && slices(1) <= node 111 check = 2; 112 elseif mid == size(slices,2) && slices(mid) <=node 113 check = 2; 114 elseif slices(mid)>node && slices(mid-1)<node 115 check = 0; 116 elseif slices(mid)>node 117 check = -1; 118 elseif slices(mid) < node 119 check = 1; 120 end 121 122 if check == -1 123 high = mid - 1; 124 elseif check == 1 125 low = mid + 1; 126 elseif check == 0 127 node = mid; 128 not_match = false; 129 elseif high > low || check == 2 130 include2 = false; 131 not_match = false; 132 end 133 134 end 135 z_high_index = mid; 136 if z_low_index ~=2 137 ghg = 1 138 end 139 if z_high_index > z_low_index 140 for j = z_low_index:z_high_index-1 141 z_triangles_size(j) = z_triangles_size(j) + 1;

Page 125: Multi-Material 3D-Printed Silicone Vocal Fold Models

115

142 z_triangles(j,z_triangles_size(j)) = i; 143 end 144 end 145 end 146 147 %list formed 148 'list formed' 149 triangle_checklist2 = z_triangles; 150 for k = 1:size(z_slices,2) 151 152 triangle_checklist = triangle_checklist2(k,1:z_triangles_size(k)); 153 154 [lines,linesize] =

triangle_plane_intersection(triangles_new(triangle_checklist,:), z_slices(k));

155 156 if linesize ~= 0 157 %find all the points assign nodes and remove duplicates 158 start_nodes = lines(1:linesize,1:2); 159 end_nodes = lines(1:linesize,4:5); 160 nodes = [start_nodes; end_nodes]; 161 connectivity = []; 162 tol_uniquetol = 1e-8; 163 tol = 1e-8; 164 165 nodes = uniquetol(nodes,tol_uniquetol,'ByRows',true); 166 nodes = sortrows(nodes,[1 2]); 167 168 [~, n1] = ismembertol(start_nodes, nodes, tol,

'ByRows',true); 169 [~, n2] = ismembertol(end_nodes, nodes,tol,

'ByRows',true); 170 conn1 = [n1 n2]; 171 %check for bad stl files. repeated edges, too thin surfaces, unclosed

loops 172 %enable if error encountered 173 conn2 = [n2 n1]; 174 check = ismember(conn2,conn1,'rows'); 175 conn1(check == 1,:)=[]; 176 %end check 177 178 G = graph(conn1(:,1),conn1(:,2)); 179 180 %create subgraph for connected components 181 bins = conncomp(G); 182 183 movelist =[]; 184 for i = 1: max(bins) 185 startNode = find(bins==i, 1, 'first'); 186 %path =[]; 187 path = dfsearch(G, startNode); 188 path = [path; path(1)]; 189 %list of x and y axes 190 movelist1 = [nodes(path,1) nodes(path,2)]; 191 if ~isempty(path) 192 if movelist1(1,1)>movelist1(2,1) ||

movelist1(1,2)>movelist1(2,2)

Page 126: Multi-Material 3D-Printed Silicone Vocal Fold Models

116

193 movelist1 = movelist1(end:-1:1,:); 194 end 195 end 196 %connect to the first point 197 movelist = [movelist;movelist1; [NaN NaN]]; 198 movelist_size = size(movelist,1); 199 200 end 201 movelist_all(k) = {movelist}; 202 end

D.1.9 triangle_plane_intersection.m

1 function [pts_out,size_pts_out] = triangle_plane_intersection(triangle_checklist,z_slices)

2 %this function calculates the intersection of triangles and a given plane.

3 %needed by slice_stl_create_path function 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% 5 %Sunil Bhandari 6 %3/17/2017 7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% 8 triangle_checklist = triangle_checklist'; 9 10 p1 = triangle_checklist(1:3,:); 11 p2 = triangle_checklist(4:6,:); 12 p3 = triangle_checklist(7:9,:); 13 14 c = ones(1,size(p1,2))*z_slices; 15 P = [zeros(1,size(p1,2));zeros(1, size(p1,2));ones(1,size(p1,2))]; 16 t1 = (c-sum(P.*p1))./sum(P.*(p1-p2)); 17 t2 = (c-sum(P.*p2))./sum(P.*(p2-p3)); 18 t3 = (c-sum(P.*p3))./sum(P.*(p3-p1)); 19 intersect1 = p1+bsxfun(@times,p1-p2,t1); 20 intersect2 = p2+bsxfun(@times,p2-p3,t2); 21 intersect3 = p3+bsxfun(@times,p3-p1,t3); 22 i1 =

intersect1(3,:)<max(p1(3,:),p2(3,:))&intersect1(3,:)>min(p1(3,:),p2(3,:));

23 i2 = intersect2(3,:)<max(p2(3,:),p3(3,:))&intersect2(3,:)>min(p2(3,:),p3(3,:));

24 i3 = intersect3(3,:)<max(p3(3,:),p1(3,:))&intersect3(3,:)>min(p3(3,:),p1(3,:));

25 26 27 imain = i1+i2+i3 == 2; 28 29 pts_out =

[[intersect1(:,i1&i2&imain);intersect2(:,i1&i2&imain)],[intersect2(:,i2&i3&imain);intersect3(:,i2&i3&imain)], [intersect3(:,i3&i1&imain);intersect1(:,i3&i1&imain)]];

Page 127: Multi-Material 3D-Printed Silicone Vocal Fold Models

117

30 31 pts_out = pts_out'; 32 size_pts_out = size(pts_out,1); 33 end

D.1.10 intersections.m

1 function [x0,y0,iout,jout] = intersections(x1,y1,x2,y2,robust) 2 %INTERSECTIONS Intersections of curves. 3 % Computes the (x,y) locations where two curves intersect. The curves 4 % can be broken with NaNs or have vertical segments. 5 % 6 % Example: 7 % [X0,Y0] = intersections(X1,Y1,X2,Y2,ROBUST); 8 % 9 % where X1 and Y1 are equal-length vectors of at least two points and 10 % represent curve 1. Similarly, X2 and Y2 represent curve 2. 11 % X0 and Y0 are column vectors containing the points at which the two 12 % curves intersect. 13 % 14 % ROBUST (optional) set to 1 or true means to use a slight variation of

the 15 % algorithm that might return duplicates of some intersection points, and 16 % then remove those duplicates. The default is true, but since the 17 % algorithm is slightly slower you can set it to false if you know that 18 % your curves don't intersect at any segment boundaries. Also, the

robust 19 % version properly handles parallel and overlapping segments. 20 % 21 % The algorithm can return two additional vectors that indicate which 22 % segment pairs contain intersections and where they are: 23 % 24 % [X0,Y0,I,J] = intersections(X1,Y1,X2,Y2,ROBUST); 25 % 26 % For each element of the vector I, I(k) = (segment number of (X1,Y1)) + 27 % (how far along this segment the intersection is). For example, if I(k)

= 28 % 45.25 then the intersection lies a quarter of the way between the line 29 % segment connecting (X1(45),Y1(45)) and (X1(46),Y1(46)). Similarly for 30 % the vector J and the segments in (X2,Y2). 31 % 32 % You can also get intersections of a curve with itself. Simply pass in 33 % only one curve, i.e., 34 % 35 % [X0,Y0] = intersections(X1,Y1,ROBUST); 36 % 37 % where, as before, ROBUST is optional. 38 39 % Version: 2.0, 25 May 2017 40 % Author: Douglas M. Schwarz 41 % Email: dmschwarz=ieee*org, dmschwarz=urgrad*rochester*edu 42 % Real_email = regexprep(Email,{'=','*'},{'@','.'}) 43 44 45 % Theory of operation:

Page 128: Multi-Material 3D-Printed Silicone Vocal Fold Models

118

46 % 47 % Given two line segments, L1 and L2, 48 % 49 % L1 endpoints: (x1(1),y1(1)) and (x1(2),y1(2)) 50 % L2 endpoints: (x2(1),y2(1)) and (x2(2),y2(2)) 51 % 52 % we can write four equations with four unknowns and then solve them.

The 53 % four unknowns are t1, t2, x0 and y0, where (x0,y0) is the intersection

of 54 % L1 and L2, t1 is the distance from the starting point of L1 to the 55 % intersection relative to the length of L1 and t2 is the distance from

the 56 % starting point of L2 to the intersection relative to the length of L2. 57 % 58 % So, the four equations are 59 % 60 % (x1(2) - x1(1))*t1 = x0 - x1(1) 61 % (x2(2) - x2(1))*t2 = x0 - x2(1) 62 % (y1(2) - y1(1))*t1 = y0 - y1(1) 63 % (y2(2) - y2(1))*t2 = y0 - y2(1) 64 % 65 % Rearranging and writing in matrix form, 66 % 67 % [x1(2)-x1(1) 0 -1 0; [t1; [-x1(1); 68 % 0 x2(2)-x2(1) -1 0; * t2; = -x2(1); 69 % y1(2)-y1(1) 0 0 -1; x0; -y1(1); 70 % 0 y2(2)-y2(1) 0 -1] y0] -y2(1)] 71 % 72 % Let's call that A*T = B. We can solve for T with T = A\B. 73 % 74 % Once we have our solution we just have to look at t1 and t2 to

determine 75 % whether L1 and L2 intersect. If 0 <= t1 < 1 and 0 <= t2 < 1 then the

two 76 % line segments cross and we can include (x0,y0) in the output. 77 % 78 % In principle, we have to perform this computation on every pair of line 79 % segments in the input data. This can be quite a large number of pairs

so 80 % we will reduce it by doing a simple preliminary check to eliminate line 81 % segment pairs that could not possibly cross. The check is to look at

the 82 % smallest enclosing rectangles (with sides parallel to the axes) for

each 83 % line segment pair and see if they overlap. If they do then we have to 84 % compute t1 and t2 (via the A\B computation) to see if the line segments 85 % cross, but if they don't then the line segments cannot cross. In a 86 % typical application, this technique will eliminate most of the

potential 87 % line segment pairs. 88 89 90 % Input checks. 91 if verLessThan('matlab','7.13') 92 error(nargchk(2,5,nargin)) %#ok<NCHKN> 93 else

Page 129: Multi-Material 3D-Printed Silicone Vocal Fold Models

119

94 narginchk(2,5) 95 end 96 97 % Adjustments based on number of arguments. 98 switch nargin 99 case 2 100 robust = true; 101 x2 = x1; 102 y2 = y1; 103 self_intersect = true; 104 case 3 105 robust = x2; 106 x2 = x1; 107 y2 = y1; 108 self_intersect = true; 109 case 4 110 robust = true; 111 self_intersect = false; 112 case 5 113 self_intersect = false; 114 end 115 116 % x1 and y1 must be vectors with same number of points (at least 2). 117 if sum(size(x1) > 1) ~= 1 || sum(size(y1) > 1) ~= 1 || ... 118 length(x1) ~= length(y1) 119 error('X1 and Y1 must be equal-length vectors of at least 2 points.') 120 end 121 % x2 and y2 must be vectors with same number of points (at least 2). 122 if sum(size(x2) > 1) ~= 1 || sum(size(y2) > 1) ~= 1 || ... 123 length(x2) ~= length(y2) 124 error('X2 and Y2 must be equal-length vectors of at least 2 points.') 125 end 126 127 128 % Force all inputs to be column vectors. 129 x1 = x1(:); 130 y1 = y1(:); 131 x2 = x2(:); 132 y2 = y2(:); 133 134 % Compute number of line segments in each curve and some differences

we'll 135 % need later. 136 n1 = length(x1) - 1; 137 n2 = length(x2) - 1; 138 xy1 = [x1 y1]; 139 xy2 = [x2 y2]; 140 dxy1 = diff(xy1); 141 dxy2 = diff(xy2); 142 143 144 % Determine the combinations of i and j where the rectangle enclosing the 145 % i'th line segment of curve 1 overlaps with the rectangle enclosing the 146 % j'th line segment of curve 2. 147 148 % Original method that works in old MATLAB versions, but is slower than 149 % using binary singleton expansion (explicit or implicit).

Page 130: Multi-Material 3D-Printed Silicone Vocal Fold Models

120

150 % [i,j] = find( ... 151 % repmat(mvmin(x1),1,n2) <= repmat(mvmax(x2).',n1,1) & ... 152 % repmat(mvmax(x1),1,n2) >= repmat(mvmin(x2).',n1,1) & ... 153 % repmat(mvmin(y1),1,n2) <= repmat(mvmax(y2).',n1,1) & ... 154 % repmat(mvmax(y1),1,n2) >= repmat(mvmin(y2).',n1,1)); 155 156 % Select an algorithm based on MATLAB version and number of line 157 % segments in each curve. We want to avoid forming large matrices for 158 % large numbers of line segments. If the matrices are not too large, 159 % choose the best method available for the MATLAB version. 160 if n1 > 1000 || n2 > 1000 || verLessThan('matlab','7.4') 161 % Determine which curve has the most line segments. 162 if n1 >= n2 163 % Curve 1 has more segments, loop over segments of curve 2. 164 ijc = cell(1,n2); 165 min_x1 = mvmin(x1); 166 max_x1 = mvmax(x1); 167 min_y1 = mvmin(y1); 168 max_y1 = mvmax(y1); 169 for k = 1:n2 170 k1 = k + 1; 171 ijc{k} = find( ... 172 min_x1 <= max(x2(k),x2(k1)) & max_x1 >= min(x2(k),x2(k1))

& ... 173 min_y1 <= max(y2(k),y2(k1)) & max_y1 >=

min(y2(k),y2(k1))); 174 ijc{k}(:,2) = k; 175 end 176 ij = vertcat(ijc{:}); 177 i = ij(:,1); 178 j = ij(:,2); 179 else 180 % Curve 2 has more segments, loop over segments of curve 1. 181 ijc = cell(1,n1); 182 min_x2 = mvmin(x2); 183 max_x2 = mvmax(x2); 184 min_y2 = mvmin(y2); 185 max_y2 = mvmax(y2); 186 for k = 1:n1 187 k1 = k + 1; 188 ijc{k}(:,2) = find( ... 189 min_x2 <= max(x1(k),x1(k1)) & max_x2 >= min(x1(k),x1(k1))

& ... 190 min_y2 <= max(y1(k),y1(k1)) & max_y2 >=

min(y1(k),y1(k1))); 191 ijc{k}(:,1) = k; 192 end 193 ij = vertcat(ijc{:}); 194 i = ij(:,1); 195 j = ij(:,2); 196 end 197 198 elseif verLessThan('matlab','9.1') 199 % Use bsxfun. 200 [i,j] = find( ... 201 bsxfun(@le,mvmin(x1),mvmax(x2).') & ... 202 bsxfun(@ge,mvmax(x1),mvmin(x2).') & ...

Page 131: Multi-Material 3D-Printed Silicone Vocal Fold Models

121

203 bsxfun(@le,mvmin(y1),mvmax(y2).') & ... 204 bsxfun(@ge,mvmax(y1),mvmin(y2).')); 205 206 else 207 % Use implicit expansion. 208 [i,j] = find( ... 209 mvmin(x1) <= mvmax(x2).' & mvmax(x1) >= mvmin(x2).' & ... 210 mvmin(y1) <= mvmax(y2).' & mvmax(y1) >= mvmin(y2).'); 211 212 end 213 214 215 % Find segments pairs which have at least one vertex = NaN and remove

them. 216 % This line is a fast way of finding such segment pairs. We take 217 % advantage of the fact that NaNs propagate through calculations, in 218 % particular subtraction (in the calculation of dxy1 and dxy2, which we 219 % need anyway) and addition. 220 % At the same time we can remove redundant combinations of i and j in the 221 % case of finding intersections of a line with itself. 222 if self_intersect 223 remove = isnan(sum(dxy1(i,:) + dxy2(j,:),2)) | j <= i + 1; 224 else 225 remove = isnan(sum(dxy1(i,:) + dxy2(j,:),2)); 226 end 227 i(remove) = []; 228 j(remove) = []; 229 230 % Initialize matrices. We'll put the T's and B's in matrices and use

them 231 % one column at a time. AA is a 3-D extension of A where we'll use one 232 % plane at a time. 233 n = length(i); 234 T = zeros(4,n); 235 AA = zeros(4,4,n); 236 AA([1 2],3,:) = -1; 237 AA([3 4],4,:) = -1; 238 AA([1 3],1,:) = dxy1(i,:).'; 239 AA([2 4],2,:) = dxy2(j,:).'; 240 B = -[x1(i) x2(j) y1(i) y2(j)].'; 241 242 % Loop through possibilities. Trap singularity warning and then use 243 % lastwarn to see if that plane of AA is near singular. Process any such 244 % segment pairs to determine if they are colinear (overlap) or merely 245 % parallel. That test consists of checking to see if one of the

endpoints 246 % of the curve 2 segment lies on the curve 1 segment. This is done by 247 % checking the cross product 248 % 249 % (x1(2),y1(2)) - (x1(1),y1(1)) x (x2(2),y2(2)) - (x1(1),y1(1)). 250 % 251 % If this is close to zero then the segments overlap. 252 253 % If the robust option is false then we assume no two segment pairs are 254 % parallel and just go ahead and do the computation. If A is ever

singular 255 % a warning will appear. This is faster and obviously you should use it

Page 132: Multi-Material 3D-Printed Silicone Vocal Fold Models

122

256 % only when you know you will never have overlapping or parallel segment 257 % pairs. 258 259 if robust 260 overlap = false(n,1); 261 warning_state = warning('off','MATLAB:singularMatrix'); 262 % Use try-catch to guarantee original warning state is restored. 263 try 264 lastwarn('') 265 for k = 1:n 266 T(:,k) = AA(:,:,k)\B(:,k); 267 [unused,last_warn] = lastwarn; %#ok<ASGLU> 268 lastwarn('') 269 if strcmp(last_warn,'MATLAB:singularMatrix') 270 % Force in_range(k) to be false. 271 T(1,k) = NaN; 272 % Determine if these segments overlap or are just

parallel. 273 overlap(k) = rcond([dxy1(i(k),:);xy2(j(k),:) -

xy1(i(k),:)]) < eps; 274 end 275 end 276 warning(warning_state) 277 catch err 278 warning(warning_state) 279 rethrow(err) 280 end 281 % Find where t1 and t2 are between 0 and 1 and return the

corresponding 282 % x0 and y0 values. 283 in_range = (T(1,:) >= 0 & T(2,:) >= 0 & T(1,:) <= 1 & T(2,:) <= 1).'; 284 % For overlapping segment pairs the algorithm will return an 285 % intersection point that is at the center of the overlapping region. 286 if any(overlap) 287 ia = i(overlap); 288 ja = j(overlap); 289 % set x0 and y0 to middle of overlapping region. 290 T(3,overlap) = (max(min(x1(ia),x1(ia+1)),min(x2(ja),x2(ja+1)))

+ ... 291 min(max(x1(ia),x1(ia+1)),max(x2(ja),x2(ja+1)))).'/2; 292 T(4,overlap) = (max(min(y1(ia),y1(ia+1)),min(y2(ja),y2(ja+1)))

+ ... 293 min(max(y1(ia),y1(ia+1)),max(y2(ja),y2(ja+1)))).'/2; 294 selected = in_range | overlap; 295 else 296 selected = in_range; 297 end 298 xy0 = T(3:4,selected).'; 299 300 % Remove duplicate intersection points. 301 [xy0,index] = unique(xy0,'rows'); 302 x0 = xy0(:,1); 303 y0 = xy0(:,2); 304 305 % Compute how far along each line segment the intersections are. 306 if nargout > 2 307 sel_index = find(selected);

Page 133: Multi-Material 3D-Printed Silicone Vocal Fold Models

123

308 sel = sel_index(index); 309 iout = i(sel) + T(1,sel).'; 310 jout = j(sel) + T(2,sel).'; 311 end 312 else % non-robust option 313 for k = 1:n 314 [L,U] = lu(AA(:,:,k)); 315 T(:,k) = U\(L\B(:,k)); 316 end 317 318 % Find where t1 and t2 are between 0 and 1 and return the

corresponding 319 % x0 and y0 values. 320 in_range = (T(1,:) >= 0 & T(2,:) >= 0 & T(1,:) < 1 & T(2,:) < 1).'; 321 x0 = T(3,in_range).'; 322 y0 = T(4,in_range).'; 323 324 % Compute how far along each line segment the intersections are. 325 if nargout > 2 326 iout = i(in_range) + T(1,in_range).'; 327 jout = j(in_range) + T(2,in_range).'; 328 end 329 end 330 331 % Plot the results (useful for debugging). 332 % plot(x1,y1,x2,y2,x0,y0,'ok'); 333 334 function y = mvmin(x) 335 % Faster implementation of movmin(x,k) when k = 1. 336 y = min(x(1:end-1),x(2:end)); 337 338 function y = mvmax(x) 339 % Faster implementation of movmax(x,k) when k = 1. 340 y = max(x(1:end-1),x(2:end));

D.2 Vocal Fold Geometry Validation

The following MATLAB code was created to process the micro-CT scanned images of

the VF model as outlined in Sec. 4.3.

D.2.1 VF_Geometry_Validation_V4.m

1 % Filename: VF_Geometry_Validation_V4.m 2 % Written by: Clayton Young 3 % For: Thomson Lab, BYU 4 % Date: 4/13/2022 5 6 %Script used to validate the geometry of micro-CT scanned VF model with

STL 7 %overlay. 8

Page 134: Multi-Material 3D-Printed Silicone Vocal Fold Models

124

9 clear all; close all; clc; 10 11 %% Import Dicom Images 12 filedir = uigetdir([],'Select Folder of Dicom Images'); 13 % filedir = 'C:\Users\Clayton Young\MATLAB Drive\3DPrinting\VF Geometry

Validation\Dicom_VF_Mounted_9_16_2021_42_20210916_104020'; 14 matfiles = dir(fullfile(filedir, '*.dcm')); 15 nfiles = length(matfiles); 16 17 for i = 1:nfiles 18 images(:,:,i) = dicomread(fullfile(filedir, matfiles(i).name)); 19 Ainfo = dicominfo(fullfile(filedir, matfiles(i).name)); 20 end 21 22 images = permute(images,[3 1 2]); %change dicom view orientation 23 24 % scale = 0.0719999969; %mm 25 % offset = ceil(1/scale); %mm 26 27 start = 175; %starting image 28 finish = 329; %ending image 29 30 31 %% Select top & bottom of orifice and generate pixel-to-mm scale 32 33 figure('Name','Set PPMM Scale'); 34 imshow(images(:,:,start),'DisplayRange',[]); 35 title('Select left side of 3D printed mount') 36 [xtop,ytop]=ginput(1); 37 xtop=round(xtop); 38 ytop=round(ytop); 39 title('Select right side of 3D printed mount') 40 [xbottom,ybottom]=ginput(1); 41 xbottom=round(xbottom); 42 ybottom=round(ybottom); 43 dist = sqrt((xtop-xbottom)^2+(ytop-ybottom)^2); 44 KnownDistance = 10.5; %mm 45 ppmm = dist/KnownDistance; % (pixels / mm scale) 46 47 %%Image Registration 48 49 for nCol=start:finish %nfiles 50 51 A=imadjust(images(:,:,nCol),[3200/65535,4100/65535],[0 1]); %Adjust

image contrast 52 53 % A = flip(A,1); %flip image if needed 54 % A = flip(A,2); %flip image if needed 55 56 if nCol == start 57 cropCoord = [185.51,4.51,171.98,289.98]; 58 % [~,cropCoord] = imcrop(A); %crop image. Uncomment to

redefine crop for image registration 59 A = imcrop(A,cropCoord); %crop current image 60 angle = horizon(A); %find angle to straighten image 61 A = imrotate(A, -angle, 'bicubic'); %rotate image 62 fixed = A; %create fixed image for image registration comparison

Page 135: Multi-Material 3D-Printed Silicone Vocal Fold Models

125

63 Anr = A; %create non-registered image for later comparison 64 65 else 66 A = imcrop(A,cropCoord); %crop current image 67 A = imrotate(A, -angle, 'bicubic'); %allign current image 68 moving = A; %set current image as the moving image for image

registration 69 70 %set configuration setting for image registration 71 [optimizer, metric] = imregconfig('monomodal'); 72 optimizer.GradientMagnitudeTolerance = 1.0000e-03; 73 optimizer.MaximumStepLength = 0.0625; 74 optimizer.MinimumStepLength = 1.0000e-05; 75 optimizer.MaximumIterations = 100; 76 optimizer.RelaxationFactor = 0.5000; 77 78 Anr = A; %create non-registered image for later comparison 79 A = imregister(moving, fixed, 'affine', optimizer,

metric); %perform image registration 80 end 81 82 if nCol == start 83 fig2 = figure('Name','Crop VF: Draw Box > Right Click > Select

"Crop Image"','NumberTitle','off'); %instructions for cropping 84 [D,cropVF] = imcrop(A); %crop just VF removing mount 85 Dnr = imcrop(Anr,cropVF); %crop unregistered VF removing mount 86 else 87 D = imcrop(A,cropVF); %crop just VF removing mount 88 Dnr = imcrop(Anr,cropVF); %crop unregistered VF removing mount 89 end 90 91 %% Find VF perimeter 92 BW = imbinarize(D); %make current image BW 93 BWnr = imbinarize(Dnr); %make current unregistered image BW 94 if nCol == start 95 96 %find perimeter boundaries for current image 97 [BWbound,BWLabels,BWnum,BWadj] = bwboundaries(BW); 98 BWedge = zeros(size(BWLabels)); 99 for i = 1:length(BWbound{1}(:,1)) 100 BWedge(BWbound{1}(i,1),BWbound{1}(i,2)) = 1; 101 end 102 103 %find perimeter boundaries for current unregistered image 104 [BWboundnr,BWLabelsnr,BWnumnr,BWadjnr] = bwboundaries(BWnr); 105 BWedgenr = zeros(size(BWLabelsnr)); 106 for i = 1:length(BWboundnr{1}(:,1)) 107 BWedgenr(BWboundnr{1}(i,1),BWboundnr{1}(i,2)) = 1; 108 end 109 edge = BWedge; 110 edgenr = BWedgenr; 111 else 112 113 %find perimeter boundaries for current image 114 [BWbound,BWLabels,BWnum,BWadj] = bwboundaries(BW); 115 edge = zeros(size(BWLabels)); 116 for i = 1:length(BWbound{1}(:,1))

Page 136: Multi-Material 3D-Printed Silicone Vocal Fold Models

126

117 edge(BWbound{1}(i,1),BWbound{1}(i,2)) = 1; 118 end 119 120 %find perimeter boundaries for current unregistered image 121 [BWboundnr,BWLabelsnr,BWnumnr,BWadjnr] = bwboundaries(BWnr); 122 edgenr = zeros(size(BWLabelsnr)); 123 for i = 1:length(BWboundnr{1}(:,1)) 124 edgenr(BWboundnr{1}(i,1),BWboundnr{1}(i,2)) = 1; 125 end 126 127 %create matrices of registered perimeters of images 128 BWedgeMat(:,:,nCol-start) = edge; 129 130 %create single matrix of all perimeters of images 131 BWedge = BWedge + edge; 132 BWedgenr = BWedgenr + edgenr; 133 end 134 135 %% Compare registered and nonregistered images 136 if nCol == start 137 fig3 = figure('Units','inches'); 138 fig3.Position = [0.25 0.25 3.25 2.75]*3; 139 end 140 figure(3) 141 subplot(3,2,1) 142 imshow(D) 143 title('Image Registration') 144 subplot(3,2,2) 145 imshow(Dnr) 146 title('No Image Registeration') 147 subplot(3,2,3) 148 imshow(edge) 149 subplot(3,2,4) 150 imshow(edgenr) 151 subplot(3,2,5) 152 imshow(BWedge) 153 subplot(3,2,6) 154 imshow(BWedgenr) 155 156 end 157 %% Plot ISO of VF perimeters 158 figure(4) 159 for i = 1:5:length(BWedgeMat(1,1,:)) %only every 5th perimter 160 [y1,x1] = find(BWedgeMat(:,:,i)); 161 hold on 162 plot3(x1,i*ppmm*ones(length(x1),1),y1,'k.') 163 view([1 1 1]) 164 xlabel('x') 165 ylabel('y') 166 zlabel('z') 167 end 168 169 %% Comparison on image and non registered images 170 171 maxVal = max(BWedge,[],'all')/10; 172 maxValnr = max(BWedgenr,[],'all')/10; 173

Page 137: Multi-Material 3D-Printed Silicone Vocal Fold Models

127

174 figure(5) 175 subplot(1,2,1) 176 imshow(imcomplement(BWedge/maxVal)); 177 set(gca, 'YDir','normal') 178 title('Image Registration') 179 subplot(1,2,2) 180 imshow(imcomplement(BWedgenr/maxValnr)); 181 set(gca, 'YDir','normal') 182 title('No Image Registration') 183 184 %% Create DXF 185 186 obj = read_binary_stl_file('VFModel.STL'); %import STL file 187 188 % Find max and min Z of STL's 189 min_z = min([obj(:,3); obj(:,6);obj(:,9)]); 190 max_z = max([obj(:,3); obj(:,6);obj(:,9)]); 191 192 layers = min_z:0.5:max_z; 193 [DXFpts,z_slices] = slice_stl_create_path(obj,layers); %slice STL to

DXF 194 DXFpts{2} = DXFpts{2}*ppmm; %scale DXF 195 196 197 % Estimate placement of DXF corner and top for optimization input 198 DXFcorner = find(BWedge(1,:) > 1,1); 199 [BWrow,BWcol] = find(BWedge); 200 DXFtop = max(BWrow); 201 maxVFy = max(DXFpts{2}(:,2)); 202 y = [DXFcorner+4, (DXFtop - maxVFy)-4]; %Guess DXF position 203 204 % Remove bottom of VF perimeter to not skew opimazation and results 205 BWedge(1,:) = 0; 206 207 % Optimize DXF position 208 options = optimoptions('fminunc','MaxFunctionEvaluations',3000000,... 209 'MaxIterations',30000,'StepTolerance',1e-10); % Increase the number

of iterations and function evaluations 210 [yopt, fopt] = fminunc(@(y)dxfplace(y,BWedge,DXFpts,ppmm),y,options); 211 DXFcorner = yopt(1); 212 DXFtop = yopt(2); 213 214 % Assign DXF position 215 DXFpts{2}(:,1) = DXFpts{2}(:,1) + DXFcorner; 216 DXFpts{2}(:,2) = DXFpts{2}(:,2) + DXFtop; 217 218 DXF = polyshape(DXFpts{2}); %Create polygon of DXF 219 %% CT DXF Overlay Plot 220 221 BWedgeClean = BWedge; 222 BWedgeClean(1:30,35:135) = 0; % clean off bottom defects from glue 223 224 fig6 = figure('Units','Inches'); 225 imshow(imcomplement(BWedgeClean/maxVal),'Border','tight'); 226 set(gca,'YDir','normal') 227 228

Page 138: Multi-Material 3D-Printed Silicone Vocal Fold Models

128

229 fig6.Position(3:4) = [length(BWedge(1,:)),length(BWedge(:,1))]/40; 230 231 [DXFbtmIDX] = find(abs(DXFpts{2}(:,2) - min(DXFpts{2}(:,2))) < 0.0001); 232 DXFptsPlot = DXFpts{2}; 233 DXFptsPlot(DXFbtmIDX,2) = DXFptsPlot(DXFbtmIDX,2) - 20; 234 235 DXFplot = polyshape(DXFptsPlot); %Create polygon of DXF with VF bottom

lowered 236 237 %Plot DXF 238 % figure(6) 239 hold on 240 plot(DXFplot,'LineWidth',2,'EdgeColor','red','FaceAlpha',0) 241 hold on 242 % buffer = max(d_min,[],'all')/ppmm; %mm 243 buffer = 0.5; %mm 244 DXFin = polybuffer(DXFplot,-buffer*ppmm); 245 DXFout = polybuffer(DXFplot,buffer*ppmm); 246 plot(DXFin,'LineStyle','--

','LineWidth',1,'EdgeColor','red','FaceAlpha',0) 247 plot(DXFout,'LineStyle','--

','LineWidth',1,'EdgeColor','red','FaceAlpha',0) 248 hold on 249 250 ylim([0 max(DXFpts{2}(:,2))+buffer*ppmm]) 251 xlim([0 max(DXFout.Vertices(:,1))+buffer*ppmm]) 252 253 printname = ['CT_VF_' num2str(buffer) '.emf']; 254 print(printname,'-dmeta') % Prints figure in color 255 256 wrap = [DXF.Vertices(end,:); DXF.Vertices]; 257 258 %% Calculate avg error of each pixel to DXF 259 clear d_min 260 for nRow = 1:length(BWedge(:,1)) 261 for nCol = 1:length(BWedge(1,:)) 262 if BWedge(nRow,nCol) > 1 263 [d_min(nRow,nCol)] = p_poly_dist(nCol,nRow, wrap(:,1),

wrap(:,2)); %distance calc 264 else 265 [d_min(nRow,nCol)] = 0; 266 end 267 end 268 end 269 totalPixels = sum(sum(BWedge)); %Sum of all pixels 270 avgError = (sum(sum(abs(d_min.*BWedge))))/totalPixels/ppmm %Avg error

of pixels 271 272 %% Image complement of registered and non-registered image 273 figure(7) 274 imshowpair(imcomplement(BWedge/maxVal),imcomplement(BWedgenr/maxValnr),

'Scaling','joint') 275 set(gca, 'YDir','normal') 276 title('Comparison of Image Registration and Non-registration') 277 278 %% Function for DXF placement optimization 279 function avgError = dxfplace(y,BWedge,DXF,ppmm)

Page 139: Multi-Material 3D-Printed Silicone Vocal Fold Models

129

280 DXFptsFunc = DXF; 281 282 DXFptsFunc{2}(:,1) = DXFptsFunc{2}(:,1) + y(1); % x(1) = BWcorner

shifting polygon with initial conditions 283 DXFptsFunc{2}(:,2) = DXFptsFunc{2}(:,2) + y(2); % x(2) = BWTop shifting

polygon with initial conditions 284 DXFfunc = polyshape(DXFptsFunc{2}); % Make polygon 285 wrap = [DXFfunc.Vertices(end,:); DXFfunc.Vertices]; %Close polygon 286 clear d_min 287 for nRow = 1:length(BWedge(:,1)) 288 for nCol = 1:length(BWedge(1,:)) 289 if BWedge(nRow,nCol) >= 1 290 [d_min(nRow,nCol)] = p_poly_dist(nCol,nRow, wrap(:,1),

wrap(:,2)); 291 else 292 [d_min(nRow,nCol)] = 0; 293 end 294 end 295 end 296 totalPixels = sum(sum(BWedge)); 297 avgError = (sum(sum(abs(d_min.*BWedge))))/totalPixels/ppmm 298 end

D.3 Kymograph Image Processing

The following MATLAB code was created to process high-speed videos of VF models

and to output the kymograph, frequency, and glottal width over seven periods.

D.3.1 VKG.m

1 % Filename: VKG.m 2 % Written by: Scott Thomson [December 22, 2008; revised June 2021] 3 % Modified by: Clayton Young 4 % For: Thomson Lab, BYU 5 % Date: 4/5/2022 6 7 % Program to analyze images from high-speed glottal videos 8 9 %% Clear all variables and close all figures 10 clear all; close all; 11 12 %% Directory and filenames 13 % 14 % FileDir: Directory of images (need to have previously converted video to 15 % stills to generate the images) 16 % 17 % FileName: Name of still calibration image 18 % 19 20 % for original dataset

Page 140: Multi-Material 3D-Printed Silicone Vocal Fold Models

130

21 % folder_name = ['C:\Users\Clayton Young\OneDrive - BYU\Research\Thesis\SLOMO Video 6-16,17\'];

22 23 folder_name = ['C:\Users\Clayton Young\OneDrive -

BYU\Research\Thesis\SLOMO Video Redo 2-9-22\']; 24 [file_names,path] = uigetfile('*.mov',... 25 'Select One or More Files', ... 26 'MultiSelect', 'on'); 27 28 start = 1; 29 finish = 4; 30 nVid = finish - start + 1; 31 nPeriod = 7; % number of periods to use for calculations 32 FileNameVec = cell([nVid,1]); 33 for k = 1:nVid 34 close all; 35 36 % for original dataset 37 % file_name = ['VSG1.' num2str(start+k-1) '_notension']; 38 % file_name = ['VSG1.' num2str(start+k-1)]; 39 40 41 file_name = file_names{k}(1:end-4) 42 43 FileNameVec{k} = file_name; 44 45 % check if JPG's have already been processed 46 if isfolder([folder_name file_name '_JPGs']) == 0 47 convertVideo2JPG([file_name '.MOV'], folder_name) 48 end 49 50 % select file for calibration 51 ManualSelect = 1; 52 if ManualSelect == 0 53 FileDir = [folder_name]; 54 FileDirJPG = [folder_name [file_name '_JPGs\']]; 55 FileName = ['000001.jpg']; 56 else 57 [FileName, FileDir] = uigetfile('./*', 'Select image'); 58 end 59 CalibFile = [FileDirJPG FileName]; 60 61 %% Define processing parameters 62 % 63 % NImages: Number of images to process 64 % 65 % dx: Width of image region (in pixels) used to calculate glottal area 66 % 67 % Thresh: Threshold value used to calculate glottal area. This should be 68 % adjusted based on lighting. All pixels with 69 % intensity values lower than Thresh will count towards glottal area 70 % calculation. These pixels will be colored green in images as this code 71 % is executed. It's important to watch the animations to make sure that 72 % (1) the glottal area does not go outside of the defined ROI, and (2) 73 % the glottis (and only the glottis) is colored green (no green pixels 74 % outside of glottis). 75 %

Page 141: Multi-Material 3D-Printed Silicone Vocal Fold Models

131

76 NImages = 600; 77 dx = 45; 78 Thresh = 35; %60 for all files except 45 for VSG1.1 79 80 %% Image & video parameters 81 % 82 % Scale: Physical distance between points selected for calibration (top

and 83 % bottom of orifice) [mm] 84 % 85 % fps: Frames per second 86 % 87 Scale = 18.45; 88 fps = 5912.408; 89 90 %% Calibrate using first image 91 % 1. Load and display image 92 % 2. Wait for user to click on top & bottom of orifice 93 % 3. Calculate distance between top & bottom of orifice in pixels (dist) 94 % 4. Using variables dist and Scale, calculate pixel-to-mm scale (ppmm) 95 B = double(rgb2gray(imread(CalibFile))); 96 figure(1) 97 imshow(uint8(B)); 98 title(['Select top of orifice']) 99 [xtop,ytop] = ginput(1) 100 title(['Select bottom of orifice']) 101 [xbottom,ybottom] = ginput(1) 102 dist = sqrt((xtop - xbottom)^2 + (ytop - ybottom)^2); 103 ppmm = dist/Scale; 104 105 %% Round ginput values for subsequent image processing 106 xtop = round(xtop); 107 ytop = round(ytop); 108 xbottom = round(xbottom); 109 ybottom = round(ybottom); 110 111 %% Define left & right boundaries in which glottal area will be

calculated 112 xLimit_L = round(mean(xtop,xbottom)) - dx; 113 xLimit_R = round(mean(xtop,xbottom)) + dx; 114 115 %% Loop to process all images 116 mm = 0; 117 tic 118 for i = 1:NImages 119 120 %% Read image and convert to double 121 ImageName = [FileDirJPG num2str(i,'%0.6d') '.jpg']; 122 A = rgb2gray(imread(ImageName)); 123 C = double(A); 124 125 %% Display original image 126 % Superimpose top & bottom orifice lines as well as also lateral

lines. 127 % The orifice area will be calculated within this bounding box, so

make 128 % sure that the orifice is always contained within these lines.

Page 142: Multi-Material 3D-Printed Silicone Vocal Fold Models

132

129 % 130 % This first section is a counter to speed up processing by only 131 % updating image every jth image. It also displays the image number

to 132 % show progress. 133 j = 2; 134 if rem(i,j) == 0 135 mm = 1; 136 i 137 elseif rem(i,j) ~= 0 138 mm = 0; 139 end 140 141 % In top panel of figure (there will be 3 panels), show image with 142 % superimposed lines 143 if mm == 1 144 figure(2) 145 subplot(311) 146 image(A); axis xy 147 shading interp 148 colormap gray 149 hold on 150 plot([0 size(C,2)],[ytop ytop],'r',... 151 [0 size(C,2)],[ybottom ybottom],'r') 152 plot([xLimit_L xLimit_L],[ybottom ytop],'r',... 153 [xLimit_R xLimit_R],[ybottom ytop],'r') 154 plot([xtop,xbottom],[ytop,ybottom],'r--'); 155 hold off 156 end 157 158 %% Middle panel: plot intensity along anterior-posterior midline 159 y = round(ytop + (ybottom - ytop)/2); 160 if mm == 1 161 subplot(312) 162 plot(xLimit_L:xLimit_R,C(y,xLimit_L:xLimit_R)) 163 xlim([0 size(A,2)]); ylim([0 max(max(double(A)))+25]) 164 end 165 166 %% Store intensities along anterior-posterior midline for VKG 167 GrayProfile(i,:) = A(y,:); 168 169 %% Calculate glottal width 170 % First find section of anterior-posterior midline that is in

glottis. 171 % It's important to make sure that this is only picking up pixels

in 172 % the glottis. 173 clear GWTemp 174 First = 0; 175 for nn = xLimit_L:xLimit_R 176 if GrayProfile(i,nn) > Thresh 177 GWTemp(nn) = 0; 178 elseif GrayProfile(i,nn) <= Thresh 179 GWTemp(nn) = 1; 180 if First == 0 181 GWLeft = nn; 182 end

Page 143: Multi-Material 3D-Printed Silicone Vocal Fold Models

133

183 First = 1; 184 end 185 end 186 % Calculate glottal width 187 GW(i) = sum(GWTemp); 188 189 %% Identify and plot pixels with intensity > Thresh (colored green) 190 % D: Convert grayscale image to binary image 191 % E(:,:,1): Red channel 192 % E(:,:,2): Green channel 193 % E(:,:,3): Blue channel 194 D = im2bw(C(:,xLimit_L:xLimit_R,1)/255,Thresh/255); 195 E(:,xLimit_L:xLimit_R,1) = C(:,xLimit_L:xLimit_R,1)/255; % Red

channel 196 E(:,xLimit_L:xLimit_R,2) = 1 - D; % Green channel 197 E(:,xLimit_L:xLimit_R,3) = C(:,xLimit_L:xLimit_R,1)/255; % Blue

channel 198 % Plot pixels with intensity > Thresh as well as line from left

edge of 199 % orifice to right edge 200 if mm == 1 201 subplot(313) 202 image(E); axis xy; % All pixels with intensity > Thresh are

green 203 hold on 204 plot([GWLeft GWLeft+GW(i)],[y y],'ro-'); 205 hold off 206 xlim([0 size(A,2)]); 207 end 208 209 %% Calculate orifice area 210 % Note: In D, pixel value 1 = outside orifice, 0 = inside orifice 211 % The belwo calculations are restricted to the area just around 212 % orifice (e.g., midpoint +/-dx as defined above). 213 % 214 % Below are two ways of calculating area. The first is using the 215 % function bwarea. According to MATLAB, bwarea "estimates the area

of 216 % the objects in [the binary image]." The output of bwarea is a

"scalar 217 % whose value corresponds roughly to the total number of 'on'

pixels in 218 % the image, but may not be exactly the same because different

patterns 219 % of pixels are weighted differently." 220 % 221 % The second way of calculating area is just counting the number of 222 % "on" pixels. 223 % 224 % The first way may be more accurate than the second, but the

second is 225 % very straightforward. A quick comparison between the two methods 226 % using one video showed that the two methods differed by, at most, 227 % <0.25% of the maximum area. I haven't carefully or rigorously 228 % compared the two methods, though. 229 %

Page 144: Multi-Material 3D-Printed Silicone Vocal Fold Models

134

230 % Just uncomment the method you want to use (and comment out the other

231 % one). 232 % DArea_1(i) = (size(D,1)*size(D,2) - bwarea(D)); 233 DArea(i) = (sum(sum(double(1-D)))-1); 234 235 %% Command to update images as code is executed 236 drawnow 237 238 end 239 240 ProcessTime = toc 241 242 %% Convert area and glottal width to mm^2 and mm, respectively 243 DArea = DArea/ppmm^2; 244 % DArea_1 = DArea_1/ppmm^2; % Uncomment if using DArea_1 calculation

above 245 GWidth = GW/ppmm; 246 247 %% Generate time vector 248 MaxTime = (NImages-1)/fps; 249 Time = 0:1/fps:MaxTime; 250 251 %% Find frequency 252 % First find two times when area successively crosses threshold value 253 % (defined below as HalfArea = average of maximum and minimum area

values). 254 % Period is the difference between these two times. Frequency is one

over 255 % period. This code just uses one period; accuracy could possibly be 256 % improved by averaging over multiple periods. 257 MaxArea = max(DArea); 258 MinArea = min(DArea); 259 HalfArea = MinArea + (MaxArea - MinArea)/2; 260 Cross = 1; 261 i = 1; 262 Period = 1; 263 while length(Period) <= nPeriod + 1 264 if mod(Cross,2) == 1 265 if DArea(i+1) > HalfArea && DArea(i) < HalfArea 266 Period(Cross) = Time(i) + (HalfArea - DArea(i))*(Time(i+1)

- ... 267 Time(i))/(DArea(i+1) - DArea(i)); 268 Cross = Cross + 1; 269 end 270 end 271 if mod(Cross,2) == 0 && Time(i) > Period(end) 272 if DArea(i+1) > HalfArea && DArea(i) < HalfArea 273 Period(Cross) = Time(i) + (HalfArea - DArea(i))*(Time(i+1)

- ... 274 Time(i))/(DArea(i+1) - DArea(i)); 275 Cross = Cross + 1; 276 end 277 end 278 i = i+1; 279 end 280

Page 145: Multi-Material 3D-Printed Silicone Vocal Fold Models

135

281 if k == 1 % Initialize 282 f = zeros([length(nVid) (length(Period)-1)]); 283 fAvg = zeros([length(nVid) 1]); 284 end 285 286 for i = 1:length(Period)-1 287 f(k,i) = 1/(Period(i+1) - Period(i)); 288 end 289 fAvg(k,1) = mean(f(k,:)) 290 291 %% Plot area waveform 292 figure(3) 293 set(gca,'FontSize',10,'FontName','Times New Roman'); 294 plot(Time,DArea,'b.-',Period',ones([length(Period),1])*HalfArea,'ro') 295 xlabel('Time') 296 ylabel('Glottal area (mm^2)') 297 298 %% Display glottal width waveform 299 figure(4) 300 set(gca,'FontSize',10,'FontName','Times New Roman'); 301 plot(Time,GWidth) 302 xlabel('Time') 303 ylabel('Glottal width (mm)') 304 305 %% Display kymogram & save to file 306 figure(5) 307 h = image(GrayProfile(1:NImages,xLimit_L:xLimit_R)'); colormap

gray(256) 308 kymoStart = (find(abs(Time-Period(2)) < 0.0001,1)-7); 309 kymoEnd = (find(abs(Time-Period(3)) < 0.0001,1)-7); 310 % h = image(GrayProfile(kymoStart:kymoEnd,xLimit_L:xLimit_R)');

colormap gray(256) 311 set(gca,'XTick',[],'YTick',[]) 312 % set(gcf,'Position',[300, 400, 800, 250]); 313 hold(gca,'all'); 314 print('-dtiff','-r600',[FileDir [file_name '_kymogram_7Period.tif']]); 315 hold off 316 317 %% Calculate a few variables that may be useful 318 AreaAmp = MaxArea - MinArea; 319 320 if k == 1 % Initialize 321 MaxGW = zeros([nVid,length(Period)-1]); 322 MinGW = zeros([nVid,length(Period)-1]); 323 GWAmp = zeros([nVid,length(Period)-1]); 324 325 MaxGWAvg = zeros([length(nVid),1]); 326 MinGWAvg = zeros([length(nVid),1]); 327 GWAmpAvg = zeros([length(nVid),1]); 328 end 329 330 for i = 1:length(Period)-1 331 MaxGW(k,i) = max(GWidth(find(abs(Time-Period(i)) <

0.0001):find(abs(Time-Period(i+1)) < 0.0001))); 332 MinGW(k,i) = min(GWidth(find(abs(Time-Period(i)) <

0.0001):find(abs(Time-Period(i+1)) < 0.0001))); 333 GWAmp(k,i) = MaxGW(k,i) - MinGW(k,i);

Page 146: Multi-Material 3D-Printed Silicone Vocal Fold Models

136

334 end 335 MaxGWAvg(k,1) = mean(MaxGW(k,:)); 336 MinGWAvg(k,1) = mean(MinGW(k,:)); 337 GWAmpAvg(k,1) = mean(GWAmp(k,:)); 338 339 % Plot max and min GW to double check 340 figure(4) 341 hold on 342 yline(MaxGWAvg(k,1), 'r--', 'LineWidth', 4) 343 yline(MinGWAvg(k,1), 'b--', 'LineWidth', 4) 344 hold off 345 346 %% Save data for output 347 DAreaOutput(:,k) = DArea'; 348 GWidthOutput(:,k) = GWidth'; 349 350 pause 351 end 352 353 %% Output area waveform 354 DataOutArea = [Time' DAreaOutput]; 355 save([FileDir 'AreaOut1Period.txt'],'DataOutArea','-double','-ascii'); 356 357 %% Output glottal width waveform 358 DataOutGW = [Time' GWidthOutput]; 359 save([FileDir 'GWout1Period.txt'],'DataOutGW','-double','-ascii'); 360 361 %% Output frequency, fAvg MaxGW, MinGW, GWAmp 362 DataOutAll =

table(FileNameVec,f,fAvg,MaxGW,MaxGWAvg,MinGW,MinGWAvg,GWAmp,GWAmpAvg); 363 writetable(DataOutAll, [FileDir ['DataOut1Period_' FileNameVec{1}(1:6)

'-' FileNameVec{end}(6:end) '.xls']]) 364 % save([FileDir 'DataOutAll.txt'],'DataOutAll','-double','-ascii');