[cgma-dev] Create spline curve bug

Jane Hu janejhu at gmail.com
Thu Jan 12 11:51:52 CST 2012


Ok, I got your point, I double checked Acis, and found it gives all three
points in the list. Now I've updated the OCC code to reflect it.

Thanks, Boyd.

Jane



> On Tue, Jan 10, 2012 at 11:08 AM, <boyd at elemtech.com> wrote:
>
>> Howdy Jane,
>>
>>  I double checked the code.  "Curve* OCCModifyEngine::make_Curve" gets
>> called from GeometryModifyTool::MakeRefEdge with paramaters of the begin
>> and end points and a cubit_vector containing all three points (in the order
>> first point, mid-point, end point).  The values passed in are the same as
>> when the ACIS engine is being used.  It is in OCCModifyEngine::make_Curve
>> that the list of 5 points is built then used in an attempt to make the
>> curve.  I don't have a good grasp of how the code should work and am unable
>> to debug it at this point due to the following:
>>
>>  It has been decided that current state of the CGM/OCC code is good
>> enough to give a copy to our customer who is interested in a open source
>> geometry engine so I have been given a new assignment.  Corey McBride has
>> been assigned to work future issues and will be working with you on the
>> known problems.  The good news is that he has a better grasp of the code
>> and will be able to do a very good job of testing/debugging.
>>
>> Thanks very much for all your help with the OCC code.
>>
>> Take Care,
>>
>>  -Boyd
>>
>>
>> ----- Original Message -----
>> From: Jane Hu <janejhu at gmail.com>
>> To: Boyd Tidwell <bktidwell373 at gmail.com>
>> Cc: cgma-dev at mcs.anl.gov
>> Sent: Tue, 10 Jan 2012 08:49:57 -0700 (MST)
>> Subject: Re: [cgma-dev] Create spline curve bug
>>
>> 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/20120112/d567129f/attachment.htm>


More information about the cgma-dev mailing list