Search found 2598 matches

by Chris_G
Wed Aug 02, 2017 2:36 pm
Forum: Python scripting and macros
Topic: Someone with good knowledge of spreadsheets?
Replies: 5
Views: 840

Re: Someone with good knowledge of spreadsheets?

You had an indentation problem when copy/pasting the example code : >>> total_area = total_area + element.Area The above line is supposed to be part of the for loop : total_area = total_area + element.Area Could you please try again with this example code : import FreeCADGui selection = FreeCADGui.S...
by Chris_G
Sun Jul 30, 2017 12:24 pm
Forum: Help on using FreeCAD
Topic: Curves workbench
Replies: 1839
Views: 443921

Re: Curves workbench

damn! are you sure? they look like curvatures of the iso along the surface normal. a curve comb would dance up and down wildly like my first picture above. i guess i have to take your word for it....but i'm still going to use them anyway! :lol: they look meaningful to me and they react the way i ex...
by Chris_G
Sun Jul 30, 2017 10:33 am
Forum: Help on using FreeCAD
Topic: Curves workbench
Replies: 1839
Views: 443921

Re: Curves workbench

Hi Chris, i just found out by accident that found out by accident that the Comb tool works on Surfaces, not just curves. this is really awesome! i have a little problem though. With curve, i can match the scales and the combs will 'click' together when the curve is G2. with the surfaces, even setti...
by Chris_G
Sat Jul 29, 2017 9:47 am
Forum: Open discussion
Topic: Deviation / Angular deflection need recompute ?
Replies: 2
Views: 786

Deviation / Angular deflection need recompute ?

Hi, Here is something that doesn't look very intuitive to me : Changing the values of the Deviation / Angular deflection of an object have different behaviours. - Lowering the deviation is applied instantly - increasing the deviation, or increasing / lowering the Angular deflection : We need to &quo...
by Chris_G
Wed Jul 26, 2017 3:03 pm
Forum: Help on using FreeCAD
Topic: Reference and For Construction Objects in 3D Viewer
Replies: 7
Views: 1635

Re: Reference and For Construction Objects in 3D Viewer

Hi Yorik,
OK. Thanks for the clarification.
by Chris_G
Tue Jul 25, 2017 2:35 pm
Forum: Help on using FreeCAD
Topic: Reference and For Construction Objects in 3D Viewer
Replies: 7
Views: 1635

Re: Reference and For Construction Objects in 3D Viewer

It seems to be possible : # create an object box = FreeCAD.ActiveDocument.addObject("Part::Box","Box") # recompute to create its viewObject FreeCAD.ActiveDocument.recompute() # get its coin rootnode rn=box.ViewObject.RootNode # delete the object from the document FreeCAD.ActiveDo...
by Chris_G
Tue Jul 25, 2017 6:41 am
Forum: Help on using FreeCAD
Topic: Reference and For Construction Objects in 3D Viewer
Replies: 7
Views: 1635

Re: Reference and For Construction Objects in 3D Viewer

Hi, You can do this by accessing directly the scenegraph of the 3D view, with coin library. Here is the most basic example : import FreeCADGui from pivy import coin # get the sceneGraph of the active view sg = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph() # create some coin objects cylinder =...
by Chris_G
Fri Jul 14, 2017 6:19 am
Forum: Python scripting and macros
Topic: What is the proper way to make a copy using a python macro?
Replies: 4
Views: 1236

Re: What is the proper way to make a copy using a python macro?

Edit2: Also, I should emphasize, if I type this code into the python console directly, it works fine. But if I try to run it as a Macro it fails. Hi, My bad. It worked in the python console, but not as macro. The chamfer operation needs a recompute to get a valid shape. So, here is a working macro ...
by Chris_G
Thu Jul 13, 2017 9:04 pm
Forum: Python scripting and macros
Topic: What is the proper way to make a copy using a python macro?
Replies: 4
Views: 1236

Re: What is the proper way to make a copy using a python macro?

Hi, I won't be able to explain the reason, but here is the copy part of the script that works : App.ActiveDocument.recompute() obj = App.ActiveDocument.addObject('Part::Feature','NewChamfer') App.ActiveDocument.recompute() obj.Shape=App.ActiveDocument.Chamfer.Shape App.ActiveDocument.ActiveObject.La...
by Chris_G
Sun Jul 09, 2017 11:58 am
Forum: Python scripting and macros
Topic: Scripting sweep on 3D path and control profile orientation
Replies: 3
Views: 1031

Re: Scripting sweep on 3D path and control profile orientation

Hi,
I think the makePipeShell tool can fit the bill.
Look here for a brief example : https://forum.freecadweb.org/viewtopic. ... 36#p168339