MATLAB Scripts for lattice structure

这篇博客介绍了如何使用MATLAB脚本选择和创建不同的晶格结构,包括Primitive、Diamond、I-WP、Gyroid和Lidinoid表面函数。通过未注释的3行代码来选择TPMS设计,并应用表面偏移以生成所需厚度。同时,讨论了找到自由边界表面以封闭晶格的重要步骤。
摘要由CSDN通过智能技术生成
clear all;close all;clc;

Cell Properties

%user design inputs
>> cs=4;
>> cd_w=8;cd_h=8;
>> t=0.25;%thickness
>> f=20;%fineness
>> hs=cs/2;%half cell size
>> w=cs*cd_w;
>> hw=w/2;
>> h=cs*cd_h;
>> ht=t/2;
>> m=pi/hs;%periodicity multiplier

%design space range
>> x1=-hw;xu=hw;
>> y1=-hw;yu=hw;
>> z1=-hw;zu=hw;

%design space range to grid
>> x=[x1:cs/f:xu];
>> y=[y1:cs/f:yu];
>> z=[z1:cs/f:zu];

%design space grid
>> [X,Y,Z]=meshgrid(x,y,z);

TPMS Surface Selection

Select the desired lattice design from the TPMS options below by uncommenting the 3 corresponding lines below the TPMS design name.

The top line is the trigonometric representation(三角表示) of the TPMS cell. the second line is the function evaluation throughout the design space(整个设计空间的函数评估), the final line is the name that the .stl file will be saved as in the parent directory📁.

1️⃣Primitive Surface Function
>> PMS=@(x,y,z)cos(m*
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值