-
Notifications
You must be signed in to change notification settings - Fork 0
Geometry Usage
The first portion of using the tools is to construct a given tether design using the geometry system. This geometry represents the construction of a tether, can be viewed as a cross section, and is the common input for many of the analysis functions used down the road to answer questions about a given design.
This section describes more detailed usage for TetherCADs geometry system. This system was created as a way for users to properly describe the construction of their tethers. These tethers are often manufactured by layering/wrapping materials from the inside out, and as a result our geometry construction follows this methodology.
The module dealing with the geometry and physical properties of tethers is the tether_analysis.TetherDesign
module. Each of the following classes and helper methods are defined there.
There are three main classes used within the geometry definition of a tether, each with its own intended purpose:
- Layer: A class that represents a layer of material, the fundamental building block of a geometry design
- Wire: A special designation of layer used to identify structures used to carry power/data
- RoundTetherDesign: A class that provides context/helper functions to a given geometry definition built of Layer(s) and Wire(s)
These fundamentals classes represent the basic structures necessary to define a tether design, and are built so that they can be extended in the future to allow more complex designs/concepts.
The layer class represents the fundamental building block of these tether designs, and are used the most within the design of a tether. Layers encapsulate other layers both concentrically (wrapping around them) and radially (containing members such as wrapped wires, fiber optics, etc.)
A layer has five basic arguments:
- material: The name of the material to use from the material database
- name: A name for the layer. Does not have to be unique, but is very helpful for identifying the layer
- thickness: The thickness of the layer in millimeters.
- innerLayer: The layer object which this one encapsulates. It is set to none as a default. A layer doesn't need to encapsulate another if it is the bottom most layer.
- memberList: A list of layer objects that should be arranged radially within this layer. It is set to none as a default.
This code for example, specifies a layer made of FEP, named "WireFill", of thickness 2mm, encapsulating a layer named core, and containing a list of wires:
layer = Layer("fep", "WireFill", 2, innerLayer=core, memberList=wireList)
Note: In order to prevent a number of errors, any objects that are passed as an inner layer or as part of a list are deep copied. This is to ensure that errors do not occur when defining the geometry of layers, and removes the burden from the user to do so.
Once constructed, a set of layers can be visualized using two methods. First, the layer can be visually represented using its illustrate() method. This method traverses the tree and draws all layers at the passed layer and below
Second, the specific details of a layer can be visualized using the layerDetails() method. This prints the dimensions and other information about the layer, as well as all layers it encapsulates if the recursive argument is set to true.
The Wire class is a special designation for the Layer class that allows representations of electrical wires and fiber optic cables to be found. Each Wire, like Layer, is given a material, name, thickness, and innerLayer, but other layers cannot be arranged radially within the Wire class. Additionally, the Wire class requires that its type is set to identify it as "electrical" or "optical" for use by other methods.
This code defines an electrical wire object, with an insulating material of FEP, encapsulating a copper layer acting as the conductor:
conductor = Layer("copper", "Conductor", 0.25)
insulator = Wire("electrical", "fep", "FEP Insulated Wire", 0.15, innerLayer=conductor)
A wire can also be set from an entry from a wire database. Grabbing entries from a wire database will be demonstrated in the database section, however once a wire entry has been selected, the from_entry member function of Wire can be used to build a wire object from an entry like so:
wire = Wire.from_entry(someEntry)
The RoundTetherDesign class represents the overall tether design. It takes a completed tree of Layer and Wire objects, performs some housekeeping, and couples it with context about the tether, such as its length. It provides information beyond the cross sectional design to analyses, and performs the geometry-specific analyses such as estimating the mass, minimum bend radius, and placing upper/lower bounds on tensile strength.
A RoundTetherDesign object has three basic arguments:
- name: The name of the tether.
- layer: The outermost Layer of a tree representing a cross section design.
- length: The length of the tether.
The RoundTetherDesign class also has a number of useful helper functions that help to interact with the tree within a tether design:
- tetherDetails() prints a set of details of the tether, and the layer details of each layer in the tree if the recursive flag is set to true.
- illustrate() draws a representation of the tether's cross section using the illustrate function of the Layers and Wires in the tree.
- calculateMass() uses the layer information to estimate the mass of the tether. This is called on construction as well.
- findWires() returns the layer paths of all wires of a given type within the tree in a list. (Layer paths are explained in a quick subsection)
- getLayerAtPath() returns a Layer/Wire object at a specific path within the tree.
- buildLayerList() returns a list of Layer/Wire objects from a list of specific paths within the tree.
- printLayerPaths() prints all of the paths for Layer/Wire objects within the tree.
In addition to providing context, the RoundTetherDesign object has the important function of assigning a "path" to each layer in the tree so it can be uniquely identified. These paths describe how the tree should be traversed to identify a given layer. Layers are numbered starting from 1 moving outside in, and have two letter designations: "L" and "M".
The "L" designation represents concentric organization. For example: "L1" represents the outermost layer of the tether, and "L3" represents the third concentric layer including the first. The "M" designation represents a radial organization. "M4" represents the 4th radial layer within a Layer's memberList. These designations are chained together into path strings to allow the user to select any layer within a design. For example: the designation: "L3M2L1" represents the 3rd concentric layer's second memberList index's outer layer.
The following figures depict the numbering rules for concentric and radial paths:
This figure shows the paths of all layers in the example tether: