Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

VB macro for points insertion in stock

Status
Not open for further replies.

berri2

Mechanical
Apr 6, 2010
139
Hi all,

I want a VB macro, for inserting points in de middle of the faces

of a rectangular workpiece, as the photo attached. Select the stock execute de VB and points insertion.

And if its possible, in the middle of a circumference too, when I select the stock model.

Thanks.



 
Replies continue below

Recommended for you

The attached journal in the zip file (change .txt to .vb) will work for circular and rectangular/square faces. The journal simply asks you to select faces. The journal then checks that the face is planar. If the face has one edge and it is circular then the centre point is created. If the face has four linear edges then I have assumed they form a rectangle or square (not always the case but should generally be OK) then the journal creates its centre point.

The more general case of creating a planar outline centroid requires the following.
1) Make the face the work plane.
2) Create a boundary entity through the edges.
3) Use the boundary to determine the centroid.
4) Create the point.

To create the boundary (in a program) I would need to have a CAM license (which I don't have)

Hope this helps.

Frank Swinkels
 
 http://files.engineering.com/getfile.aspx?folder=e0d421ea-3e57-437c-a4ff-ef48cb9f980d&file=FaceCentrePoints.zip
Thanks Frank,

I was looking for this.

 
apa berri,eres el puto amo,estos giris solo saben comer donuts y se creen la polla,pero asi va el mundo,todo transgenico y superficial,siempre dependiendo de la puta gasolina,En fin,seguiremkos chuopandoles el culete a estos mamones,chao.
 
Hi Josemi,

You are the best jajajaja.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor