Search found 1042 matches

Go to advanced search

by onekk
Tue Aug 03, 2021 11:13 am
Forum: Python scripting and macros
Topic: How do I make a solid from a B-Spline surface?
Replies: 13
Views: 593

Re: How do I make a solid from a B-Spline surface?

shell = Part.makeShell([bot_face, alt_surf, top_face, cl_surf]) solid = Part.makeSolid(shell) show_curve(solid, "final_solid") DOC.recompute() This seems to work as the part "check geometry" is telling is a valid solid. This is the final code with some polishing around # ----cod...
by onekk
Tue Aug 03, 2021 11:00 am
Forum: Python scripting and macros
Topic: How do I make a solid from a B-Spline surface?
Replies: 13
Views: 593

Re: How do I make a solid from a B-Spline surface?

This code added at the bottom of the code in previous post, will create the missing face: # sections[0] is the bottom face sec1_sp = sections[0].StartPoint sec1_ep = sections[0].EndPoint # sections[-1] is the top face sec2_sp = sections[-1].StartPoint sec2_ep = sections[-1].EndPoint for edge in alt_...
by onekk
Tue Aug 03, 2021 8:54 am
Forum: Open discussion
Topic: where do you see FreeCAD main focus go towards?
Replies: 59
Views: 2660

Re: where do you see FreeCAD main focus go towards?

For Curves related development is the lack of a Part::BezierSpline ( Or equivlant ) holding things back ( Same goes for Part::Surface) I just created a 'Freehand_BSpline' in the curves workbench. Using the test file you posted and for : obj = App.getDocument("SampleCurves").getObject(&quo...
by onekk
Tue Aug 03, 2021 8:30 am
Forum: Python scripting and macros
Topic: How do I make a solid from a B-Spline surface?
Replies: 13
Views: 593

Re: How do I make a solid from a B-Spline surface?

Thos code will obtain the three surfaces, the top has to be reversed to be correct as the normal has to point downward. sections = [] def close_spline(sec): sec_sp = sec.StartPoint sec_ep = sec.EndPoint c_ln = Part.LineSegment(sec_ep, sec_sp) edges = Part.sortEdges([c_ln.toShape(), sec.toShape()])[0...
by onekk
Tue Aug 03, 2021 8:24 am
Forum: Python scripting and macros
Topic: How do I make a solid from a B-Spline surface?
Replies: 13
Views: 593

Re: How do I make a solid from a B-Spline surface?

The problem with this approach is, that my real life case is a bit more complicated and I cannot use a loft. ... But it strikes me a bit complicated and I wonder, if there isn't a way, to fill a 3d curve with a surface (other CAD packages have something called ‘Boundary Surface’ or ‘Filled Surface’...
by onekk
Mon Aug 02, 2021 6:32 pm
Forum: Python scripting and macros
Topic: How do I make a solid from a B-Spline surface?
Replies: 13
Views: 593

Re: How do I make a solid from a B-Spline surface?

This code will be more polished and permit to try the two alternatives, see: bs1.exchangeUV() that will reverse the BSplineSurface, but is working only on open curves, closing them it make FreeCAD crash. sections = [] secs_open = True if secs_open == True: for line in array: sec = Part.BSplineCurve(...
by onekk
Mon Aug 02, 2021 6:23 pm
Forum: Python scripting and macros
Topic: How do I make a solid from a B-Spline surface?
Replies: 13
Views: 593

Re: How do I make a solid from a B-Spline surface?

I have tried many ways, but there are some quirks,
EDIT: see next post
Regards

Carlo D.
by onekk
Mon Aug 02, 2021 6:17 pm
Forum: Open discussion
Topic: where do you see FreeCAD main focus go towards?
Replies: 59
Views: 2660

Re: where do you see FreeCAD main focus go towards?

From my point of view, if FreeCAD is able to do things, like BSplineSurfaces, it would be better to make two or three "working examples" that illustrate the current "state of the art". I'm struggling to close a solid, made from shell created using BSplineSurfaces, but: The surfac...
by onekk
Mon Aug 02, 2021 3:42 pm
Forum: Python scripting and macros
Topic: How do I make a solid from a B-Spline surface?
Replies: 13
Views: 593

Re: How do I make a solid from a B-Spline surface?

Some FreeCAD python code to start: import FreeCAD import Part import math from FreeCAD import Vector, Rotation DOC_NAME = "surface_test" FreeCAD.newDocument(DOC_NAME) FreeCAD.setActiveDocument(DOC_NAME) DOC = FreeCAD.activeDocument() VIEW = FreeCAD.Gui.ActiveDocument.ActiveView def show_po...
by onekk
Mon Aug 02, 2021 3:02 pm
Forum: Open discussion
Topic: MOOC Workbench create tutorial in GUI
Replies: 15
Views: 722

Re: MOOC Workbench create tutorial in GUI

Good point. A different color might be hard to distinguish–maybe a different shape? Yes, my concern is that a "different shape" would hide some UI elements, in particular when you are selecting objects, but a different arrow would be a solution, maybe an arrow with some little symbol supe...

Go to advanced search