Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
3D geometry object
Posted 2009年11月6日 GMT-5 04:07 2 Replies
Please login with a confirmed email address before reporting spam
Dear Comsol-Community members,
i try to create a 3D geometry object by my data-points (given in
3D-coordinates). The way i want to realize it is explained in the following
example:
I want to create a cube. All what i know are the coordinates of the corners.
These data-points are for example given by
(0,0,0),(1,0,0),(1,0,1),(0,0,1),
(1,1,0),(1,1,1),(0,1,1),(0,1,0)
First i create the lines (edges) of the cube
g1=curve3([0,1],[0,0],[0,0]);
g2=curve3([1,1],[0,0],[0,1]);
g3=curve3([1,0],[0,0],[1,1]);
g4=curve3([0,0],[0,0],[1,0]);
g5=curve3([0,0],[0,1],[0,0]);
g6=curve3([1,1],[0,1],[0,0]);
g7=curve3([1,1],[0,1],[1,1]);
g8=curve3([0,0],[0,1],[1,1]);
g9=curve3([0,1],[1,1],[0,0]);
g10=curve3([1,1],[1,1],[0,1]);
g11=curve3([1,0],[1,1],[1,1]);
g12=curve3([0,0],[1,1],[1,0]);
clear c
c.objs={g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12};
c.name={'B1','B2','B3','B4','B5','B6','B7','B8','B9','B10','B11','B12'};
c.tags={'g1','g2','g3','g4','g5','g6','g7','g8','g9','g10','g11','g12'};
But how can i now create a 3D object by these lines? I think that now i have to
define the faces of the cube and then i can convert it into a 3D object, right?
I want to have a 3D Object consisting of the boundary (= the faces of the cube)
and the interior. I hope that somebody can help me.
Thank you.
i try to create a 3D geometry object by my data-points (given in
3D-coordinates). The way i want to realize it is explained in the following
example:
I want to create a cube. All what i know are the coordinates of the corners.
These data-points are for example given by
(0,0,0),(1,0,0),(1,0,1),(0,0,1),
(1,1,0),(1,1,1),(0,1,1),(0,1,0)
First i create the lines (edges) of the cube
g1=curve3([0,1],[0,0],[0,0]);
g2=curve3([1,1],[0,0],[0,1]);
g3=curve3([1,0],[0,0],[1,1]);
g4=curve3([0,0],[0,0],[1,0]);
g5=curve3([0,0],[0,1],[0,0]);
g6=curve3([1,1],[0,1],[0,0]);
g7=curve3([1,1],[0,1],[1,1]);
g8=curve3([0,0],[0,1],[1,1]);
g9=curve3([0,1],[1,1],[0,0]);
g10=curve3([1,1],[1,1],[0,1]);
g11=curve3([1,0],[1,1],[1,1]);
g12=curve3([0,0],[1,1],[1,0]);
clear c
c.objs={g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12};
c.name={'B1','B2','B3','B4','B5','B6','B7','B8','B9','B10','B11','B12'};
c.tags={'g1','g2','g3','g4','g5','g6','g7','g8','g9','g10','g11','g12'};
But how can i now create a 3D object by these lines? I think that now i have to
define the faces of the cube and then i can convert it into a 3D object, right?
I want to have a 3D Object consisting of the boundary (= the faces of the cube)
and the interior. I hope that somebody can help me.
Thank you.
2 Replies Last Post 2009年11月6日 GMT-5 12:12