Ask Your Question

Get objects from a Graphics3dGroup

asked 2015-03-27 15:31:57 +0200

Arnaud1418 gravatar image

Dear all,

I would like to trasnform a 3d object into a set of faces (or triangles). For that, I take a 3d object and convert it to a STL file following this procedure.

The short questions is: how to get the 3d objects from a Graphics3dGroup?

The long question : I don't understand the nature of the 3d graphics. For instance:

G1 = polygon3d([(0,0,0),(1,0,0),(2,1,1)])
G2 = polygon3d([(0,0,0),(1,0,0),(2,1,1)]) + polygon3d([(1,2,3),(1,0,0),(2,1,1)])
G3 = sphere((0,0,0),1)
  1. In the first case it seems to be a set of faces and it's possible to convert it to a STL file.
  2. In the second case it is a group of 3d object and -as a group- it has no face.
  3. The sphere is a TransformGroup and has no face.

How to get the faces of the last two situations?

Thanks for yours answers.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-27 16:04:03 +0200

kcrisman gravatar image

In the second event, G2.all should return a list of the underlying objects, and in the third case G3.all should return something relevant as well.

sage: S = sphere()
sage: S.all
[Graphics3d Object]
sage: S.all[0]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-03-27 15:31:57 +0200

Seen: 328 times

Last updated: Mar 27 '15