i was writing ilogic code to Create Rack and Pinion
by Analytical geometry Method
Here is the image
Somehow i was not able to Mirror Involute Profile
i am also failed to Pattern Entities
i was not able to Find Equavelent command in API For Circlular Pattern
Solved! Go to Solution.
Solved by adam.nagy. Go to Solution.
Solved by ekinsb. Go to Solution.
There is some functionality in the product that's missing in the API. For example, the API does not currently support the creation of patterns in a sketch. I don't know of any workaround for that. The API also does not directly support the ability to do mirroring, however it does support some lower-level functionality so you can end up with the same result. In general, it's better practice to mirror and pattern features rather than sketch geometry to create more complex geometry. Specifically in your case, it would be better to create a single tooth and then mirror the extrusion to create the additional teeth.
When you use the mirror command in a sketch it's actually creating new geometry that is tied to the original using symmetry constraints. You can see this if you do a mirror operation and then turn on the display of all of the geometric constraints. In the case of a spline it's the points that the curve goes through that have the symmetry constraint. Below is a program that illustrates how this can be used to creat a mirrored version of an existing curve.
Public Function TestMirror() Dim spline As SketchSpline Set spline = ThisApplication.CommandManager.Pick(kSketchCurveSplineFilter, "Select the spline") Dim line As SketchLine Set line = ThisApplication.CommandManager.Pick(kSketchCurveLinearFilter, "Select the symmetry line") Dim sp As SketchSpline Set sp = CreateMirroredSpline(spline, line) End Function Private Function CreateMirroredSpline(spline As SketchSpline, Axis As SketchLine) As SketchSpline ' Get the parent sketch. Dim sk As sketch Set sk = spline.Parent ' Create a copy of the existing spline. Dim fitPoints As ObjectCollection Set fitPoints = ThisApplication.TransientObjects.CreateObjectCollection Dim i As Integer For i = 1 To spline.FitPointCount Dim newPoint As SketchPoint Set newPoint = sk.SketchPoints.Add(spline.FitPoint(i).Geometry, False) ' Make each point symmetric. Call sk.GeometricConstraints.AddSymmetry(spline.FitPoint(i), newPoint, Axis) ' Add the new point to a collection. Call fitPoints.Add(newPoint) Next ' Create a spline that fits through the new points. Dim newSpline As SketchSpline Set newSpline = sk.SketchSplines.Add(fitPoints, spline.FitMethod) End Function
i was trying to do something similar which is shown in this video
but unfornutely it didnt got in right way for me
--
Ravi Kumar mb
mb: +919845032338
Thanks Brain and Adam
Mirroring Spline by above mentioned method is an interactive method
Patterning Lines in sketch was not supported by API
and Dimensioning between two end points of a line which has same start point
as ArcLength was not also possible in inventor
Creating individual Arcs between each segment then Placing Reference Dim between
those segments is tedious process
This is possible with Soildworks which is shown in this video
I also tried by 2D Equation Curves
it seems to have some bug which is mentioned in this
tmin wont start at 0
we have to replace it with 0.004 so involute is not accurate
bec of which i was not able add constraint between involute profile and Line Segment
Has anybody automated Rack and Pinion so Far
by Default Inventor API Should Support all the things which i can do manually
if not in all aspects
ATLEAST IN SKETCH ENVIRONMENT
IT SAVES LOT OF REPEATED LINE OF CODES IN MY PROGRAMME
patterns and mirroring are most important in sketches
http://forums.autodesk.com/autodesk/attachments/autodesk/78/338824/1/Spur%20Gear%20Tutorial.pdf
There is a model of an involute spur gear on cbliss.com:
http://www.cbliss.com/inventor/Parts/PowerTransmission/Involute Gear.zip
The creation of the involute curve is done via an embedded Excel spreadsheet, which by itself is worth looking at to see how it works.
https://grabcad.com/questions/creating-precise-involute-spur-gears-using-excel-and-autocad
Thanks
i was just trying to create by API Method
https://www.youtube.com/watch?v=4zdu60I47DE
I have logged a wish-list item to get API support for Mirror and Pattern inside a Sketch - request #51632
After spending quite a few weeks working on an add-in I reach a critical point to discover mirroring and patterning in sketches is not supported in the api. A request for this functionality submitted 5 years ago seems to lie moribund. Workarounds are just not going to cut it. I think at this point I will write off my time and put it down to experience.