MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025774Community[OCCT] OCCT:Modeling Datapublic2015-01-30 18:422015-01-30 19:58
Reporterspamkiller 
Assigned Tomsv 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformWindowsOSVC++ 2013OS Version64 bit
Product Version[OCCT] 6.8.0 
Target VersionFixed in Version 
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
Attached Files

- Relationships

-  Notes
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


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker