Faces wires are open?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Faces wires are open?

Post by yorik »

It looks like sometimes wires around faces are open... For example make a parametric part cube, and look at each of its wires, isClosed() returns false. The same goes for some other objects such as booleans. If you make a face specifically out of a closed wire then its wire is closed. Werner if you have a second, can you check? I'm not sure if its something we have control upon, or an OCC bug...
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Faces wires are open?

Post by wmayer »

I have no idea why this happens. For me it seems to be a OCC bug. For me it happens when creating a parametric and non-parametric box. Is it the same for your?
import Part
box=Part.makeBox(10,10,10)
for i in box.Wires:
print i.isClosed()
The funny thing is when I do

Code: Select all

w=Part.Wire(i.Edges)
w.isClosed() # returns true
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Faces wires are open?

Post by yorik »

Yes, that's very curious... It seems the only way to obtain a closed wire around a face is to specifically make it from a closed wire
I'll have a look if this is the case too in pythonOCC, so we know its in OCC itself...
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Faces wires are open?

Post by wmayer »

This is a very simple example which also says that the wires are open.

Code: Select all

        BRepPrimAPI_MakeBox mkBox(10,10,10);
        TopoDS_Shape box = mkBox.Shape();
        TopExp_Explorer xp(box,TopAbs_WIRE);
        while (xp.More())
        {
            Standard_Boolean closed = xp.Current().Closed();
            closed = BRep_Tool::IsClosed(xp.Current());
            xp.Next();
        }
So, it must be an OCC thing.
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Faces wires are open?

Post by yorik »

Yes it gives the same result in pythonOCC too...
There is no bug tracker in OCC :( but I'll post something on the forum...
Post Reply