Skip to main content

Module catalog

Module catalog 

Source
Expand description

Parts from a parts catalog, and the fittings they add to the builder.

A catalog part (hpr_io::orc::Part, such as one found in OpenRocket’s catalog with hpr_io::orc::bundled) becomes a builder part with the from_catalog of the part it is:

Catalog kindBuilder part
nose coneNose::from_catalog
body tubeTube::from_catalog, or MotorTube::from_catalog for a motor tube
transitionTransition::from_catalog
tube coupler, engine block, centering ring, bulkhead, launch lug, parachute, streamerFitting::from_catalog

Each takes the catalog’s sizes, its material with the file’s density, and its name, the maker and part number. A part that states its mass weighs that: its density is scaled so that the part as the catalog sizes it weighs the stated mass, the way OpenRocket gives a rigid part (anything but a parachute or streamer) its stated mass. The material’s name says so. A part changed afterwards, cut shorter or given another shape, keeps that density, so its mass follows the change. A parachute’s canopy and lines are scaled alike. OpenRocket overrides a parachute’s mass instead, which comes to the same for a part left as it is, and leaves a streamer’s stated mass unused; the one streamer in its catalog that states a mass weighs it here.

A catalog leaves some dimensions unsaid. Each is chosen as OpenRocket 24.12 chooses it when it builds the part, as measured by validation/oracles/openrocket/orc_built.py, but for one. The shapes take these parameters (NoseShape):

  • an ogive is a tangent ogive (radius_ratio 1), a parabolic series a whole parabola (K′ 1), a Haack series the von Kármán (C 0), and a power series has the exponent ½;
  • a transition’s profile is clipped (cut from a whole nose cone, hpr_design::shapes) for the elliptical, Haack and power series, and not for the others;
  • a filled part’s shoulders are solid;
  • a hollow part’s shoulders have its wall, or are solid where the wall is thicker than their radius. OpenRocket gives them a wall of zero, so they weigh nothing; a molded nose cone’s shoulder is a tube of the same plastic.

The builder refuses a part whose file names a material it doesn’t define, for the part itself (CatalogProblem::UndefinedMaterial), where OpenRocket weighs it as zero. A parachute whose file names no line material, or one it doesn’t define, has lines that weigh nothing, as in OpenRocket: there is no density to weigh them by. OpenRocket’s catalog has eight such parachutes; six of them state their own mass, which they weigh, and two weigh their canopy alone.

Structs§

Fitting
A part fitted to the last body tube: a coupler, a centering ring, a bulkhead, a launch lug, or a packed parachute or streamer. It sits flush with the tube’s aft end unless placed elsewhere with Fitting::at.