[cgma-dev] Create spline curve bug
Jane Hu
janejhu at gmail.com
Tue Jan 10 09:49:57 CST 2012
Hi, Boyd:
The point list should include only 3 points without duplicates. If you
called GeometryModifyTool::make_RefEdge(), you need to pass in start and
end vertex besides the mid-point as the list member. Can you double check
on this?
Thanks.
jane
On Mon, Jan 9, 2012 at 2:29 PM, Boyd Tidwell <bktidwell373 at gmail.com> wrote:
> 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
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/cgma-dev/attachments/20120110/4e6c8de6/attachment.htm>
More information about the cgma-dev
mailing list