1. Login to Give a bone

Algorithm for Cumulative distances

I have some distances of hole to hole and final over all length of flat. please see below lists.

Cumulative distance (Actual/ rounded):
==========================================
Sr Actual Rounded Final H to H
===============================================
0 0.00 0.0 -
1 24.91 25.0 25.0
2 84.91 85.0 60.0
3 572.72 573.0 488.0
4 1159.58 1159.5 586.5
5 2333.27 2333.0 1173.5
6 3506.97 3507.0 1174.0 * -0.5 mm will be adjusted here
7 4373.40 4373.5 866.5
8 4453.40 4453.5 80.0
9 4518.40 4518.5 65.0
===============================================
Length: 4518.40 4518.5--> 4518
Error:0.10 if length rounded to 0.5
* -0.5 mm to be adjusted in largest H 2 H dist
to round up total length to full digit.

Cumulative distance (Actual/ rounded):
==========================================
Sr Actual Rounded Final H to H
===============================================
0 0.00 0.0 -
1 54.91 55.0 55.0
2 114.91 115.0 60.0
3 264.91 265.0 150.0
4 572.72 573.0 308.0
5 1159.58 1159.5 586.5
6 2333.27 2333.0 1173.5
7 3506.97 3507.0 1174.0 * -0.5 mm will be adjusted here
8 4413.93 4414.0 907.0
9 4493.93 4494.0 80.0
10 4518.40 4518.5 24.0
===============================================
Length: 4518.40 4518.0--> 4518
Error:-0.40 if length rounded to 0.5
* -0.5 mm to be adjusted in largest H 2 H dist
to round up total length to full digit.

I want to do algorithm for above mentioned distances. this is a sample others are vary.

Thanks,

Avinash

2. Login to Give a bone

Re: Algorithm for Cumulative distances

Post a dwg that may explain more what it is you want. Getting distance between multiple circles and adding them is not a problem.

3. Login to Give a bone

Re: Algorithm for Cumulative distances

4. Login to Give a bone

Re: Algorithm for Cumulative distances

You have 140 posts so must have some idea of writing a lisp.

Use ssget '((0 . Circle)) so get all the circles in the rectang get centre point of each one and use vlsort so will be from left to right. Fixes any draw order of circles.

I take it you want the distance from say the mid of the rectang left side, so can do easy a distance from this point or use the (car pt) for say X only.

5. Login to Give a bone

Re: Algorithm for Cumulative distances

I have all circle details but I need it roundup distances as per txt file with respect to total length. (like... Length: 4518.40 4518.0--> 451

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•