[cgma-dev] Create spline curve bug
Boyd Tidwell
bktidwell373 at gmail.com
Mon Jan 9 14:29:17 CST 2012
Jane,
After applying your changes I now get an exception raised. Here is
the detail,
In OCCModifyEngine.cpp, my line 426 (Curve* OCCModifyEngine::make_Curve)
//make curve according to the curve type.
if(curve_type == SPLINE_CURVE_TYPE)
{
GeomAPI_Interpolate spline(points, CUBIT_FALSE, TOL); <-- this call
which calls:
In GeomAPI_Interpolate.cxx:
GeomAPI_Interpolate::GeomAPI_Interpolate
(const Handle_TColgp_HArray1OfPnt& PointsPtr,
const Standard_Boolean PeriodicFlag,
const Standard_Real Tolerance) :
myTolerance(Tolerance),
myPoints(PointsPtr),
myIsDone(Standard_False),
myPeriodic(PeriodicFlag),
myTangentRequest(Standard_False)
{
Standard_Integer ii ;
Standard_Boolean result =
CheckPoints(PointsPtr->Array1(),
Tolerance) ;
myTangents =
new TColgp_HArray1OfVec(myPoints->Lower(),
myPoints->Upper()) ;
myTangentFlags =
new TColStd_HArray1OfBoolean(myPoints->Lower(),
myPoints->Upper()) ;
if (!result) {
Standard_ConstructionError::Raise(); <----- hits here
}
The "Tolerance" passed in is 9.9999999999999995e-008.
The "points" variable contains 5 points:
2 with value 0,0,0
2 with value 1,0,1
1 with value 2,0,0
and, of course, "result" is zero.
Hope this helps.
-Boyd
>Hi, Boyd
>This has been confirmed and fixed in most recent cgm. Thanks.
>Jane
On Thu, Dec 22, 2011 at 11:23 AM, Boyd Tidwell <boyd at csimsoft.com> wrote:
> Jane,
>
> The following:
>
> create vertex 0 0 0
> create vertex 1 0 1
> create vertex 2 0 0
> create curve vertex 1 2 3 spline
>
> should create a curve that includes all three vertices. It does so in
> Cubit with the Acis engine but with OCC, the middle vertex (3) gets left
> out. I looked a bit into the code with debug but I didn't come close to
> having an idea what the problem may be.
>
> Thanks,
>
> - Boyd
>
More information about the cgma-dev
mailing list