Post B8Af5CFuao8cH5gPgG by dgrabla@mastodon.social
(DIR) More posts by dgrabla@mastodon.social
(DIR) Post #B8AUGghqcT84PB1iaG by mntmn@mastodon.social
0 likes, 0 repeats
i'm more comfy in inkscape than in freecad sketcher, but also i often need to import and replace step files in a freecad assembly, so i made two little scripts today that are super useful for my workflow: 1. conversion (extrusion) of an svg face (outline) to a 3D STEP file 2. reloading of imported STEP files in freecad so that the object stays at the same position + rotation as before
(DIR) Post #B8AUZVcu2PaJXmgkOe by mntmn@mastodon.social
0 likes, 0 repeats
svg to step is basically just:```import sysfrom build123d import *with BuildPart() as p: extrude(import_svg(sys.argv[1]), amount = 1)export_step(p.part, sys.argv[2])```
(DIR) Post #B8AUkFHJA22K1fhuCW by dgrabla@mastodon.social
0 likes, 0 repeats
@mntmn this is very cool. Is the svg loaded as a sketch in freecad and then padded to make the part? How does freecad know the relative position of the svg shape on the 2d plane? It feels like it should not be constrained enough
(DIR) Post #B8AUvoY6MgUybO4wQC by mntmn@mastodon.social
0 likes, 0 repeats
reload STEP macro is also quite short. i put the STEP's path in the object's label (i'm sure there's a cleaner way).
(DIR) Post #B8AV0KLM60fqMwGiQa by mntmn@mastodon.social
0 likes, 0 repeats
@petrikas hmm, maybe my freecad is just not configured that way? there's a lot of settings for different/floating UI etc that i haven't explored yet. or do you have some screenshots of your work?
(DIR) Post #B8AVAklEjPDbCHLVSK by mntmn@mastodon.social
0 likes, 0 repeats
@dgrabla no, i make the extrusion to STEP with a very short build123d script. this was easier/lazier than doing all those steps in freecad scripting.and the position isn't relative, it just clones the previous position and rotation of the object it's replacing. so i'm importing the object manually once, move/rotate it to the right spot and from then on it will keep those coordinates.
(DIR) Post #B8AWTaS3NxusgAuxOa by dgrabla@mastodon.social
0 likes, 0 repeats
@mntmn honestly this is awesome and very creative out of the box thinking. it must be also delaying your work. the sketcher is worth learning, give mangojelly a chance
(DIR) Post #B8AX5XUuofJiWRLy2C by mntmn@mastodon.social
0 likes, 0 repeats
@dgrabla yeah i used the sketcher for a bunch of stuff, just not for these as i'm also lasercutting prototypes and that's an SVG workflow. and i need the step reloading mostly for all the other parts that were not modeled in freecad
(DIR) Post #B8AYpCBuSvHZiSnXdI by fullywoolly@mastodon.social
0 likes, 0 repeats
@mntmn wow that is really nice to know that's possible
(DIR) Post #B8Af5CFuao8cH5gPgG by dgrabla@mastodon.social
0 likes, 0 repeats
@mntmn gotcha, keep up with the good work!
(DIR) Post #B8CtzzXML8OH0djwBc by poleguy@mastodon.social
0 likes, 0 repeats
@mntmn I have been fighting #freecad in my day job to reimport a step from #kicad and just leave it in place. I've marked this thread to see if your solution also solves my problem. Brain fried after a long week, so can't think clearly about this now.But the problem is a common one, and I think when I looked for a solution people have been complaining about it for at least a decade. If only open source software could magically get developer funding that wouldn't expect ROI and ruin it.
(DIR) Post #B8CzgYSBPXU9EaQxPM by mntmn@mastodon.social
0 likes, 0 repeats
@poleguy yep, i have a solution for that. for mainly kicad->freecad, people told me that KiCAD StepUp plugin can do that, but last time i checked the UI was super clunky (that's a longer time ago though)