exponenta event banner

Импорт файла STL

В этом примере показано, как импортировать геометрию из файла STL и затем распечатать геометрию. Как правило, STL-файл создается путем экспорта из CAD-системы, например SolidWorks ®. Для получения наилучших результатов экспортируйте мелкий (не грубый) STL-файл в двоичном формате (не ASCII). После импорта просмотрите геометрию с помощью pdegplot функция. Для просмотра идентификаторов граней установите FaceLabels пара имя-значение к 'on'.

Просмотрите примеры геометрии, включенные в Toolbox™ Дифференциальное уравнение в частных производных.

figure
gm = importGeometry('Torus.stl');
pdegplot(gm)

Figure contains an axes. The axes contains 2 objects of type quiver, patch.

figure
gm = importGeometry('Block.stl');
pdegplot(gm,'FaceLabels','on')

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

figure
gm = importGeometry('Plate10x10x1.stl');
pdegplot(gm,'FaceLabels','on')

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

figure
gm = importGeometry('Tetrahedron.stl');
pdegplot(gm,'FaceLabels','on')

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

figure
gm = importGeometry('BracketWithHole.stl');
pdegplot(gm,'FaceLabels','on')

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

figure
gm = importGeometry('DampingMounts.stl');
pdegplot(gm,'CellLabels','on')

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

figure
gm = importGeometry('MotherboardFragment1.STL');
pdegplot(gm)

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

figure
gm = importGeometry('PlateHoleSolid.stl');
pdegplot(gm,'FaceLabels','on')

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

figure
gm = importGeometry('PlateSquareHoleSolid.stl');
pdegplot(gm)

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

figure
gm = importGeometry('SquareBeam.STL');
pdegplot(gm,'FaceLabels','on')

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

figure
gm = importGeometry('BracketTwoHoles.stl');
pdegplot(gm,'FaceLabels','on')

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

Чтобы увидеть скрытые части геометрии, поверните фигуру с помощью кнопки «Повернуть 3D» или кнопки view функция. Для получения следующего вида можно повернуть угловую скобку.

figure
pdegplot(gm,'FaceLabels','on')
view([-24 -19])

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

figure
gm = importGeometry('ForearmLink.stl');
pdegplot(gm,'FaceLabels','on');

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

figure
pdegplot(gm,'FaceLabels','on','FaceAlpha',0.5)

Figure contains an axes. The axes contains 3 objects of type quiver, patch, line.

При импорте плоской геометрии STL панель инструментов преобразует ее в 2-D геометрию путем сопоставления с плоскостью X-Y.

figure
gm = importGeometry('PlateHolePlanar.stl');
pdegplot(gm,'EdgeLabels','on')

Figure contains an axes. The axes contains an object of type line.

figure
gm = importGeometry('PlateSquareHolePlanar.stl');
pdegplot(gm);

Figure contains an axes. The axes contains an object of type line.