TEKLA API - CREATE PART "Ring type"
Code to create a part like a ring, will be inserted in center of the model as a pipe profile.
Codigo para inserir peca tipo anel, sera inserido no centro do modelo com um perfil tipo Tubo.
//CREATE RING BEAM
#region
private void create_RingBeam()
{
double diametro = Convert.ToDouble(txtDiameter.Text);
double altura = Convert.ToDouble(txtHeigth.Text);
double raio = diametro / 2.0;
double SlabOut = Convert.ToDouble(txtSlabSizeOutOfWall.Text);
TSG.Point point1 = new TSG.Point(0, 0, 0);
TSG.Point point2 = new TSG.Point(0, 0, 300);
Beam ringbeam = new Beam();
ringbeam.StartPoint = point1;
ringbeam.EndPoint = point2;
ringbeam.Profile.ProfileString = "PD" + (diametro + 1000) + "*" + "300";
ringbeam.Name = "RING BEAM";
ringbeam.Finish = "PAINT";
ringbeam.Class = "2";
//ringbeam.Position. = "raio";
ringbeam.Position.Rotation = TSM.Position.RotationEnum.BACK;
ringbeam.Position.Plane = TSM.Position.PlaneEnum.MIDDLE;
ringbeam.Position.Depth = TSM.Position.DepthEnum.MIDDLE;
ringbeam.StartPointOffset = new Offset();
ringbeam.EndPointOffset = new Offset();
bool result = false;
result = ringbeam.Insert();
}
#endregion
Codigo para inserir peca tipo anel, sera inserido no centro do modelo com um perfil tipo Tubo.
//CREATE RING BEAM
#region
private void create_RingBeam()
{
double diametro = Convert.ToDouble(txtDiameter.Text);
double altura = Convert.ToDouble(txtHeigth.Text);
double raio = diametro / 2.0;
double SlabOut = Convert.ToDouble(txtSlabSizeOutOfWall.Text);
TSG.Point point1 = new TSG.Point(0, 0, 0);
TSG.Point point2 = new TSG.Point(0, 0, 300);
Beam ringbeam = new Beam();
ringbeam.StartPoint = point1;
ringbeam.EndPoint = point2;
ringbeam.Profile.ProfileString = "PD" + (diametro + 1000) + "*" + "300";
ringbeam.Name = "RING BEAM";
ringbeam.Finish = "PAINT";
ringbeam.Class = "2";
//ringbeam.Position. = "raio";
ringbeam.Position.Rotation = TSM.Position.RotationEnum.BACK;
ringbeam.Position.Plane = TSM.Position.PlaneEnum.MIDDLE;
ringbeam.Position.Depth = TSM.Position.DepthEnum.MIDDLE;
ringbeam.StartPointOffset = new Offset();
ringbeam.EndPointOffset = new Offset();
bool result = false;
result = ringbeam.Insert();
}
#endregion
Comentários
Enviar um comentário