Creating Coordinate-Driven Circles in Sketching

Hello 

I'm creating a python program that allows me to take a dxf plane and output information, including x-coordinates, y-coordinates, and the radius of holes in a chassis. I would now like to be able to modify my solidworks assembly with this information. The problem is that the number of holes depends on each truck and the spacing between them as well, so no simple linear repetition . Do you have an idea to create circles in a sketch knowing their x,y and radius coordinates?

In the worst case I can always create a hundred circles, put quotes everywhere and control them with a txt file, but if you have a more elegant technique I'm all for it!

Hello

Have you looked at the repetition by board?

I've never used it, but you never know if you can adapt it to your problem.

1 Like

Thank you for your answer, 

Indeed, it could be suitable because there is a way to control the coordinates. Unfortunately it turns out that the diameters of my holes also change and a priori you can't control the diameter with this technique. (or I didn't find it)

 

Edit: Or I would have to create several functions with drilling diameters that I am likely to encounter and create several control functions per panel. I'd do that if we can't find something better:)

Yes, dividing your function by diameter would be a good solution if you can't find anything better.

I think the  problem would have also arisen with the drilling function.

Keep us informed.

 

Magnificent, it works perfectly.

I studied the question in more detail and it turns out that the repetition function by array works nicely.

I used several Repeat functions per table for different holes, each driven by a text file with the coordinates retrieved from the dxf.

Thank you @FUZ3D for your help! Good luck.

 

 


fonctionnementprogramme.doc
1 Like

Tell that you have found your happiness.

Good luck.

All that's left to do is make us tutorials in python;)

2 Likes