Author Topic: How to convert any spline to pline?  (Read 12625 times)

0 Members and 1 Guest are viewing this topic.

taner

  • Guest
How to convert any spline to pline?
« on: August 26, 2007, 07:42:52 PM »
How to convert any spline to pline? Anyone can help me? Thanks very much in advanced.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: How to convert any spline to pline?
« Reply #1 on: August 26, 2007, 08:06:24 PM »

Google : "Convert Spline"
Results 1 - 10 of about 449 for "Convert Spline". (0.21 seconds)
http://management.cadalyst.com/cadman/article/articleDetail.jsp?id=101134
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

taner

  • Guest
Re: How to convert any spline to pline?
« Reply #2 on: August 26, 2007, 09:21:43 PM »
the answer:

Code removed by CAB as there is no permission to post copyright code from (c) 2003 Tony Hotchkiss

Quote
Get the Code
Download the code for this and all articles in our Get the Code area. Look for file dec03.exe. You will need to register at the site (no charge). Or get the routines directly from author Tony Hotchkiss at CAD/CAM Technologies, 42 15th St., Buffalo, NY 14213, 716.883.8790, e-mail tony.hotchkiss@cadalyst.com or visit his web site.


« Last Edit: August 26, 2007, 10:39:45 PM by CAB »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: How to convert any spline to pline?
« Reply #3 on: August 26, 2007, 09:38:05 PM »

You're welcome.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Strucmad

  • Guest
Re: How to convert any spline to pline?
« Reply #4 on: August 26, 2007, 09:47:48 PM »
I like your style kerry :-D

VVA

  • Newt
  • Posts: 166
Re: How to convert any spline to pline?
« Reply #5 on: August 28, 2007, 02:36:10 AM »
It is a part of my programs pltools
ConvTo2d  -transformation of linear objects in 2D polylines
ConvTo3d  -transformation of linear objects in 3D polylines

VVA

  • Newt
  • Posts: 166

Joe Burke

  • Guest
Re: How to convert any spline to pline?
« Reply #7 on: August 28, 2007, 04:53:31 AM »
It is a part of my programs pltools
ConvTo2d  -transformation of linear objects in 2D polylines
ConvTo3d  -transformation of linear objects in 3D polylines

There's been a few bug fixes for the TraceObject function. Here's the latest version.

VVA

  • Newt
  • Posts: 166
Re: How to convert any spline to pline?
« Reply #8 on: August 28, 2007, 06:50:16 AM »
Greetings Joe Burke. Once again thanks for your code. But TraceObject works incorrectly for objects with Normal vector (a field 210) distinct from (0 0 1).
In a file more low your functions are declared as TraceObject1_1_3, my edition as TraceObject_VVA. And 2 commands: TEST1 and TEST2.
The basic differences:
1. As TraceSpline instead of @delta it is used 3d_angw1w2 (Returns an angle between 3d vectors)
2. Function ZZeroList is not applied. To reception of points of object in world system of co-ordinates for set Normal vector it is applied (TraceToLWPlinePoint obj)

Joe Burke

  • Guest
Re: How to convert any spline to pline?
« Reply #9 on: August 28, 2007, 07:34:33 AM »
Greetings Joe Burke. Once again thanks for your code. But TraceObject works incorrectly for objects with Normal vector (a field 210) distinct from (0 0 1).
In a file more low your functions are declared as TraceObject1_1_3, my edition as TraceObject_VVA. And 2 commands: TEST1 and TEST2.
The basic differences:
1. As TraceSpline instead of @delta it is used 3d_angw1w2 (Returns an angle between 3d vectors)
2. Function ZZeroList is not applied. To reception of points of object in world system of co-ordinates for set Normal vector it is applied (TraceToLWPlinePoint obj)

Hi VVA,

I'll study your post and get back to you.

Thanks


Joe Burke

  • Guest
Re: How to convert any spline to pline?
« Reply #11 on: August 29, 2007, 10:22:32 AM »
http://forum.arkitera.com/autocad/5839-spline-i-polyline-cevirmek.html

At first glance this looks like convoluted code which only deals with splines.

The TraceObject code is more generic in the sense it deals with splines and other types in a similar fashion.

Joe Burke

  • Guest
Re: How to convert any spline to pline?
« Reply #12 on: August 30, 2007, 07:32:25 AM »
Hi VVA,

Your code is interesting. I don't understand all of it yet, but most of it I think. I've run your test functions and I see the different results in terms of point lists.

A thought for your consideration. I don't think it's quite accurate to say TraceObject as is "works incorrectly" given an object with an odd normal. The two point list it returns with the spline in your example file is correct when the drawing is in WCS top view. In that view the spline looks like a diagonal line and the two points returned are at the ends of the spline.

So I think a more accurate statement would be it doesn't work the way you would prefer.

I'm going to try the 3d_angw1w2 function within the current code. I'll let you know what I find.

Thanks for your comments.

Regards

VVA

  • Newt
  • Posts: 166
Re: How to convert any spline to pline?
« Reply #13 on: August 30, 2007, 10:11:26 AM »
Hi, Joe Burke
Yes, I in the statements was too categorical.
It is necessary to read "works incorrectly" as "not as I wanted"

Joe Burke

  • Guest
Re: How to convert any spline to pline?
« Reply #14 on: August 30, 2007, 11:19:36 AM »
Hi, Joe Burke
Yes, I in the statements was too categorical.
It is necessary to read "works incorrectly" as "not as I wanted"

VVA,

Thanks for confirmation on that point.

Regardless, I think your point/code has merit and I hope we can find some way to fold it into TraceObject without defeating what the function is primarly intended to do. Assuming you don't mind me borrowing parts of your code.

I hope it might be a collaborative task...

Regards