Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / Not able to create a face from nonPlanar wire

Not able to create a face from nonPlanar wire

Not able to create a face from nonPlanar wire
Kishor Meshram 2013/05/08 18:28
I am creating a single connected wire from multiple trimmed face and tried to create face out of that the code snippet is as belows. (Note:- works fine for planar surfaces)

BRepBuilderAPI_MakeWire wire;

//Iterates through each face and adds the outer wire to the BRepBuilderAPI_MakeWire
while (trimmedFaceArray->MoveNext())
{
     ITrimmedFace^ trimmedFace= trimmedFaceArray->Current;
     TopoDS_Face face;

     trimmedFace->GetFace(face);

     TopoDS_Wire outerWire = ShapeAnalysis::OuterWire(face);

     wire.Add(outerWire);
}

//Created a single wire out of multiple outer wire
TopoDS_Wire aWire=wire.Wire();


//Creates the ordered and connected wire
TopoDS_Wire orderedWire= Ordered_ConnectedWire(aWire);


//Creates the face out of orderedWire
TopoDS_Face newFace= BRepBuilderAPI_MakeFace(orderedWire);

This works fine for the planar orderedWire,
but if its of nonPlanar orderedWire it is failing.
If someone worked on such scenario and has some solution, please help me out.
Kishor Meshram 2013/05/09 09:37
      I am attaching .iges file for reference having two trimmed faces
You have to be logged in to download the attached file
Kishor Meshram 2013/05/09 10:17
Ignore first attachment i have created a single wire out of multiple trimmed face iges
You have to be logged in to download the attached file
Kishor Meshram 2013/05/09 10:18
Wire created from multiple trimmed face not able to create face out of that but the wire seems to be ok. Could any one check whats the problem in the created orderedWire.brep.
You have to be logged in to download the attached file
Forum supervisor 2013/05/14 17:42
Dear Kishor,
Indeed the mentioned wire is OK (in terms of OCCT validity), but it doesn't mean that
it is planar (even visually it looks like planar).
As result the used by you algorithm can't create a face from a non planar wire.
I suggest you to use alternative API of the same class with Geom_Surface additional parameter .
Geom_Surface you can build using for example GeomFill_BSplineCurves class, which builds surface from set of b-spline curves.
Regards
Mark Blome 2013/05/14 18:30

Dear Kishor,

you might also consider using the BRepFill_Filling class.
I had a similar issue and was able to create faces for not-exactly-planar
wires with it.

Regards,
Mark
Kishor Meshram 2013/05/15 10:39
Thanks!!!
This is working fine to create a face from the BSplineCurves, But the limitation is, it can take only two, three or at max four curves.

I have created surface from the four curves and Initialize BRepBuilderAPI_MakeFace with that surface and Added Wire for the bound and created a face. It has created the errored face as in the attachment. Which still doesn't solved my problem.

You have to be logged in to download the attached file
Forum supervisor 2013/05/15 11:07
Dear Kishor,
You may try to play with input parameter 'FillingStyle from GeomFill'or try to make healing of the resulting shape.
At the same time if the problem is critical for you, you may contact us via the Contact Form http://www.opencascade.org/about/contacts/ and ask our professional support. We will try to find a solution/workaround acceptable for you.
Regards.
     
 
 
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map