TopoShape is the OpenCasCade topological shape wrapper. Sub-elements such as vertices, edges or faces are accessible as: * Vertex#, where # is in range(1, number of vertices) * Edge#, where # is in range(1, number of edges) * Face#, where # is in range(1, number of faces) Read in an IGES, STEP or BREP file. Write the mesh in OpenInventor format to a string. Export the content of this shape to an IGES file. Export the content of this shape to an STEP file. Export the content of this shape to an BREP file. BREP is a CasCade native format. Export the content of this shape to a string in BREP format. BREP is a CasCade native format. Export the content of this shape to an STL mesh file. Import the content to this shape of a string in BREP format. Import the content to this shape from a string in BREP format. Extrude the shape along a direction. Revolve the shape around a Axis to a given degree. Part.revolve(Vector(0,0,0),Vector(0,0,1),360) - revolves the shape around the Z Axis 360 degree. Checks the shape and report errors in the shape structure. This is a more detailed check as done in isValid(). Union of this and a given topo shape. Union of this and a given topo shape (old algorithm). Intersection of this and a given topo shape. Section of this with a given topo shape. Make slices of this shape. Make single slice of this shape. Difference of this and a given topo shape. Sew the shape if there is a gap. Removes internal wires (also holes) from the shape. Mirror this shape on a given plane. The plane is given with its base point and its normal direction. Apply geometric transformation on a copy of the shape. The transformation to be applied is defined as a 4x4 matrix. The underlying geometry of the following shapes may change: - a curve which supports an edge of the shape, or - a surface which supports a face of the shape; For example, a circle may be transformed into an ellipse when applying an affinity transformation. It may also happen that the circle then is represented as a b-spline curve. The transformation is applied to: - all the curves which support edges of the shape, and - all the surfaces which support faces of the shape. Note: If you want to transform a shape without changing the underlying geometry then use the methods translate or rotate. Apply transformation on a shape without changing the underlying geometry. Apply the translation to the current location of this shape. Apply the rotation (degree) to the current location of this shape Shp.rotate(Vector(0,0,0),Vector(0,0,1),180) - rotate the shape around the Z Axis 180 degrees. Apply scaling with point and factor to this shape. Make fillet. Make chamfer. makeThickness(List of shapes, Ofset (Float), Tolerance (Float)) -> Shape A hollowed solid is built from an initial solid and a set of faces on this solid, which are to be removed. The remaining faces of the solid become the walls of the hollowed solid, their thickness defined at the time of construction. Offset a given shape Reverses the orientation of this shape. Computes the complement of the orientation of this shape, i.e. reverses the interior/exterior status of boundaries of this shape. Destroys the reference to the underlying shape stored in this shape. As a result, this shape becomes null. Checks if the shape is closed. Checks if both shapes share the same geometry. Checks if both shapes are equal. Checks if the shape is null. Checks if the shape is valid, i.e. neither null, nor empty nor corrupted. Tries t fix a broken shape. True is returned if the operation succeeded, False otherwise. This value is computed from the value of the underlying shape reference and the location. Orientation is not taken into account. Tessellate the the shape and return a list of vertices and face indices Project a shape on this shape Make a compund shape out of mesh data. Note: This should be used for rather small meshes only. Conversion of the complete geometry of a shape into NURBS geometry. For example, all curves supporting edges of the basis shape are converted into BSpline curves, and all surfaces supporting its faces are converted into BSpline surfaces. Create a copy of this shape Replace a sub-shape with a new shape and return a new shape. The parameter is in the form list of tuples with the two shapes. Remove a sub-shape and return a new shape. The parameter is a list of shapes. Checks whether a point is inside or outside a given shape Removes redundant edges from the B-REP model Returns the type of the shape. Returns the orientation of the shape. List of faces in this shape. List of vertexes in this shape. List of subsequent shapes in this shape. List of subsequent shapes in this shape. List of subsequent shapes in this shape. List of Edges in this shape. List of wires in this shape. List of coumpounds in this shape. Total length of the edges of the shape. Total area of the faces of the shape. Total volume of the solids of the shape.