Search found 1579 matches

Go to advanced search

by Chris_G
Sun Jan 24, 2021 9:16 am
Forum: Forum français
Topic: [Tuto] Appliquer une esquisse (sketch) à problèmes sur une surface arrondie.
Replies: 23
Views: 664

Re: [Tuto] Appliquer une esquisse (sketch) à problèmes sur une surface arrondie.

erreur : <class 'AttributeError'>: 'Sketcher.SketchObject' object has no attribute 'getConstruction' Bizarre non ? Drôle de façon de renvoyer un msg d'erreur ? ... Questions : 0 - ne mettez pas à jour Curves ! 1 - cette ligne fautive 'cons = obj.Sketch.getConstruction(i)' apparaît-elle dans votre v...
by Chris_G
Sun Jan 24, 2021 8:29 am
Forum: Python scripting and macros
Topic: [Help] Goal seek macro
Replies: 18
Views: 411

Re: [Help] Goal seek macro

Scipy is awesome, definitely the right way. You can even tell it to respect bounds on the parameters (i.e max and min value) by changing method to e.g "L-BFGS-B" and setting the bounds parameter to a list of (min, max) tuples. Thanks. I was interested with parameters bounds, but get lost by all ava...
by Chris_G
Sat Jan 23, 2021 9:30 am
Forum: Python scripting and macros
Topic: [Help] Goal seek macro
Replies: 18
Views: 411

Re: [Help] Goal seek macro

If you can install python.scipy, this little script seems to work : import FreeCAD from scipy.optimize import minimize doc1 = FreeCAD.getDocument('GoalSeekTest001') o1 = doc1.getObject('dd') o2 = doc1.getObject('dd001') def compute(value): o1.ddParameter = value[0] doc1.recompute() return abs(o2.ddG...
by Chris_G
Sat Jan 23, 2021 9:09 am
Forum: Python scripting and macros
Topic: [Help] Goal seek macro
Replies: 18
Views: 411

Re: [Help] Goal seek macro

I discovered scipy python package recently.
There is an optimization tool that can do that, even with multiple variables.
My math knowledge is a bit low to fully understand this tool, but I used it successfully to compute minimal curvature for CurvesWB BlendCurve.
by Chris_G
Fri Jan 22, 2021 9:36 am
Forum: Help on using FreeCAD
Topic: Missing info about Part's new "Make face from wires feature"
Replies: 5
Views: 151

Re: Missing info about Part's new "Make face from wires feature"

This one is parametric, while Shape builder isn't.
by Chris_G
Thu Jan 21, 2021 6:08 pm
Forum: Developers corner
Topic: Extension Manager
Replies: 51
Views: 3077

Re: Extension Manager

Hi, This extension manager is great ! I have added a manifest.ini file to Curves WB. One bug I have : if I close ExtMan window tab, switch to another WB, then activate back ExtMan WB, I only get an empty window tab. OS: Manjaro Linux (KDE//usr/share/xsessions/plasma) Word size of OS: 64-bit Word siz...
by Chris_G
Thu Jan 21, 2021 8:05 am
Forum: Python scripting and macros
Topic: Loft of two sections
Replies: 18
Views: 389

Re: Loft of two sections

Not sure why the sortedges is required In your case, it is not. It is just my habit to use it everytime I build a wire. To create the required loft object for pushing back on the parsing stack I ended up coding loftShape = Part.makeLoft([wire1,wire2]) myloft = doc.addObject('Part::Loft',p[1]) mylof...
by Chris_G
Thu Jan 21, 2021 6:06 am
Forum: Python scripting and macros
Topic: Loft of two sections
Replies: 18
Views: 389

Re: Loft of two sections

Oh, indeed, sortEdges returns a list of lists. So this should be : sect1 = obj1.Shape.section(plane1) # this is a compound of edges wire1 = Part.Wire(Part.sortEdges(sect1.Edges)[0]) sect2 = obj2.Shape.section(plane2) # this is a compound of edges wire2 = Part.Wire(Part.sortEdges(sect2.Edges)) loft_s...
by Chris_G
Wed Jan 20, 2021 10:15 pm
Forum: Python scripting and macros
Topic: Loft of two sections
Replies: 18
Views: 389

Re: Loft of two sections

Or, if you don't wish to add the sections to the document : sect1 = obj1.Shape.section(plane1) # this is a compound of edges wire1 = Part.Wire(Part.sortEdges(sect1.Edges)) sect2 = obj2.Shape.section(plane2) # this is a compound of edges wire2 = Part.Wire(Part.sortEdges(sect2.Edges)) loft_shape = Par...
by Chris_G
Wed Jan 20, 2021 10:01 pm
Forum: Python scripting and macros
Topic: Loft of two sections
Replies: 18
Views: 389

Re: Loft of two sections

I have two Objects and I have created two planes that intersect the two objects. I have created two sections with Object.Shape.section(Plane) But it will not allow me to use these to create a loft as it seems it does not support such things as inputs to a loft. I get the following error File "/User...

Go to advanced search