Fix to streamer loading of materials; missing material in Giant Leaps file.
This commit is contained in:
parent
798f631259
commit
e3f173d83e
@ -3,3 +3,4 @@ Cardboard,lb/ft3,43,,,,1,1,1,1,0,1,0,0,1,1,1,1,1,1,,,,,,,,None,0,0
|
||||
Birch,lb/ft3,42.5,,,Wood,1,0,1,0,0,1,0,1,1,1,1,1,0,0,,,,,,,,None,0,0
|
||||
Kraft phenolic,lb/ft3,59.85,,,,1,1,0,0,0,0,0,0,0,1,0,0,1,1,,,,,,,,None,0,0
|
||||
Polycarbonate,lb/ft3,74.9,,,,1,1,1,1,0,1,0,0,1,1,1,1,1,1,,,,,,,,None,0,0
|
||||
Rip stop nylon,g/cm2,0.006685,,,,1,0,0,0,0,0,1,1,0,0,0,0,0,0,,,,,,,,None,0,0
|
||||
|
|
@ -11,9 +11,19 @@ public class StreamerLoader extends BaseComponentLoader {
|
||||
|
||||
private final MaterialHolder materials;
|
||||
|
||||
public StreamerLoader(MaterialHolder materials, File theBasePath) {
|
||||
super(materials, theBasePath);
|
||||
this.materials = materials;
|
||||
public StreamerLoader(MaterialHolder theMaterials, File theBasePath) {
|
||||
super(theMaterials, theBasePath);
|
||||
materials = theMaterials;
|
||||
|
||||
//The base component loader adds a bulk material loader, which is incompatible with the surface loader
|
||||
//for a streamer. Remove the file column parser here so we can set your own in the code that follows.
|
||||
for (int i = 0; i < fileColumns.size(); i++) {
|
||||
RocksimComponentFileColumnParser rocksimComponentFileColumnParser = fileColumns.get(i);
|
||||
if (rocksimComponentFileColumnParser instanceof MaterialColumnParser) {
|
||||
fileColumns.remove(rocksimComponentFileColumnParser);
|
||||
}
|
||||
}
|
||||
|
||||
fileColumns.add(new SurfaceMaterialColumnParser(materials,"Material",ComponentPreset.MATERIAL));
|
||||
fileColumns.add(new DoubleUnitColumnParser("Length","Units",ComponentPreset.LENGTH));
|
||||
fileColumns.add(new DoubleUnitColumnParser("Width","Units",ComponentPreset.WIDTH));
|
||||
|
Loading…
x
Reference in New Issue
Block a user