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

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
Forum
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 / Forum / Is the projection of a point on a surface inside the wire?

Forum

Is the projection of a point on a surface inside the wire?
Marc Duflot2010/03/11 13:56
Hello,

I am an OpenCASCADE newbie, impressed by its capabilities.

I need to find if the projection of a given point on a surface (read in an IGES file) is inside this surface wire (there is no hole). This is what I have so far:

gp_Pnt p (...);
TopoDS_Face face = ... ;
Handle_Geom_Surface surface = BRep_Tool::Surface(face);
GeomAPI_ProjectPointOnSurf projection (point, surface);
double u, v;
projection.Parameters(1, u, v); // assuming there is at least one projection
TopExp_Explorer exp;
for(exp.Init(face, TopAbs_WIRE); exp.More(); exp.Next())
{
TopoDS_Wire wire = TopoDS::Wire(exp.Current());
// How do I check if (u,v) is inside the wire?
}

I tried playing with surface->Bounds(u1,u2,v1,v2) and ShapeAnalysis::GetFaceUVBounds(face,u1,u2,v1,v2) but this is not sufficient since these are BOUNDS to the parameters. I can't tell for sure with these bounds that the projection is inside the wire.

Thank you for your help,
Marc
Lodyzhensky Evgeny Nicolaich2010/03/15 10:32
Dear Marc Duflot.

To classify 2D point aP2D(u,v) you may use the class IntTools_FClass2d.

Roman Lygin2010/03/15 10:38
Hmm, interesting.

Evgeny Nicolaich, why not BRepTopAdaptor_FClass2d? Always have used the latter until now. API's seem to be aligned. Are you aware of any advantages of IntTools_FClass2d ?

Thanks.
Roman
Marc Duflot2010/03/16 10:22
Thank you both for the hints.
 
 
Latest news
  • FAQ section updated
  • OPEN CASCADE Uses Intel ® Parallel Studio XE to Introduce Parallelism into SALOME SMESH Module
  • Open CASCADE Technology 6.5.2 is available for download!

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