It' missing for now, but what you can do in the meantime is produce a separate solid and do a boolean cut from the Part workbench.jjsca wrote:- negative revolution
I'd say it's a whole lot better than what I was able to do! I'm really Python-challenged... Would you care to share your modified macro?jjsca wrote:I only managed to modify the sweep macro to tranform it into a negative sweep tool.
It is possible to create a parametrized script. There are a few sample scripts installed with FreeCAD. In Linux they're in /usr/lib/freecad/Mod/PartDesign/Scripts. The Spring.py script creates a parametric spring. You can modify its parameters in the Property box. There's a way to execute the script from the python console but I never remember how. I just copy them to my macros folder for convenience.jjsca wrote:And I noticed that unfortunately this macros doesn't produce parametric tools (is there a way to keep the sketches as parameters for the sweep ? and I also wondered is there a way to display tools options in the task panel instead of a dialog?).
Yes and no. The wiki lists the existing APIs, but it's not easy for a guy like me to understand. Have you looked at these links?jjsca wrote:Is there a page where the entire Part (for exeample Part.Solid, Part.Wire... methodes) api is described easily (to know precisely the structure (linking properly objects with shapes and) to use to make a good macro)?
Yeah there are none so far, there's one installed with FreeCAD though (modified from the A3 one). More are of course welcome! To post them on the site is easy, but you need wiki edit rights, which you'll get in no time if you ask.jjsca wrote:I saw that in the drawing templates repository there were no A4 templates, I'll see if I've got the time this weekend to submit one or two of these if I get to understand how to post them on the site
No problem here's the thing, but well I am not satisfied of the code (wich is not very different from the sweep macro), I'l keep on studying the scripting pages, I ll se if I manage get something parametric (by the way I looked for the Spring.py file, but I dont find it on freecad directory do you have the source of it , it might help...). I did try to get information from the API pages but as you said these are not really easy to deal with for non-programmers or beginners like me.I'd say it's a whole lot better than what I was able to do! I'm really Python-challenged... Would you care to share your modified macro?
Code: Select all
import Part, FreeCAD, math, PartGui, FreeCADGui from FreeCAD import Base s = FreeCADGui.Selection.getSelection() i = 0 try: shape1=s.Shape shape2=s.Shape shape3=s.Shape except: print('Wrong selection') i = 1 try: traj=Part.Wire(shape1) section=Part.Wire(shape2) objectToDig=Part.Solid(shape3) except: print('Wrong selection') i = 1 if i ==0: myObject=App.ActiveDocument.addObject("Part::Feature","Channel") makeSolid=1 isFrenet=1 Sweep=Part.Wire(traj).makePipeShell([section], makeSolid,isFrenet) channel=objectToDig.cut(Sweep) myObject.Shape=channel
Well the point is that default freecad tools use the task panel and I wonder if there is a way to use it for macros too, but I did not find any issue about that. It would unify the way to use and program tools and macros in freecad, typically for the macro above, I would allow the user to select one object at the time and so there are less chances that the path gets extruded around the section and so on..I don't understand your third question. What tool options are you talking about? PartDesign tools already use the task panel.
That might also be possible. You will find a simple task panel example here: http://free-cad.git.sourceforge.net/git ... d441bb3d92Well the point is that default freecad tools use the task panel and I wonder if there is a way to use it for macros too,
Also here(where do I have to ask for wiki edit rights ?)
The drawing displays correctly but the editing doesn't work as is. When replacing "freecad:EditableText" with "freecad:editable" then it works fine for me.If anyone could give me a small feedback if the template is displayed correctely and if editable text works, it would be nice.
Do you mean they look blocky? If so you can change the display accuracy in the Edit --> Preferences menu, Part Design, "Shape View" tab. Change the value for the "Maximum deviation..." setting. I think default is 0,1000%, you can try 0,0500% and see if it improves.jjsca wrote:It has a few display bugs with spheres and smoothed objects
FYI, jriegel published a v0.13 unstable installer, if you want to check it out for yourself. I'm not sure but I think on Windows two different versions of FreeCAD can cohabit.jjsca wrote: I just added editable texts and those are not supported by my 0.12 version.
Well if you want I splitted the different elements into different files to make files easily and very fast, If you confirm me the dimensions (8.5 by 11 inches or 215.9 by 279.4 mm), I'll make one in US letter format too, it takes me about 3 minutes so if it saves time to you... Just in case do you also use normalised borders (like for example 10mm margins for 3 borders and 20mm for the last margin)?normandc wrote:I like your A4 portrait template, I think I'll do an A version of it (US letter).
Not quite actually, it does not seem to be the display precision that is too low, it is rather some sort of profile or polygonal faces rendering on the rounded surfaces like spheres, I woul describe it as artefacts. It is hard to explain it without an image (I still didn't find out if we can post images and how, when I attach .jpg or png files it returns me errors ) I joined examples as attached files, maybe I should write a bug report ?normandc wrote: Do you mean they look blocky? If so you can change the display accuracy in the Edit --> Preferences menu, Part Design, "Shape View" tab. Change the value for the "Maximum deviation..." setting. I think default is 0,1000%, you can try 0,0500% and see if it improves.
That would be great. Yes, exactly those dimensions. I honestly don't remember any normalized borders, possibly ANSI have specs on that, but I don't know them (they don't publish their standards freely). Why 20mm for the last, is that a long side, and would that be to punch holes to put in a binder?jjsca wrote:If you confirm me the dimensions (8.5 by 11 inches or 215.9 by 279.4 mm), I'll make one in US letter format too, it takes me about 3 minutes so if it saves time to you... Just in case do you also use normalised borders (like for example 10mm margins for 3 borders and 20mm for the last margin)?
The forum used to accept jpegs and it was the only image format accepted, but a bug's been preventing that from working for a few months now. The FreeCAD guys have no control over this unfortunately, it's up to SourceForge to fix this, and it seems they don't have a good track record at fixing these things! (Just look at the footer, it says ©2007 which means the forum engine hasn't been updated in 5 years!) You can use a free image hosting service, I recently discovered imagur, it's pretty simple and you don't have to register.jjsca wrote:I still didn't find out if we can post images and how, when I attach .jpg or png files it returns me errors
Wow, freecad is impressive! I would like to add to jjsca's list a little bit. A box of tools that would make the design of mechanical assemblies and parts quick, intuitive, accurate, and easy would probably also contain the following:jjsca wrote: I think that freecad could become even more interesting with some "basic" tools added. During my CAD experience, I almost always used the same set of tools:
- extrusion (already included in freecad)
- negative extrusion (pocket tool, same as above)
- revolution aroud an axis (read that the axis what going to be implemented )
- negative revolution (a tool that makes a sketch revolve around an axis, typically to make a conic hole)
- extrude along path (like the sweep macro)
- negative sweep
- hole tool (makes normalized holes for mechanical engineering)
- shell tool (digs the part so that only a given thickness remains)
- outer threads for revolution parts (to make special screws)
- circular and rectangular repetition of an object (action, like holes or pockets or even rectangular repetition themselves...)
About the threads, I think the best compormise beetween ergonomy and graphic performance is the way Inventor deals with threads (http://grabcad.com/library/asme-b18-screw, like a simple texture). It is not very beatiful but it is really helpful for understanding. It is also very important to have all the normalized pitches (metric, trapezoid, round and of course the ones in inches for people who work with such units). I already gave a thought to that and it might be interesting to store all these informations outer diameter, pitch and so on of the different treads in a file this would allow people to add new threads if they need to.jcgrillo wrote: thread tool: library of standard thread pitches, including the diameters of bolts inner and outer, possibly coupled to hole tool. Option to NOT render threads, but indicate them in some sort of a 2D fashion (less graphics-intensive). Tool to cut the part to the appropriate dimensions, generate the threads.