Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
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 dimension | Y-start dimension | Quantity of holes |
---|---|---|
2.5 | 4.33 | 6 |
3.78 | 11.63 | 10 |
4.04 | 19.03 | 15 |
3.98 | 26.38 | 21 |
3.94 | 33.67 | 27 |
4.03 | 40.93 | 32 |
3.99 | 48.19 | 38 |
3.97 | 55.43 | 44 |
4.02 | 62.67 | 49 |
4 | 69.91 | 55 |
3.98 | 77.15 | 61 |
4.02 | 84.38 | 66 |
4 | 91.61 | 72 |
3.98 | 98.85 | 78 |
4.02 | 106.07 | 83 |
4 | 113.3 | 89 |
3.99 | 120.53 | 95 |
4.02 | 127.76 | 100 |
4 | 134.99 | 106 |
3.99 | 142.22 | 112 |
Solved! Go to Solution.
Peter,
I created "some" files in Excel 2010 and CR2 M070 .
1.) table_pattern.xlsm
Sub generate_coordinates()
'
' generate_coordinates Makro
''
Dim i, j, k As IntegerDim q As Integer
Dim r As Double
Dim a As Doublek = 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)).ValueFor 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 jNext i
End Sub
2.) table_pattern.prt
MH
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
Sub generate_coordinates()
'
' generate_coordinates Makro
''
Dim i, j, k As IntegerDim q As Integer
Dim r As Double
Dim a As Doublek = 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)).ValueFor 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 jNext i
End Sub
2.) table_pattern.prt
MH
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
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.
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