// Check if "test" is a duplicate of this cross section - necessary because karamba adds preset cross sections public bool duplicate(CrossSection test) { if (shape == "V") { if (height == test.height && lowerWidth == test.lowerWidth && upperWidth == test.upperWidth) { ids.AddRange(test.ids); return(true); } } else if (shape == "O") { if (diameter == test.diameter && thickness == test.thickness) { ids.AddRange(test.ids); return(true); } } else if (shape == "[]") { if ( height == test.height && sWallThick == test.sWallThick && filletRadius == test.filletRadius && upperWidth == test.upperWidth && lowerWidth == test.lowerWidth && upperThick == test.upperThick && lowerThick == test.lowerThick ) { ids.AddRange(test.ids); return(true); } } else if (shape == "I") { if ( height == test.height && webThick == test.webThick && filletRadius == test.filletRadius && upperWidth == test.upperWidth && lowerWidth == test.lowerWidth && upperThick == test.upperThick && lowerThick == test.lowerThick ) { ids.AddRange(test.ids); return(true); } } return(false); }
public Beam(Karamba.Elements.ModelElement beam = null) { id = 1; ids = new List <int>(); user_id = ""; start = end = new Node(); sec = new CrossSection(); color = new Color(); if (beam != null) { hydrate(beam); } }