public static Slab Plate(Autodesk.DesignScript.Geometry.Surface surface, double thickness, Materials.Material material, [DefaultArgument("ShellEccentricity.Default()")] ShellEccentricity shellEccentricity, [DefaultArgument("ShellOrthotropy.Default()")] ShellOrthotropy shellOrthotropy, [DefaultArgument("EdgeConnection.Default()")] EdgeConnection shellEdgeConnection, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localX, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localZ, string identifier = "P") { // create FlatSurface Geometry.Region region = Geometry.Region.FromDynamo(surface); // create Thickness object List <Thickness> _thickness = new List <Thickness>(); _thickness.Add(new Thickness(region.CoordinateSystem.Origin, thickness)); // create shell Slab slab = Slab.Plate(identifier, material, region, shellEdgeConnection, shellEccentricity, shellOrthotropy, _thickness); // set local x-axis if (!localX.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0))) { slab.SlabPart.LocalX = FemDesign.Geometry.FdVector3d.FromDynamo(localX); } // set local z-axis if (!localZ.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0))) { slab.SlabPart.LocalZ = FemDesign.Geometry.FdVector3d.FromDynamo(localZ); } return(slab); }
public static Slab PlateVariableThickness(Autodesk.DesignScript.Geometry.Surface surface, List <Thickness> thickness, Materials.Material material, [DefaultArgument("ShellEccentricity.Default()")] ShellEccentricity shellEccentricity, [DefaultArgument("ShellOrthotropy.Default()")] ShellOrthotropy shellOrthotropy, [DefaultArgument("EdgeConnection.Default()")] EdgeConnection shellEdgeConnection, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localX, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localZ, string identifier = "P") { // create FlatSurface Geometry.Region region = Geometry.Region.FromDynamo(surface); // check length of thickness if (thickness.Count != 3) { throw new System.ArgumentException("Thickness must contain exactly 3 items."); } // create shell Slab slab = Slab.Plate(identifier, material, region, shellEdgeConnection, shellEccentricity, shellOrthotropy, thickness); // set local x-axis if (!localX.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0))) { slab.SlabPart.LocalX = FemDesign.Geometry.FdVector3d.FromDynamo(localX); } // set local z-axis if (!localZ.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0))) { slab.SlabPart.LocalZ = FemDesign.Geometry.FdVector3d.FromDynamo(localZ); } return(slab); }
public static Slab Wall(Autodesk.DesignScript.Geometry.Surface surface, double thickness, Materials.Material material, [DefaultArgument("ShellEccentricity.Default()")] ShellEccentricity shellEccentricity, [DefaultArgument("ShellOrthotropy.Default()")] ShellOrthotropy shellOrthotropy, [DefaultArgument("EdgeConnection.Default()")] EdgeConnection shellEdgeConnection, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localX, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localZ, string identifier = "W") { // create FlatSurface Geometry.Region region = Geometry.Region.FromDynamo(surface); // create Thickness object List <Thickness> _thickness = new List <Thickness>(); _thickness.Add(new Thickness(region.CoordinateSystem.Origin, thickness)); // check if surface is vertical if (Math.Abs(region.CoordinateSystem.LocalZ.Z) > FemDesign.Tolerance.Point3d) { throw new System.ArgumentException("Wall is not vertical! Create plate instead."); } // create shell Slab slab = Slab.Wall(identifier, material, region, shellEdgeConnection, shellEccentricity, shellOrthotropy, _thickness); // set local x-axis if (!localX.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0))) { slab.SlabPart.LocalX = FemDesign.Geometry.FdVector3d.FromDynamo(localX); } // set local z-axis if (!localZ.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0))) { slab.SlabPart.LocalZ = FemDesign.Geometry.FdVector3d.FromDynamo(localZ); } return(slab); }
public static Slab Wall(string identifier, Materials.Material material, Geometry.Region region, EdgeConnection shellEdgeConnection, ShellEccentricity eccentricity, ShellOrthotropy orthotropy, List <Thickness> thickness) { // check if surface is vertical if (Math.Abs(region.CoordinateSystem.LocalZ.Z) > FemDesign.Tolerance.Point3d) { throw new System.ArgumentException("Wall is not vertical! Create plate instead."); } Slab._wallInstance++; SlabType type = SlabType.Wall; string name = identifier + "." + Slab._wallInstance.ToString() + ".1"; SlabPart slabPart = SlabPart.Define(name, region, thickness, material, shellEdgeConnection, eccentricity, orthotropy); Slab shell = new Slab(type, name, slabPart, material); return(shell); }
public static Slab Plate(string identifier, Materials.Material material, Geometry.Region region, EdgeConnection shellEdgeConnection, ShellEccentricity eccentricity, ShellOrthotropy orthotropy, List <Thickness> thickness) { Slab._plateInstance++; SlabType type = SlabType.Plate; string name = identifier + "." + Slab._plateInstance.ToString() + ".1"; SlabPart slabPart = SlabPart.Define(name, region, thickness, material, shellEdgeConnection, eccentricity, orthotropy); Slab shell = new Slab(type, name, slabPart, material); return(shell); }
/// <summary> /// Construct SlabPart with EdgeConnections. /// </summary> public static SlabPart Define(string name, Geometry.Region region, List <Thickness> thickness, Materials.Material material, EdgeConnection shellEdgeConnection, ShellEccentricity eccentricity, ShellOrthotropy orthotropy) { // add edgeConnections to region region.SetEdgeConnections(shellEdgeConnection); // construct new slabPart SlabPart slabPart = new SlabPart(name, region, thickness, material, eccentricity, orthotropy); // return return(slabPart); }
/// <summary> /// Construct SlabPart. /// </summary> public SlabPart(string name, Geometry.Region region, List <Thickness> thickness, Materials.Material complexMaterial, ShellEccentricity alignment, ShellOrthotropy orthotropy) { this.EntityCreated(); this.Name = name; this.Region = region; this.ComplexMaterial = complexMaterial.Guid; this.Alignment = alignment.Alignment; this.AlignOffset = alignment.Eccentricity; this.OrthoAlfa = orthotropy.OrthoAlfa; this.OrthoRatio = orthotropy.OrthoRatio; this.EccentricityCalculation = alignment.EccentricityCalculation; this.EccentricityByCracking = alignment.EccentricityByCracking; this.Thickness = thickness; this.LocalPos = region.CoordinateSystem.Origin; this._localX = region.CoordinateSystem.LocalX; this._localY = region.CoordinateSystem.LocalY; this.End = ""; }