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

Open CASCADEShowroomGet it!Developer CornerSupportAbout 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
CD-ROM
Company Profile
Contacts and Locations
Customers
News
Home / Developer Corner / Forum / Get Point on Curve/Wire by Length

Forum

Get Point on Curve/Wire by Length
Stefan Kunze2009/06/30 15:49
... as the subject says I want to get a point on a wire by length - tried everything but I see no way to do so. Using the parametric values also doesn´t help... someone an idea???
Thanks - Stefan
Fotis Sioutis2009/06/30 16:04
BRepAdaptor_CompCurve is the solution.See code below :

BRepAdaptor_CompCurve aCompoundCurve(TopoDS::Wire(aRailSh), Standard_True);
"then"
aCompoundCurve.D0( parm, aPnt );

should give the point in space.

Fotis
Stephane Routelous2009/06/30 16:12
I had problems with doing it like that
I had to do my own "BRepAdaptor_CompCurve" and using recursive code to have a correct result, as using the code as you mentionned was producing a point at a bad distance (accuracy issue).

Stephane
Stefan Kunze2009/06/30 16:14
Ahhhh.... and I thought it´s something "easy".
Stephane Routelous2009/06/30 16:18
well, it's supposed to be easy..
the "easy" way is to use GCPnts_AbscissaPoint
but as i said, it gave me incorrect results. you can still test with your wires/curves to see if it works for you.

Stephane
Stefan Kunze2009/06/30 16:36
Hmmm... yeah the problem is that I have to use the length to find the point... (it´s some kind of strange transformation and it will only work correct when I take the length). Finding a point by length doesn´t seems to be supported. And an recursive alg. could be very time consuming.
damn....
Stephane Routelous2009/06/30 16:45
> And an recursive alg. could be very time consuming.
no it's quite fast (at least fast enough for my cases)

Stéphane
Stefan Kunze2009/06/30 17:05
yeah... u say the algorithm is quite good. Can I see it. ;)
Stefan Kunze2009/06/30 17:12
Ok.... it took me some time to check out what the second parameter means... thanks i will give it a try!!!
 
 
Latest news
  • Open CASCADE Technology: Ten Years in Open Source
  • Principia - AvPro Success Story
  • AREVA NP - Charm Success Story

  • © Open CASCADE 2000 - 2010  |  Search  |  Contacts