Could you upload a picture or sample file???
The link below should contain the file.
There are 3 sections to it:
"As measured" is a 3d sketch of the raw data we measured from one of our cam profiles.
The composite curve is an example of what I'd like to split into 360 degrees.
Not sure exactly what your intend is. But I would go about this way. The part file is configured to 1° increments. I added reference dimensions. So if you are looking for coordinate data, check the two dimensions. It will work for 360 degrees. If you need sections, then just copy the file itself into the assembly fixed at the origin and select the running configurations. Much faster then modeling 1 deg. planes etc.
See if that works
like your approach in assembly!
I'm not sure I'm following. You're saying to try and load 360 instances of the part into an assembly and select each as it's respective configuration, then place a point at the end point of each line?
If you tell me what you need to do then I might be able to give you a meaning full answer before we go any further.
Explain what it is that you are trying to accomplish i.e. do you need coordinates, do you need a drawing, a segmented part file etc.
I'm sorry, I'm not always the best at explaining the whole situation.
At the end of the day, what I would like is XYZ data for the composite curve in 1 degree intervals.
My thought was if there was an easy way to create points on the curve separated by 1 degree there are plenty of macros out there to export the point coordinates into an excel format.
Once it's into excel we're then going to load the data into our camshaft measuring machine and use it to for profile validation.
If there is a better way to extract the XY data out of the curve; I'm definitely open to suggestions.
Seems like you need a macro for this
You will likely need to generate your own splitting geometry - either 360 radial lines or 180 diametrical lines/planes.
The problem is when that many lines are created in a sketch it overloads the system.
It's possible to split it into 4 sketches and manually place points; it's just terribly inefficient.
You could also make two lines at ten degree apart then create 10 points , then use one of the lines to mirror those lines and keep doing that till the circle is complete..
I just gave it a shot; it seems to make a circle out of the points rather than continuing on with the curve / line intersection relationship.
The fastest way that I can think to do this is patterned planar surfaces that are used to split an extruded body created from the cam profile. The most tedious part is selecting the checkbox for each body in the 'Resulting Bodies' section of the Split Property Manager Page:
A macro could certainly eliminate all of the tedium.
The end result is a solid split into 360 pie slices with a vertex at each degree.
Sample of this approach using your file is attached.
cam lobe.SLDPRT.zip 1.8 MB
Quick and dirty.
Open the part file then open excel blank spread sheet. Copy code into solidwork vba module and run it.
You need to check Microsoft Excel X.X object library for it run.
Cylinder coordinates output as per image below. First row is angle, second row is radius dimension in inches of cam ref point.
X & Y coordinates can be calculated in excel if you want to.
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swDim, ADim As SldWorks.Dimension
Dim vDimVal, aDimVal As Variant
Const PI As Double = 3.14159265358979
Dim xlApp As Excel.Application
Dim xlWorksheet As Excel.Worksheet
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Dim varr() As Variant
ReDim Preserve varr(1 To 359)
Set swDim = swModel.Parameter("d@Fit Spline")
Set ADim = swModel.Parameter("d3@Fit Spline")
Set xlApp = GetObject(, "excel.application")
Set xlWorksheet = xlApp.ActiveSheet
For i = 1 To 359
ADim.SystemValue = i / 180 * PI
aDimVal = ADim.GetSystemValue3(swThisConfiguration, Empty)
swDim.SetSystemValue3 aDimVal(0), swThisConfiguration, Empty
Debug.Print aDimVal(0) / PI * 180
vDimVal = swDim.GetSystemValue3(swThisConfiguration, Empty)
swDim.SetSystemValue3 vDimVal(0) * 25.4 / 1000, swThisConfiguration, Empty
varr(i) = vDimVal(0) * 1000 / 25.4
'Debug.Print vDimVal(0) * 1000 / 25.4
xlWorksheet.Cells(i, 1) = i
xlWorksheet.Cells(i, 2) = varr(i)
cam lobe.SLDPRT.zip 96.5 KB
This is awesome thank you! It's really close.
The macro resets at 180 so the values from 1 to 180 are the same as the values from 181 - 359.
Thank you very much!
It's greatly appreciated.