{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Rotation of pillars" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "from mnflow.mfda.cad.dld.theme.block import DLD" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us use the following profile for pillars:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "shape = np.array([\n", " (0.34, 0.),\n", " (0.5, 0.25),\n", " (0.17, 0.25),\n", " (0., 0.5),\n", " (-0.17, 0.25),\n", " (-0.5, 0.25),\n", " (-0.34, 0.),\n", " (-0.5, -0.25),\n", " (-0.17, -0.25),\n", " (0., -0.5),\n", " (0.17, -0.25),\n", " (0.5, -0.25),\n", " ])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can apply rotation to pillars by passing ``core_shape_rot_angle``: " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "dld = DLD(\n", " d_c=1.,\n", " Np=10,\n", " Nw=8,\n", " core_shape=shape,\n", " num_unit=2,\n", " core_shape_rot_angle=30,\n", " rotation_angle_deg_before_array=90,\n", " # constraints OFF\n", " turn_off_constraints=True,\n", " # image\n", " opt_save_image=True,\n", " img_dpu=20,\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Output layout:\n", "![Layout](layout_overlay.png)" ] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.7" } }, "nbformat": 4, "nbformat_minor": 2 }