FaceBinder: What is meant by the Sew property?

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
Roy_043
Veteran
Posts: 8540
Joined: Thu Dec 27, 2018 12:28 pm

FaceBinder: What is meant by the Sew property?

Post by Roy_043 »

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

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

Post by wmayer »

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
User avatar
Roy_043
Veteran
Posts: 8540
Joined: Thu Dec 27, 2018 12:28 pm

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

Post by Roy_043 »

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
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

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

Post by NormandC »

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
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

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

Post by wmayer »

I fixed the code to explicitly import Part.
arnn
Posts: 24
Joined: Fri Feb 21, 2020 7:39 am

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

Post by arnn »

Roy_043 wrote: 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?
Trying to understand the Sew & Remove Splitter, Do you have more links/understanding on this.
Many thanks.
User avatar
Roy_043
Veteran
Posts: 8540
Joined: Thu Dec 27, 2018 12:28 pm

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

Post by Roy_043 »

Sew:
I still do not understand 'Sew'. A facebinder is already a shell by default, and not a compound, it seems:

Code: Select all

>>> fb = App.ActiveDocument.Facebinder
>>> fb.Shape.ShapeType
'Shell'

Remove Splitter:
In the attached example faces from two stacked boxes were used as the source for two facebinders. The FB on the right has 'Remove Splitter' set to 'True'.
Attachments
facebinder-remove-splitter.png
facebinder-remove-splitter.png (3.52 KiB) Viewed 2102 times
facebinder-remove-splitter.FCStd
(10.97 KiB) Downloaded 45 times
Post Reply