[cgma-dev] Create spline curve bug

Jane Hu janejhu at gmail.com
Tue Jan 10 09:55:23 CST 2012


To make it clear: the CubitVector list for the points should only contain
mid-point, it's a one point list.

Thanks.

jane

On Tue, Jan 10, 2012 at 9:49 AM, Jane Hu <janejhu at gmail.com> wrote:

> 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/3b29820a/attachment.htm>


More information about the cgma-dev mailing list