stlwrite
Write mesh information to STL file
Description
Examples
Platform from Rectangular Shape
Create a rectangular shape. Divide the shape into two triangles. Extract the shape vertices to determine the vertices of the triangles. Define the points connectivity list and use the triangulation
function on this list and vertices.
w = shape.Rectangle; v = getShapeVertices(w)
v = 4×3
-0.5000 -1.0000 0
0.5000 -1.0000 0
0.5000 1.0000 0
-0.5000 1.0000 0
c = [1 2 4; 2 3 4]
c = 2×3
1 2 4
2 3 4
tr = triangulation(c,v(:,1),v(:,2))
tr = triangulation with properties: Points: [4x2 double] ConnectivityList: [2x3 double]
Create an STL file from the triangulation object.
stlwrite(tr,"customPlatForm.stl")
The software creates the customPlatform
STL file. in your current folder. Use this file to create a platform
object and visualize the platform.
plat = platform(FileName="customPlatForm.stl", Units="m")
plat = platform with properties: FileName: "customPlatForm.stl" Units: "m" UseFileAsMesh: 0 Tilt: 0 TiltAxis: [1 0 0]
figure show(plat)
Input Arguments
object
— Antenna or array
antenna object | array object | custom antenna | custom array | pcbStack
object | planeWaveExcitation
object | installedAntenna
object | platform
object | triangulation
object
Antenna or array to write the mesh information, specified as one of the following options:
Antenna object from the antenna catalog.
Array object from the array catalog.
Custom 2-D mesh or geometry object.
Custom 2-D and 3-D antenna object.
pcbStack
object.planeWaveExcitation
object.installedAntenna
object.platform
object.triangulation
object.
Example: patchMicrostrip
Example: circularArray
Example: customArrayGeometry
filename
— Name of STL file
string
Name of STL file, specified as a string with .stl
extension.
Example: "antenna_100MHz.stl"
Data Types: string
Version History
Introduced in R2019a
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)