component.insert_design adds a component holding another design's solid bodies, linked to its file (stored relative to the assembly once saved). component.update_links reads the linked designs again, component.break_link keeps the bodies and forgets the file, and component.links lists them. Links are saved under format 16; an older build keeps the bodies and drops the link. Fixes #533
3.3 KiB
Components and joints
A design is a tree of components. New Component (component.create) adds one, and
Create Components from Bodies (component.from_bodies) turns bodies into components. Each
component has its own origin, bodies, sketches and timeline entries. The active component
(the radio button in the browser) receives new sketches and features; the others are drawn
faded.
A component is placed by its occurrences. Paste creates another instance of the same component, and Paste New creates an independent copy. Move an occurrence with the move triad, then Capture Position to keep it or Revert to put it back. SolidCraft asks before the next command if a move wasn't captured. Ground fixes an occurrence in place.
Paste New copies nested component definitions, sketches, feature histories and generated dimension parameters. Repeated child instances remain shared within the new copy. Materials, appearances and wholly internal joints/motion records receive copied references. Design-wide user parameters remain shared; retained external links and omitted cross-boundary motion records are reported. Unsupported destructive links refuse the entire copy. See individual-instance and copy details.
Joints (joint.create, J) connect two components by joint origins that snap to faces, edges,
circles and vertices: rigid, revolute, slider, cylindrical, pin-slot, planar and ball, with
offsets, flip and limits. As-built Joint keeps the current position, Rigid Group locks
components together, Drive Joints moves a joint through its values, and Motion Link
couples two joints. Contact sets stop motion where bodies would pass through each other,
Motion Study keys joint values along a timeline, and Interference shows overlapping
volumes in red.
Insert Design (component.insert_design {path, translate?}) adds a component linked to
another saved design, so each part can live in its own document. The part's solid bodies come
in as they sit in that design, and they are kept in the assembly, so it opens even without the
part file. The link is stored relative to the assembly's folder once the assembly is saved.
After the part file changes, Update Links (component.update_links) reads it again.
Break Link (component.break_link) keeps the bodies and forgets the file, and
component.links lists the links and whether their files are found. A linked component holds
the part's bodies only: its timeline, parameters and sheet-metal data (flat pattern, bend
table) stay in the part's own design.
STEP export writes the component tree as an assembly.
Right-click a component in the Browser and choose Properties to inspect
material-aware mass, volume, surface area, centre of mass and world bounds. Descendants and
repeated instances contribute to assembly totals; pending moves are included. A component
uses its first placement; occurrence.properties selects a specific instance. Root Properties
measures the complete assembly. Volumes are summed, including overlapping bodies, rather than
measuring their union. The same workflow is available through component.properties and
occurrence.properties; see
placement and measurement details.