fail to create a face from wire

hi everyone.

i try to create a face from wire which consists of 4 edges as below.
but fail to create a face.

[edges]
x=2713.2429999999999 y=2463.0999999999999 z=100.00000000000000
x=2712.6430000000000 y=2462.5000000000000 z=99.600000000000009

x=2712.6430000000000 y=2462.5000000000000 z=99.600000000000009
x=2695.6536500000002 y=2462.5000000000000 z=99.579999999999998

x=2695.6536500000002 y=2462.5000000000000 z=99.579999999999998
x=2695.6536500000002 y=2463.1500000000001 z=100.00000000000000

x=2695.6536500000002 y=2463.1500000000001 z=100.00000000000000
x=2713.2429999999999 y=2463.0999999999999 z=100.00000000000000

aPrismVec is
[code]
BRepBuilderAPI_MakeFace aMakeFace(aStartMakeWire.Wire() , Standard_True);
aMakeFace.Build();
if(aMakeFace.IsDone())
{
TopoDS_Face aFaceProfile = aMakeFace.Face();
pCmplxShapeEnt->m_hShape = BRepPrimAPI_MakePrism(aFaceProfile , aPrismVec);
}

BTW, what is planar wire?

thanks for any help

Forum supervisor's picture

Dear BAEK,
The problem is not reproduced: face is created successfully.
Draw reproducer:
pload MODELING
vertex v1 2713.2429999999999 2463.0999999999999 100.00000000000000
vertex v2 2712.6430000000000 2462.5000000000000 99.600000000000009
vertex v3 2695.6536500000002 2462.5000000000000 99.579999999999998
vertex v4 2695.6536500000002 2463.1500000000001 100.00000000000000
edge e1 v1 v2
edge e2 v2 v3
edge e3 v3 v4
edge e4 v4 v1
wire w1 e1 e2 e3 e4
mkplane face1 w1 1
See the created face in attachment.
Regards

Attachments: 
zbaekhk's picture

thanks for your reply.

but i have still problem.

i have uploaded my source code, please take look at if you have chance..

source : http://www.solutionware.co.kr/2011.12.13.zip
test file : Error1.dgn( it is in zip file)
break point : TestView\SmartNozzleCheckDoc.cpp at 480

thanks

Forum supervisor's picture

Dear BAEK,
You can easy test it by yourself using the mentioned above
Draw command - , which calls exactly the same API as
you reported (BRepBuilderAPI_MakeFace (wire, true)).
For that you need just to keep the built wire in an external file of the .brep format.
If the problem is critical for you, you may contact us via the Contact Form http://www.opencascade.org/about/contacts/.
We will try to find a solution/workaround acceptable for you.
Regards

zbaekhk's picture

thanks for your reply.

it's problem why tolerance.
it's ok when tolerance is 0.420042001050002 which comes from your brep file.
but it's fail when tolerance is 0.00001

how can i calculate proper tolerance?

[code - ok]
double myTolerance = 0.420042001050002; // vary this

// create a tolerance object
ShapeFix_ShapeTolerance FTol;
// get the wide
TopoDS_Wire aWire = aStartMakeWire.Wire();
// set the tolerance for this shape.
FTol.SetTolerance(aWire , myTolerance ,TopAbs_WIRE);

error brep file is attached.

thanks,

Attachments: