Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Make an Adjustable Block

Status
Not open for further replies.

assyrian47

Technical User
Mar 17, 2002
7
US
I have a special block that represents something similar to a pipe. Can someone direct me to a tutorial on how this can be achieved? I am sure some programming is involved. What I am trying to achieve is to insert the block and be prompted for the desired length in inches. If not too difficult the insertion point selection at the left or right end of the pipe would be nice.


 
Thanks for the response. It is a little more complex than just drawing the two lines. The block I am using is a pipe like structure with special connectors on the end (flanges). I want to be able to control the distance (A) from flange to flange.

| |
|-----------------------------|
| |

|--------------A--------------|

The ideal situation. When you insert the block you are prompted for the length A. I am sure this requires some programming.

Thanks
 
You did not say if this routine should work in 2 or 3D, assuming 2D

Assuming your assembly contains: flange A, Flange B and Pipe
Possible solution could be:


1. Get 2 points interactively, first point on the screen is flangeA side, second point is flange B side. (User can play in this way to orientate on which side will wants flange A and on which angle he wants to have this pipespool.)
2. Insert flange A-block on startpoint with calculated angle between the 2 points. ( Insertionpoint of flange on center of face)
3. Insert flange B-block on endpoint with calculated angle between the 2 points. ( Insertionpoint of flange on center of face)
4. Subtract the working length of both flanges from the calculated length between the 2 points. Draw the 2 lines with this length and ½ diam offset from the centerline between the 2 flanges.
5. Make one block of it.

Hope this helps.

Have fun!
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top