- //Rocksim does not distinguish between total length of the cord and the packed length. Fudge the
- //packed length and set the real length.
- cord.setCordLength(mass.getLength());
- cord.setLength(cord.getCordLength()/MASS_LEN_FUDGE_FACTOR);
+ /**
+ * If it appears that the mass object is a shock cord, then create an OR shock cord instance.
+ *
+ * @param element the element name
+ * @param attributes the attributes
+ * @param content the content of the element
+ * @param warnings the warning set to store warnings in.
+ *
+ * @throws org.xml.sax.SAXException not thrown
+ */
+ private void mapMassObjectAsShockCord(final String element, final HashMap<String, String> attributes,
+ final String content, final WarningSet warnings) throws SAXException {
+ ShockCord cord = new ShockCord();
+ current = cord;
+ if (isCompatible(parent, ShockCord.class, warnings)) {
+ parent.addChild(cord);
+ }
+ super.endHandler(element, attributes, content, warnings);
+ cord.setName(mass.getName());
+
+ setOverride(cord, mass.isMassOverridden(), mass.getOverrideMass(), mass.getOverrideCGX());
+
+ cord.setRadialDirection(mass.getRadialDirection());
+ cord.setRadialPosition(mass.getRadialPosition());
+ cord.setRadius(mass.getRadius());
+
+ //Rocksim does not distinguish between total length of the cord and the packed length. Fudge the
+ //packed length and set the real length.
+ cord.setCordLength(mass.getLength());
+ cord.setLength(cord.getCordLength() / MASS_LEN_FUDGE_FACTOR);
+ if (parent instanceof Coaxial) {
+ Coaxial parentCoaxial = (Coaxial) parent;
+ cord.setRadius(parentCoaxial.getInnerRadius());