View Issue Details

IDProjectCategoryView StatusLast Update
0025774CommunityOCCT:Modeling Datapublic2015-01-30 19:58
Reporterspamkiller Assigned Tomsv 
PrioritynormalSeverityminor 
Status newResolutionopen 
PlatformWindowsOSVC++ 2013 
Product Version6.8.0 
Summary0025774: GCPnts_AbscissaPoint does not work with several bezier curves
DescriptionI want to distribute points along a bezier curve using GCPnts_AbscissaPoint. But for some curves this does not work.

If you set "offset" to "0.0", only the first point is calculated and displayed (not OK). If you set "offset" to "1.0", all points are calculated and displayed (OK).

For cubic bezier curves it should be possible to set the first two poles to the same point, the same should be possible for the last two poles.
Steps To Reproduce---snip---
double offset = 0.0;
TColgp_Array1OfPnt poles(1, 4);
poles.SetValue(1, gp_Pnt(0 , 0, 500));
poles.SetValue(2, gp_Pnt(0 + offset, 0, 500));
poles.SetValue(3, gp_Pnt(50.0 - offset, 0, 500));
poles.SetValue(4, gp_Pnt(50 , 0, 500));
Handle(Geom_BezierCurve) curve = new Geom_BezierCurve(poles);
TopoDS_Edge edge = BRepBuilderAPI_MakeEdge(curve);
display(edge);

GeomAdaptor_Curve curveAdaptor(curve);
const double u0 = curve->FirstParameter();
const double un = curve->LastParameter();
const double curveLength = GCPnts_AbscissaPoint::Length(curveAdaptor, u0, un);
const double abscissaStep = 1.0;
double abscissa = 0.0;
double ui = u0;
while (abscissa <= curveLength)
{
     GCPnts_AbscissaPoint ap(curveAdaptor, abscissa, u0, ui);
     ui = ap.Parameter();
     const gp_Pnt & pnt = curveAdaptor.Value(ui);

     display(pnt);

     abscissa += abscissaStep;
}
---snap---
("display" displays an entity in my view)
Additional information
and documentation updates
http://www.opencascade.org/org/forum/thread_26825/?forum=3
TagsNo tags attached.
Test case number

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2015-01-30 18:42 spamkiller New Issue
2015-01-30 18:42 spamkiller Assigned To => msv