cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Making complex hole patterns

pvandekerkhof
1-Newbie

Making complex hole patterns

For several customer we need to make complex hole patterns on a concave surface.

If we can use the fill feature we do, this save a hole lot of time.

But in some cases (al lot) we can't use the fill pattern, then this work is very time consuming and Creo will become a bottleneck.

I'm really looking for some help or ideas.

Below a hole pattern and picture for example.

X-start dimensionY-start dimensionQuantity of holes
2.54.336
3.7811.6310
4.0419.0315
3.9826.3821
3.9433.6727
4.0340.9332
3.9948.1938
3.9755.4344
4.0262.6749
469.9155
3.9877.1561
4.0284.3866
491.6172
3.9898.8578
4.02106.0783
4113.389
3.99120.5395
4.02127.76100
4134.99106
3.99142.22112

Capture.JPG


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 ACCEPTED SOLUTION

Accepted Solutions

Peter,

I created "some" files in Excel 2010 and CR2 M070 .

1.) table_pattern.xlsm

  • using x and y values related to the 1st hole I was able to compute circle radius r (column D) and angle a related to the 1st hole (column E)
  • using macro generate_coordinates I was able to generate radius r and angle a of all holes (the very first hole is pattern leader, its dimensions are not included in table)

Sub generate_coordinates()
'
' generate_coordinates Makro
'

'
Dim i, j, k As Integer

Dim q As Integer
Dim r As Double
Dim a As Double

k = 2

For i = 1 To 20
q = Range("C" & Mid(Str(i + 1), 2)).Value
r = Range("D" & Mid(Str(i + 1), 2)).Value
a = Range("E" & Mid(Str(i + 1), 2)).Value

For j = 1 To q
Range("H" & Mid(Str(k), 2)).Value = k - 2
Range("I" & Mid(Str(k), 2)).Value = r
Range("J" & Mid(Str(k), 2)).Value = a
a = a + 360 / q
If a > 360 Then
a = a - 360
End If
k = k + 1
Next j

Next i

End Sub

  • I copied generated output to table3.txt and replaced a) comma characters with decimal point b) tabs with spaces
  • I copied modified contents of table3.txt to table3.ptb

2.) table_pattern.prt

  • I used table3.ptb as driving table of pattern

MH


Martin Hanák

View solution in original post

15 REPLIES 15

have you tried creating a sketch using those position as geometry points and then pattern the holes as points? You lose the tables but now points can be controlled my relations if you want to get it more automated.

Hi Son,

I like your answer but i 'm sorry to say that i have no clue how to perform this action.

I never worked that way.

What rules are driving the spacing and quantities?

Hi David,

The rules are as the table aboved is.

that's all i get from my customers, and i can't change a single thing.

i normally make the first hole with the hole feature.

and then with table pattern i make the rest of the holes.

Then with geometry pattern i rotated the individual hole around the Z-axis.

After +/- 10 pcd's Creo gets very slow.

Change the pattern type to Identical (whatever the name is now). The default General type allows for pattern members to intersect each other, so each member check on all previous members for possible intersection. Slows things to a crawl.

Not sure what a pcd is.

What is the purpose of modeling the holes? A CNC macro would work better to produce the holes.

You say that sometimes you are able to pattern the holes, have you figures out what determines success and failure of the pattern? I would look to figure out why sometimes it works and sometimes it doesn't before you try to come up with a preferred method.

Maybe relative accuracy?

Hi Dan,

The only time the fill pattern works if the spacing is equal, and the amount of holes is the same.

This happens 1 in the 25 times.

See my reply to David for more info

Do a search for "golf ball" and review a few of the links.

Those discussions my provide some insight.

Peter,

Have you tried working with surfaces?   (Many times I have seen Creo get bogged down with "solid feature" patterns.)  

This will likely cause you to have many "merge" features in your tree,  but in the end you may end up with a part that regenerates much faster. 

Here is how I would go about it...

-Start with your solid plate as you normally would.

-Copy the top surface of the plate (to create a surface)

