Create an edge from two vertex in a 3D model using PDE Toolbox
24 views (last 30 days)
Show older comments
Hello,
I am very new to the PDE toolbox, I'm running into an issue and I can't find any solutions.
I want to study the modes and frequencies of a fixed beam.
I originaly fixed it on the face located on its side but now I want to create and fix my own specific faces.
%creation of the beam
gm = multicuboid(0.3,0.03,0.003);
model = createpde("structural","modal-solid");
model.Geometry = gm;
pdegplot(gm, "VertexLabels", "on","FaceAlpha",0.5)
%add a vertex on the edgeq of the beam
VertexID1 = addVertex(gm,"Coordinates",[-0.11 -0.015 0.003]);
VertexID2 = addVertex(gm,"Coordinates",[-0.11 0.015 0.003]);
pdegplot(gm, "VertexLabels", "on", "EdgeLabels","on")
What I have done for now is creation the beam and setting up two vertex points on the edges, I want now to define a new edge, the segment between these two new vertex so I can have a new face delimited by E8, E7, E5 and my new edge.

Thanks.
0 Comments
Accepted Answer
Matteo
on 30 Nov 2023
Hi Antoine,
One possible solution is to get first the decomposed geometry matrix of two adjacent rectangles using decsg. Then, you can turn the decomposed geometry matrix into a 2D geometry using geometryFromEdges. Lastly, utilize extrude to create the 3D geometry, which includes the face with edges highlighted in red in your original post.
%Create the 3D geometry by extruding two adjacent rectangles
gd = [ 3 4 -.15 -.11 -.11 -.15 -.015 -.015 .015 .015 ;
3 4 -.11 .15 .15 -.11 -.015 -.015 .015 .015 ]';
dl = decsg(gd);
gm = geometryFromEdges(dl);
gm = extrude(gm,0.003);
%Create the model and add the geometry
model = createpde("structural","modal-solid");
model.Geometry = gm;
pdegplot(gm,"FaceLabels","on")
More Answers (0)
See Also
Categories
Find more on Geometry and Mesh in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!