PDA

View Full Version : Can anyone suggest the logic behind this



thomachans
01-21-2009, 11:59 PM
Dear All --

I have a long plate with bolt holes over which bars are placed.
The length of the long plate is user defined. Max 15000 mm

The bars placed on this can be of variable length, but the standard size is 1520, but while placing, it can be anything less than 1520 but not more than 1520


The bars are to be placed one after the other.

The bars have to satisfy some conditions like ,

atleast 2 bolt hole should be there for one bar,
atleast each end of the bar be atleast 70mm apart from the bolt hole


the positions of the bolt holes are defined by the user.

the minimum distance of the bolt holes are more than 200mm but less than 1180

on the contrary the length of the bars over the long plate will not be the same for one another

I need to find the length of the bars.

The user inputs are

1) The length of Long Plate ( not greater than 15000)
2) The Positions of the Holes ( not less than 200mm and not more than 1180)
3) The number of Bolt Holes in the Long Plate is also User defined



How will code for the same ???

All suggestions are appreciated ..

Cheers!!!