Package CAD model: cve.util.cad.bom
Import instruction :
import cve.cad.bom
About :
CAD Package
Content
- Mechanism
- Bill of material (BOM)
- Converting CAD data to BOM
- B-REP model information
- Kinematics constraints
- Producing urdf files
- Reference API
Mechanism
A Mechansim is a complete scene including several independent mechanical systems. Every system is referred by its bill of material. But a mechanism manages also the kinematic constraints between articles.
The Mechanism class implements the concept.
Bill of material (BOM)
The bill of material describes the hierarchical decomposition of a mechanism. It is made of assemblies which can be decomposed into sub-assemblies until basic components (or part)
Both assembly and component inherits from the abstract Article class.
Converting CAD data to BOM
The cadconverter tool read a STEP file and returns a json file containing a full description of a BOM plus detailed information of comppnent B-REP model. Every component is also converted into a wavefront file.
step2asm.py stepdirectory output resolution scale
An article of the BOM manages its colors and mechanical informations of the parts, mass, inertia, center of gravity, etc. The part is associated to a topological surface
B-REP model information
A B-Rep model (Boundary representation) is the core model of most Manufacturing CAD software. A component (part) is a volume which is described by a compact surface, ie, a closed, orientable, oriented and not self-intersecting surface.
Such a surface is usually described by a set of connected patches. We call it a Topologic Surface, which is a set of Faces. A face has shape among various types: either a sphere, a cylinder, a torus, a plane, a cone or a free-form. Each shape has its own definition parameter.
Kinematics constraints
Kinematics constraints define potential mobilities between components.
Producing urdf files
Classes
Class | summury |
---|---|
Article | A class modelling any item in an assembly tree from root assembly to part sheet. |
Assembly | An assembly is a node of a bill of material that contains sub-nodes |
Ball | Center of T1 and T2 are merged |
Component | A Component is the deeper node of a bill of material. |
Configuration | |
Constraint | A Constraint makes a link between two articles |
Cylinder | A Cylindric constraints two articles lines to be alined |
FrameSequence | A Frame sequence is just a list of frame names |
Gear | A gear constraints two articles to get connectes speeds |
Joint | |
Mate | A mate defines a connexion of two faces |
Mechanism | Define a complete Mechanism |
Plane | planes (x,y) of the two articles are parallel at distance d |
Revolute | Article1 and article2 have a common z axis |
Rigid | |
Screw | z axis are alined and d depends on alpha or this versa through the step definition |
Slider | Article1 and article2 have a common the z axis |
Functions
Function | summury |
---|---|
extract_article_bodies(articles=set(), article_body={}) | Extract articles bodies : set of articles with fixed connexions (more…) |
extract_bodies(articles=set()) | Extract bodies : set of articles with fixed connexions (more…) |
extract_body_constraints(b1, b2) | |
extract_kinematic_model(bodies=[]) |
Functions details
extract_article_bodies
def extract_article_bodies(articles=set(), article_body={})
Extract articles bodies : set of articles with fixed connexions Provides a set of articles and go inside the article tree to extract the fixed subsets
Article is fixed respect to is father when it is locked or fixed with another article when an explicit fixed constraint is existing
- → articles : root articles
- → article_body : a dictionary : for each article the set of parts which in a fixed constraint
- ← article_body : the updated value
extract_bodies
def extract_bodies(articles=set())
Extract bodies : set of articles with fixed connexions Provides a set of articles and go inside the article tree to extract the fixed subsets
Article is fixed respect to is father when it is locked or fixed with another article when an explicit fixed constraint is existing
- → articles : root articles
- ← a list of bodies : indeed a list of set of articles