-Extrude your first hole as a surface cylinder

      - not a solid hole, and not a Hole Feature

      - make your extrude long enough that it protrudes through both sides of the material thickness

-Pattern the Extruded surface cylinder

-Merge all of the surface cylinders to the top surface that you copied earlier

-Use a "Solidify Cut" feature to cut out all the holes at one time.

Not sure if its gonna cure your problem, but it might be worth a try.

Good Luck

Bernie

Bernie Gruman

Owner / Designer / Builder

www.GrumanCreations.com

Peter,

I created "some" files in Excel 2010 and CR2 M070 .

1.) table_pattern.xlsm

  • using x and y values related to the 1st hole I was able to compute circle radius r (column D) and angle a related to the 1st hole (column E)
  • using macro generate_coordinates I was able to generate radius r and angle a of all holes (the very first hole is pattern leader, its dimensions are not included in table)

Sub generate_coordinates()
'
' generate_coordinates Makro
'

'
Dim i, j, k As Integer

Dim q As Integer
Dim r As Double
Dim a As Double

k = 2

For i = 1 To 20
q = Range("C" & Mid(Str(i + 1), 2)).Value
r = Range("D" & Mid(Str(i + 1), 2)).Value
a = Range("E" & Mid(Str(i + 1), 2)).Value

For j = 1 To q
Range("H" & Mid(Str(k), 2)).Value = k - 2
Range("I" & Mid(Str(k), 2)).Value = r
Range("J" & Mid(Str(k), 2)).Value = a
a = a + 360 / q
If a > 360 Then
a = a - 360
End If
k = k + 1
Next j

Next i

End Sub

  • I copied generated output to table3.txt and replaced a) comma characters with decimal point b) tabs with spaces
  • I copied modified contents of table3.txt to table3.ptb

2.) table_pattern.prt

  • I used table3.ptb as driving table of pattern

MH


Martin Hanák

Hi Martin,

Thanks for your great idea.

This saves us a lot of time.

Greetings Peter

With a couple of other functions this can create the file directly. No need to edit.

In the attached I've added a macro called 'new_gen'. Just select the rows with the X, Y, Quantities and then run the macro. It isn't even necessary to select all the columns; just make the selection cover the desired rows. Some day I'll figure out how to select offsets within the selection. Sigh.

It prompts for a directory to write the file and then prompts for the name. If you don't enter a name it calls it points.ptb. If you don't add the suffix, it adds '.ptb.'

The output carries the full accuracy of the coordinates, though I don't know if it is required or beneficial.

Hi David,

Thanks for the new Macro, it works fine.

Only i don't get the file name wright, everything i give in in the window the macro overwrite it with points.ptb.

But that is a minor problem.

Greetings Peter

Peter,

there is little typo in macro called 'new_gen'.

Replace ... If Filename = "" Then File_name = "points.ptb"

with ... If File_name = "" Then File_name = "points.ptb"

MH


Martin Hanák

Thanks Martin; it was a very frustrating effort to get the cell reference to work MS Excel help is no help at all and it seemed to work otherwise; I should have used Option Explicit, but one of the 'Help' functions that doesn't help is that it doesn't show what all the function return types are. Sigh. 

I also found that there could be some internationalization that would help if commas are a problem.

Look for the Application.International Property (Excel)

which returns (among a lot of other interesting results) the characters for the:

xlDecimalSeparator: String Decimal separator

and

xlThousandsSeparator: String Zero or thousands separator.

The following shows the functions used to determine what symbols are being used and change the A1 cell text contents.

MrExcel Message Board

Private Sub CommandButton1_Click()

    Dim DecSep As String

    Dim ThouSep As String

    DecSep = Application.International(xlDecimalSeparator)

    ThouSep = Application.International(xlThousandsSeparator)

    If DecSep = "." Then

        Range("A1").Value = TextBox1.Value

    Else

        Range("A1").Value = WorksheetFunction.Substitute(TextBox1.Value, DecSep, ThouSep)

    End If

End Sub

Top Tags