
Thu, 07/03/2008 - 13:51
Forums:
I have two surface/faces( 4 egdes each) which are sewed.
After sewing one edge is common to the new single surface topology.
Now the number of 'free' edges is 7.
If I have a topology shape, can I know number of 'free' edges ??
thanks
- PG
Thu, 07/03/2008 - 14:45
If your shape is a shell, consider using ShapeAnalysis_Shell. It has a function to return the free edges.
Otherwise, you can explore the edges in your geoemtry, recording the edges in a map as you go. On each edge, remove it from the map if it is already there. Anything left at the end is free.
Rob
Thu, 07/03/2008 - 15:11
You can try also the following :
ShapeAnalysis_FreeBounds Analyzer( yourShape );
TopoDS_Compound Closed = Analyzer.GetClosedWires();
TopoDS_Compound Open = Analyzer.GetOpenWires();
you can then explore the resulting compounds to get your free wires or edges.
Fotis
Tue, 07/08/2008 - 08:29
try to use this
...
Standard_Integer i, aNbE, aNbF, iCnt;
TopTools_IndexedDataMapOfShapeListOfShape aMEF;
//
TopExp::MapShapesAndAncestors(aS, TopAbs_EDGE, TopAbs_FACE, aMEF);
//
iCnt=0;// number of free edges
aNbE=aMEF.Extent();// number of all edges
for(i=1; i<=aNbE; ++i) {
const TopTools_ListOfShape& aLF=aMEF(i);
aNbF=aLF.Extent();// number of faces attached to the edge "i"
if (aNbF==1) {
++iCnt;
}
}
...
Tue, 07/08/2008 - 13:49
Prs3d_ShapeTool Tool(aShape);
for (Tool.InitCurve();Tool.MoreCurve();Tool.NextCurve())
{
const TopoDS_Edge& E = Tool.GetCurve();
Standard_Integer neighbour = Tool.Neighbours();
......
}