Topological data scripting
Introduction
First to use the Part module functionality you have to load the Part module into the intereter:
import Part
The following topological data types are available:
- COMPOUND A group of any type of topological object.
- COMPSOLID A composite solid is a set of solids connected by their faces. It expands the notions of WIRE and SHELL to solids.
- SOLID A part of space limited by shells. It is three dimensional.
- SHELL A set of faces connected by their edges. A shell can be open or closed.
- FACE In 2D it is part of a plane; in 3D it is part of a surface. Its geometry is constrained (trimmed) by contours. It is two dimensional.
- WIRE A set of edges connected by their vertices. It can be an open or closed contour depending on whether the edges are linked or not.
- EDGE A topological element corresponding to a restrained curve. An edge is generally limited by vertices. It has one dimension.
- VERTEX A topological element corresponding to a point. It has zero dimension.
- SHAPE A generic term covering all of the above.
Creating Basic types
You can directly create basic topological objects through the module:
b = Part.createBox(0,0,0,100,100,100)
Part.show(b)
Load and Save
Exploring shapes
You can explore the topological data structure:
b = Part.createBox(0,0,0,100,100,100)
b.Wires
w = b.Wires[0]
w
w.Wire
w.Vertexes
Part.show(w)
w.Edges
e = w.Edges[0]
e.Vertexes
v = e.Vertexes[0]
v.Point