Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

ufs.curve.createSplineThruPts not being displayed

Status
Not open for further replies.

EngProgrammer

Aerospace
Jan 14, 2015
150
Ive created a function that creates a spline based on subject.

I can't get the spline to appear in the cad window. What am i missing?
 
Replies continue below

Recommended for you

> The point: (0.8, 1.909, 0) appears twice in the list (consecutively).

Good eye, Cowski. That's the problem.
I looked for coincident points, but didn't see any.

NX uses the distances between points to assign parameter values to them. If two consecutive points are equal, then the parameter increment between them gets set to zero, so the parameter values are "not increasing". A message saying "coincident points" would be much more helpful.

I still think you should get rid of the ArrayList. ArrayLists are obsolete and evil -- using them prevents the complier from helping you.
 
It works !! Thank you guys. Sometimes when coding your can't see the forest from the trees or the trees from the forest....

I agree a more helpful error message would have been better.

I agree it's kind of sloppy coding to use arrays. But, sometimes I like to bundle up things in list of lists. Then pass the arraylist around and break it apart on the other side. This works great if you are the only one programming but fails when there are multiple programmers. It's better to make a class object. ArrayList are good when you don't know the size of the array. Without knowing the size of the array you have to use redim or redim preserve.

 
Rather than an Array or ArrayList, I'd suggest using a List(Of {type}); in this case a List(Of Point3d) or List(Of Double()). The List object gives you all the advantages of an ArrayList with the added benefit of type checking.

In this case it's more of a style/preference issue since the ArrayList wasn't the source of any of your problems.

www.nxjournaling.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor