Hello
I want to create a sketch repeat by varying some parameters. For example, repetition of hole sketches by varying the Ø of them. Unfortunately, it is not possible to vary the occurrences of a sketch. Even on a function, I can change the spacing increment but I can't find anything if I want an increment concerning the Ø of the hole.
Thank you in advance if anyone can help me...
PS: Basically, I would like to make a sketch like on the diagram above.
Hello;
I don't know which version of Solidworks you are using, but normally it is possible to use " Variable Repeat " to get this type of results:
Kind regards
Hello;
On the official Solidworks forum, you can see the answer proposed to @john_john by Andreas SPIELER for practically the same request:
…
Hello @john_john ,
The joined macro allows a repetition of a sketch of a circle with a regular increase in its radius. And only a circle, although other entities could be considered.
The only instructions for use are in the video below.
There are few securities, so you have to be vigilant about the order in which entities are entered.
And no Ctrl^Z in case of clumsiness...
RepeatIncrmt.swp (83.5 KB)
Hello and thank you for the info. Unfortunately this does not solve my problem.
To be more explicit, here is the file that is causing me problems. I laid down each sketch manually, the angles and lengths evolving according to equations.
I would like to automate this principle so that I only have to draw the 1st sketch and make a circular repetition by varying the year D1 and the length D2.
Rack Generation.SLDPRT (2.5 MB)
Hello;
What is the Solidworks version of your file?
(A priori it's higher than 2022)...
Have you tried the Variable repetition with an Excel import to keep your equations?
I think you have to abandon the idea of doing your repetitions in a sketch and make them from a function (material removal?).
Well I can't open your file but I protest ...
You want to:
and the Variable repetition meets this demand perfectly.
(you can vary the diameters as well as the angles (distance) of each occurrence, all in a circular repetition...) I must have misunderstood your question.
Actually, Super macro @m_blt . (And yes, Macro and CTRL+Z are not super compatible.)
This is the 2024 version.
Indeed, I have to do it with a function and not a sketch.
Going through SW, I can't put formulas to vary the angles and lengths. By creating an excel file that calculates all this, it should work.
Thanks for the advice.
Good evening
Apparently, it's about generating the teeth of a pinion from a rack. This is a far cry from the circular repetition of circles with increments of the radius...
If I have understood correctly, the goal is to implant the rack in successive machining positions, by making sure that its primitive line rolls without sliding on the primitive circle of the future pinion.
The rack is defined as a sketch block. Interest:
- a single entity, easy to implement in a sketch by a VBA function,
- the same function allows you to define the position of the insertion point and the inclination of the block (no need for dimensioning, unless you want to constrain all the sketches),
- it is sufficient to exploit the condition of RsG as a function of inclination to define the coordinates of the insertion point. In the initial position, the insertion point is placed at the tangent point of the primitives.
Then the function of removing material in a loop remains to be repeated: about one second per position.
The parameters to be defined are as follows:
- the primitive radius of the pinion by selecting the primitive circle,
- the numerical value of the increment of the angle of inclination,
- the number of positions to be generated.
It works, revealing some interference at the tooth foot of the pinion. A gear offset is necessary...
generationRackwarming.SLDPRT (1.1 MB)
GenerationCr.swp (91.5 KB)