Rakesh Rao <rakes...@vsnl.net> schrieb in im Newsbeitrag:
3D9BD29A...@vsnl.net...
>
> Hello,
>
> Does anyone have the algorithm to reconstruct exactly an LWPOLYLINE
> given the list of points and associated bulge factors. I have got as far
> as being able to properly reconstruct the polyline if there are no more
> than one arc segment next to each other in the polyline. If there are
> more than one arc segments, my method fails. I am not able to account
> for the bulge factors that are specified at both the start and end of
> each segment. Any pointers are appreciated.
>
> Thanks
> Rakesh
>
> --
>
> AutoCAD customization for Engineering/Mapping/GIS
> Get GeoTools @ http://www.4d-technologies.com/geotools
> Build MyGeoTools @
> http://www.4d-technologies.com/geotools/my_geotools.htm
> FREE downloads : http://www.4d-technologies.com/techcenter
>
>
Use the same approach as you did for getting the vertices, except with 42
instead of 10.
--
John Uhden, Cadlantic/formerly CADvantage
http://www.cadlantic.com
Sea Girt, NJ
"Rakesh Rao" <rakes...@vsnl.net> wrote in message
news:3D9BD29A...@vsnl.net...
You didn't attach the function pl_getbulgelst. May we see that, too, please.
I quickly looked through it but haven't tested it yet.
Risto
Rakesh Rao <rakes...@vsnl.net> schrieb in im Newsbeitrag:
3DA1B44A...@vsnl.net...
>
> Hello,
>
> I have attached the Lisp I have written so far - ARC.LSP and a test
drawing
> ARC.DWG
>
> Let me know if you have some pointers.
>
> regards
> Rakesh
Yes I read it, you said "given the list..." but your code looks as if you
just wanted a copy of it in lines and arches.
Risto
--
Risto Makela
au...@cadapter.com
Cadapter Software
http://www.cadapter.com
Thanks for responding. This works if there is only one arc segment followed by a
straight line segment. If there are more than one arc segments next to each other,
it somehopw fails.
I have just now posted the completed source file ARC.LSP in response to Risto's
reply.
Let me know if you have any pointers in writing the code for correctly handliing
multiple arcs, some possibly going in left or right directions and next to each
other.
Regards
Rakesh
--
John Uhden, Cadlantic/formerly CADvantage
http://www.cadlantic.com
Sea Girt, NJ
"Rakesh Rao" <rakes...@vsnl.net> wrote in message
news:3DA57460...@vsnl.net...
I am trying to read just one polyline info from a DXF file and reconstruct only
that in the DWG file. So, I am not starting with the polyline info but instead
have the vertices and bulge factors extracted from the DXF file and now have to
rebuild the polyline. It will be an overkill to bring the whole DXF in.
Regards
Rakesh
I took a look at your code. The problem is in your way to set the loop with
foreach of bulges. The line command doesn't get the last point since the
bulge counter is out by that. Consider laying the loop out with <while point
list length> instead and pick the bulges by nth.
Further, you should terminate the line command each time after the second
point is issued, i.e. put a (command) after it. THe arc command ends alone
but line wants to continue unless you terminate it.
I tested it with these two corrections and it did run through.
Another thing is that the bulge radius function you have doesn't return
greater than semicircle radii. If the bulge is more than pi, you get a
truncated arc. Consider remaking that, too.
Risto
--
Risto Makela
au...@cadapter.com
Cadapter Software
http://www.cadapter.com
Rakesh Rao <rakes...@vsnl.net> schrieb in im Newsbeitrag:
3DA572CB...@vsnl.net...
>
> Hi Risto,
>
> Sorry for the late response. Here is the ARC.LSP program with the
PL_BulgeLst
> function.
>
> Now, I am able to reconstruct the polyline if not more than one arc is
present
> in the polyline.
>
> If there are more than one arcs just next to each other, I have difficult
in
> establishing the arc geometry correctly.
>
> Regards
> Rakesh
>
>
>
> "Risto Mäkelä" wrote:
>