This is an implementation of the paper "Computational design of asymptotic geodesic hybrid gridshells via propagation algorithms, CAD 2024". The code is implemented in C++, and tested on MSVC and GCC. This is developed based on the framework of Rectifying Strip Patterns, but we enhanced the abilities for gridshell design. Using our code, you can start from an existing regular web (the distribution of the vertices is in the form of a
If you use our code in your project, please consider citing the original paper:
@article{wang2024propagation,
title = {Computational design of asymptotic geodesic hybrid gridshells via propagation algorithms},
journal = {Computer-Aided Design},
volume = {178},
pages = {103800},
year = {2025},
issn = {0010-4485},
doi = {https://doi.org/10.1016/j.cad.2024.103800},
url = {https://www.sciencedirect.com/science/article/pii/S0010448524001271},
author = {Bolun Wang and Maryam Almaskin and Helmut Pottmann},
keywords = {Mesh optimization, Asymptotic curve, Geodesic curve, Triangular web, Construction-aware design, Elastic gridshell},
abstract = {Complex architectural structures may be built in a simple and cost-effective way if their geometry respects the fabrication constraints. Examples of such structures are provided by gridshells that are built from straight and flat slats which are bent on site so that they become tangential or normal to the design surface. Tangential slats follow geodesic curves on the surface, while normal slats are attached along asymptotic curves. Extending work by Frei Otto, Julius Natterer and others, who placed the slats tangentially, Eike Schling proposed structures which also contain slats normal to the reference surface. In the present paper we address those gridshells that consist of three families of bent elements, either tangential or normal to the design surface, and are arranged in a triangular web. We propose algorithms for the computational design of such webs that start from a boundary strip and propagate it, partially under additional guidance, to an entire web.}
To compile the code, first you need to install CMake (https://cmake.org/), To build the executable on Linux or macOS:
cd WebsViaPropagation/
mkdir build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make
To build it on MSVC, you need to download openmesh into the "external" folder, unzip it into "external/openmesh/OpenMesh-9.1.0" and build it into "external/openmesh/OpenMesh-9.1.0/build".
Then double-click the executable lsc_devbin
, you will see a pop-out window whose buttons link the functions that generate all the results in our paper.
Some useful shortcuts:
i
is to invert the normal directions of the viewer.d
is to enable double-sided rendering.x
is to delete the selected mesh in theMesh Management
list.
Some tips:
- Please always check if there is any new mesh added into the
Mesh Management
list. Sometimes after pressing the buttons, there is no change in the main view window, but the new mesh is already added to the list. To see the renderings of the new results you need to make other meshes invisible by clicking the checker boxes on the left of the mesh files. - Please always check the information printed in the terminal, it will tell you the numerical errors, how to read/write files after pressing the corresponding buttons, etc.
Ignoring the buttons inherited from Rectifying Strip Patterns, the buttons or inputs useful for our project are marked in the 4 squares in the figure. They are
- the parameters. The
weight boundary
is$\lambda_{appro}$ in our paper.weight laplacian
=$\lambda_{fair}$ ,weight pseudo-geodesic
is the weights for$E_{ggg}$ ,$E_{agg}$ or$E_{aag}$ , which is a constant number 1.0 in the paper.WeightAngle
=$\lambda_{guide}$ for the guide curves. - the file list. Every time when the optimization is finished, the result file is shown here.
- the buttons for loading, propagating, and optimizing webs.
- the
Save Mesh
button. Clicking on the target mesh in theMesh Management
list, and save the mesh by clickingSave Mesh
.
Next is the basic pipeline for the usage.
Click on ReadPlyObj
, and you will be able to read an initial curve where you can start your propagation. If you want to read a strip (the size is vinrow
= easyCheckXXX
, where XXX
is either AGG
, AAG
, or GGG
.
For AAG, first AAGPlanIntersect
to compute the rectifying strip, then click on AAGAdjustInit
3 ~ 5 times to update the propagated vertices, each clicking does one round of coordinate-decent optimization, and click on AAGPropagate
to finish the propagation. For AGG, first AGGCurve2Strip
, then 3 ~ 5 times AGGAdjustInit
, and finally AGGPropagate
. For GGG, First GGGurve2Strip
, then GGGPropagate
, finally OptGGG
. Note that when you are using easyCheckAAG
to load a strip or a web as input, you need to click on Calibrate
before AAGPlanIntersect
.
The parameters AggPar1
~AggPar5
are for slightly changing the first strip constructed by loading an initial curve using ReadPlyObj
. Please read the code to understand how these 5 parameters work.
- To load a reference curve for AGG, use
ReadRefCurve
. If you have loaded a curve as the initialization, you can also apply rigid transformations to the reference curve by playing with the parametersCurveAngle
andCurveRotate
, and useTransRotateAGG
to apply the transformations. The final curve can be saved usingSaveTransRotate
. If the reference curve is too sparse, you can useupsampleCurve
andsmoothCurve
to increase the density before saving the curve. -
ChooseDiag
. The first thing is to choose which diagonal is the third family before global optimization. The different diagonals are due to specifying$P_i$ and$P_{i-1}$ propagate vertex$P_{i+n}$ or vertex$P_{i-1+n}$ . The former corresponds toD0
, and the latter corresponds toD1
. Unfortunately, our propagation algorithms don't provide selection from the two diagonals: for GGG, we provideD0
, and for AGG and AAG, we provideD1
. Please choose the correct diagonal before global optimization. You can plot the diagonals on the quad mesh usingDrawDiags
. We believe that it won't be hard for the developers to complete the selection of diagonals since the changes are minor. - By default, the shape approximates the first curve. If you loaded a strip or a web, and you want to approximate the first strip of it, please check the box
ApproStrip
- Run optimization by clicking
OptAAG
,OptAGG
, orOptGGG
, and check the printed information in the terminal to check the quality.
- Isometric deformation. 1. Load a web using
vinrow
andeasyCheckIso
. 2. Choose the web, hold the number key "2", and use the left button of the mouse to choose a vertex. 3. Hold the number key "5", and select a position using the left button of the mouse. 4. run optimization byOptIso
. Note that approximation to the chosen point and the first curve/strip use the same weight\lambda_{appro}
. If you want to cancel the approximation to the first strip while keeping approximating to the selected point, please go into the cpp files and change the code. - Steering the guide curve for AGG. First, select a point on the curve using
selectCurvePtID
andselectCurvePt
. Then hold the number key "5", and select a position using the left button of the mouse. After clicking onEditCurve
, you will see the optimized curve. You can save it bySaveEditedCurve
. - The interactive design of AAG, AGG, and GGG is similar to the isometric deformation, but with different loading and optimization buttons.
We provide one initial curve such that you can test propagation with loading polylines. We provide one AAG, one AGG (along with the guide curve), and one GGG for you to test the propagation and optimization algorithms.