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

Open CASCADEShowroomGet Open CASCADEDeveloper CornerSupportAbout us
Technical overview
Areas of use
Advantages
Public license
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
System requirements
What's new
Download Center
CD-ROM
Documentation
Getting started
Forum
Open Source community
Training and e-learning
A la Carte Support
Value-added software
Client Area
Company Profile
Contacts and Locations
Customers
News
Home / Developer Corner / Forum / Find face with wire in a TopoDS_Shape

Forum

Find face with wire in a TopoDS_Shape
Matthias Teich 2008-05-09 13:15
Hi!

I am using BRepAlgoAPI_Section to find the section of 2 shapes.
Then I connect the edges to closed wires.

What I want to do now is to color the surface of the section.
I think I could use BRepBuilderAPI_MakeFace with a Geom_Surface and a wire.

My problem is how to find the face on which the wire is located.
I know that the wires are on a face in the shape, but the wires are no wires of the original shape, so I cant use TopExp_Explorer

Any suggestions?

Best Regards, Matthias
Stephane Routelous 2008-05-09 15:32
if you compute the pcurves in BRepAlgoAPI_Section ( ComputePCurveOn1 or On2 ), you can access the faces of the edges with the pcurves.

HTH,

Stephane
Christian Allgeier 2008-05-09 15:33
If I understand you correctly you want to find all the faces that are traversed by you wire that you get from BRepAlgoAPI_Section.
the solution should be:

BRepAlgoAPISection aSection (aShape1, aShape2);
TopoDS_Iterator its(aSecAlgo);
for (its; its.More(); its.Next()){
     const TopoDS_Edge& aEdge = TopoDS::Edge(its.Value());
     TopoDS_Face aFace;
     if (aSecAlgo.HasAncestorFaceOn1(aEdge, aFace)){
          //aFace should the Face you're looking for
}
}
Matthias Teich 2008-05-13 09:45
Thank you, that was a good hint!

Do you know if there is also an easy way to compute a shape from a number of faces and a wire lying on these faces?

Thank you & Best Regards,
Matthias
 
 
Latest news
  • Open CASCADE Technology 6.3
  • SolidWorks Import by Datakit
  • UG NX Import by Datakit

  • © Open CASCADE 2000 - 2008  |  Search  |  Contacts