[Solved] no filled face possible

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

[Solved] no filled face possible

Post by microelly2 »

I try to create a filled face from a closed BSpline curve.
I tested wit a single curve, with a splitted curve into 2 or 3 segments. But filled face does not work for me.

sh=Part.makeFilledFace(Part.sortEdges([sh.Edge1,sh.Edge2,sh.Edge3])[0])
Part.OCCError: Failed to created face by filling edges

creating a planar Face works.
Any ideas?
no_filled_face_possible.FCStd
(8.62 KiB) Downloaded 18 times
OS: Ubuntu 14.04.6 LTS (Unity/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18403 (Git) AppImage
Build type: Release
Branch: master
Hash: 0717b4fc23ef1db70964c3977d25e2fe46a739d1
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: no filled face possible

Post by openBrain »

It fails here the same way with the file you attached.
Notice this succeeds creating a face by using 2 times Draft/Upgrade on it. ;) But I guess this isn't what you intend. :)

Anyway, I can very simply create a filled face from a single closed BSpline.
On the attached example file, just run :

Code: Select all

App.ActiveDocument.addObject('Part::Feature').Shape = Part.makeFilledFace(App.ActiveDocument.BSpline.Shape.Edges)
HTH

---
OS: Ubuntu 18.04.3 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18645 (Git)
Build type: Unknown
Branch: master
Hash: 95f18a7507dec0a033e79764025f31d390832449
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
Attachments
bspline.FCStd
(4.55 KiB) Downloaded 13 times
User avatar
Chris_G
Veteran
Posts: 2602
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: no filled face possible

Post by Chris_G »

This works for me :

Code: Select all

doc1 = FreeCAD.getDocument('no_filled_face_possible')
o1 = doc1.getObject('ID_5488c410_6dbb_4d4b_a08c_dad9ce92519c')
sh = o1.Shape
w = Part.Wire(sh.Edges)
sh = Part.makeFace(w, 'Part::FaceMakerSimple')
sh.check() # ---> reports errors
sh.validate()
sh.check() # ---> seems to be fixed
Part.show(sh)
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: no filled face possible

Post by openBrain »

Chris_G wrote: Tue Nov 05, 2019 4:03 pm This works for me :

Code: Select all

w = Part.Wire(sh.Edges)
sh = Part.makeFace(w, 'Part::FaceMakerSimple')
If I'm correct, these 2 lines are exactly what 2 successive Draft/Upgrade do. ;)
freecad-heini-1
Veteran
Posts: 7791
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: no filled face possible

Post by freecad-heini-1 »

microelly2 wrote: Tue Nov 05, 2019 2:53 pm I try to create a filled face from a closed BSpline curve.
I tested wit a single curve, with a splitted curve into 2 or 3 segments. But filled face does not work for me.

sh=Part.makeFilledFace(Part.sortEdges([sh.Edge1,sh.Edge2,sh.Edge3])[0])
Part.OCCError: Failed to created face by filling edges

creating a planar Face works.
Any ideas?

no_filled_face_possible.FCStd

OS: Ubuntu 14.04.6 LTS (Unity/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18403 (Git) AppImage
Build type: Release
Branch: master
Hash: 0717b4fc23ef1db70964c3977d25e2fe46a739d1
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Hi Thomas,
please try OpenSCAD-Workbench Convert Edges to Faces .
Best regards
Wilfried
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: no filled face possible

Post by microelly2 »

Thank you all for the feedback.
For my first file the edges all belong to a plane. so Part.Face works here,
But in general I have to handle nonplanar curves
the workarounds, Draft upgrade, Openscad method all do no work because they use Part.Face.

here I have the nonplanar version.
working with line segments works but working with bspline doesnt work.
But I need a filledFace version which works on any closed edge list.
no_filled_face_possible_nonplanar.FCStd
(28.81 KiB) Downloaded 15 times
User avatar
hammax
Veteran
Posts: 1995
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: no filled face possible

Post by hammax »

… using in CurvesWB the combined_projection_curve to generate 3D BSplines with SketcherWB,
you are able to create a filled 3D-Surface - but it is not parametric when modifying sketches.

FilledFace.PNG
FilledFace.PNG (38.21 KiB) Viewed 622 times
Attachments
no_filled_face_possible_2.FCStd
(55.71 KiB) Downloaded 11 times
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: no filled face possible

Post by microelly2 »

hammax wrote: Wed Nov 06, 2019 1:25 pm … using in CurvesWB the combined_projection_curve to generate 3D BSplines with SketcherWB,
you are able to create a filled 3D-Surface - but it is not parametric when modifying sketches.
My workflow is:
create a closed curve from a selection of given curves
than create a filled face on it.
https://youtu.be/2LGHjrvnRuU

Meantime I worked with surface workbench. the result is still not nice but it works.
cp_052.png
cp_052.png (182.49 KiB) Viewed 607 times
In a next step I will smooth the generated surface
Edit:
the other workaround is to split the curve into two segments and create a ruled surface
cp_054.png
cp_054.png (26.93 KiB) Viewed 601 times
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: [Solved] no filled face possible

Post by microelly2 »

https://youtu.be/Q_odR-_Yhqc
the final trick was to work with all edges an helper edges as bsplines instead of a single big spline.
Post Reply