poctools module =============== .. automodule:: poctools Solid Primitives ~~~~~~~~~~~~~~~~ Each primitive is added to the currently active group operation. At the outermost level, the active group operation is union(). .. autofunction:: Box .. autofunction:: Cylinder .. autofunction:: Cone .. autofunction:: Sphere .. autofunction:: Torus .. autofunction:: Extrude .. autofunction:: Loft .. autofunction:: Pipe .. autofunction:: Revolve Other primitives ~~~~~~~~~~~~~~~~ These classes have classmethods to construct objects of the given type. They may be useful in constructing solid primitives; for example, `poctools.Loft` needs a sequence of `Edge` objects. This syntax is for compatibility with `occmodel`. A future improvement to `poc` should change them so that e.g., `Loft` becomes a group operation, and `Edge` becomes a solid primitive that implicitly adds itself to the surrounding `Loft`. .. autoclass:: Edge :members: :undoc-members: .. autoclass:: Face :members: :undoc-members: .. autoclass:: Wire :members: :undoc-members: .. autofunction:: Vertex .. autofunction:: Matrix Postfix operations ~~~~~~~~~~~~~~~~~~ A postfix operation modifies the currently active group operation in a way other than adding another primitive to it. .. autofunction:: Chamfer .. autofunction:: Fillet .. autofunction:: Rotate .. autofunction:: Transform .. autofunction:: Translate Group operations ~~~~~~~~~~~~~~~~ A group operation is introduced by the `with` statement, such as `with Intersection():`. At the conclusion of the `with` statement, its whole contents are treated as a primitive in the outer operation. Remember that you can introduce more than one nested group operation with a single `with` statement (and thus a single indentation level):: with Fillet(8), Difference(): suite is equivalent to:: with Fillet(8): with Difference(): suite .. autofunction:: Intersection .. autofunction:: Difference .. autofunction:: Union .. autofunction:: Op .. autofunction:: Rotated .. autofunction:: Transformed .. autofunction:: Translated .. autofunction:: Chamfered .. autofunction:: Filleted Inquiries ~~~~~~~~~ An inquiry returns information about the currently active group operation. These inquiries can be used to make decisions, or may also be useful to pass to postfix operations (e.g., to `Fillet`'s `edges=` parameter) .. autofunction:: Bbox .. autofunction:: CenterOfMass .. autofunction:: Edges .. autofunction:: Faces .. autofunction:: Vertices .. autofunction:: Wires Other routines ~~~~~~~~~~~~~~ These routines are not normally used in `poc` programs, but may be useful for wrapper programs or for implementing new operations. .. autofunction:: execpoc .. autofunction:: occ_to_stl .. autofunction:: do_op