FaceBinder: What is meant by the Sew property?

Post here for help on using FreeCAD's graphical user interface (GUI).
Roy_043
Posts: 151
Joined: Thu Dec 27, 2018 12:28 pm

FaceBinder: What is meant by the Sew property?

Postby Roy_043 » Sun Jan 20, 2019 6:34 pm

I do not understand what is meant by the Sew property of a FaceBinder. Changing it seems to have no effect?
wmayer
Site Admin
Posts: 13908
Joined: Thu Feb 19, 2009 10:32 am

Re: FaceBinder: What is meant by the Sew property?

Postby wmayer » Sun Jan 20, 2019 6:57 pm

If there are e.g. two faces inside a compound that visually share an edge then in the topology there are still two edges. The sew operation changes the topology to share sub-shapes where needed. The operation may also result in changing the shape type.

Example code:

Code: Select all

import FreeCAD
import Part

f1=Part.makePlane(10,10,FreeCAD.Vector(0,0,0))
f2=Part.makePlane(10,10,FreeCAD.Vector(10,0,0))
shape=Part.Compound([f1,f2])
shape.ShapeType
#Compound
len(shape.Edges)
#8

shape.sewShape()
shape.ShapeType
#Shell
len(shape.Edges)
#7
Roy_043
Posts: 151
Joined: Thu Dec 27, 2018 12:28 pm

Re: FaceBinder: What is meant by the Sew property?

Postby Roy_043 » Sun Jan 20, 2019 9:44 pm

Thanks for your explanation. I think I understand on a theoretical level, but would there be a FaceBinder example where this would have a visible effect?
User avatar
NormandC
Posts: 18434
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FaceBinder: What is meant by the Sew property?

Postby NormandC » Mon Jan 21, 2019 12:13 am

wmayer wrote:
Sun Jan 20, 2019 6:57 pm
Example code:
Being an absolute neophyte at Python, I can't get this to work. I tried adding

Code: Select all

from FreeCAD import Part
from FreeCAD import Base
I still get errors that FreeCAD.Part has no attribute 'makePlane' nor 'Compound'.

Edit: nevermind, I loaded the Part workbench and this fixed it. :oops:
wmayer
Site Admin
Posts: 13908
Joined: Thu Feb 19, 2009 10:32 am

Re: FaceBinder: What is meant by the Sew property?

Postby wmayer » Mon Jan 21, 2019 9:34 am

I fixed the code to explicitly import Part.