Jump to content
Developer Wiki and Function Reference Links ×

Acuracy of 'PointAlongPoly' in line arc polylines


DJC

Recommended Posts

I have been using function "pointAlongPoly" to station street centerlines made of line/arc polylines. A typical centerline is 1500 feet long,typical radius 300' and station intervals are typically 50'. I place the function in a repeat sequence, adding the interval in each loop and placing a locus at each station. In the areas of arc polylines the points are not located exactly on the polyline, having an error of from 0.01 feet to 0.50 feet.

(layer scale :1"=50'), (2D conversion Res: Very High).

In the past I have created scripts which decompose the arclinepolyline, place handles on each segment and continue acurate stationing through the entire length. this is very acurate in scripts but is very cumbersom and difficult if not inpossible to use in PIO's.

I have read in the SDK comentary about this function that vectorworks creates an internal polygon to approximate the polyline with this function.

My questions Are:

(1)Is there an another way to accurately station a arcline polyline without decompose/compose which is friendly to a PIO?(handle passing problems)

(2) Is there a way to set the internal conversion resolution of the internal polygon approximation to a higher resolution so that acceptable tolerances can be obtained?

Landmark uses the command 'station along poly' to accomplish this.

Is there a function used in 'station along poly' that is more acurate than 'point along poly'.?

I have been working for about 20 years to develop a civil/surveying modual for VW and have created thousands of variations of PIOs and scripts for street design, subdivion Layout,lot design, computations,annotation and earth work, hydraulics in storm and sanitary sewers, cogo, point output,etc. I am a RLS And BSEE in Ohio,have a broad back round in civil engineering and have spent many years disigning various types of sites.

I have designed hundreds of residential subdivisions.

Since 1982 I have been the sole owner of David J. Clinton & Co. Inc. I have personally owned, designed,funded,constructed and marketed 21 residential subdivisions in the northern Cincinnati area each containing from 200 to 575 lots.

I am a two person company. I have used VW/MC since 1985.

I am still in the development business and personally design my own land plans and frequently do final construction drawings.

I am somewhat familiar with other civil/land plan/site plan/highway design platforms. I much prefer using VW and improvising with my own scripts and pios than going to other platforms. I am able to produce much more understandable, easy to follow drawings with VW. VW is also very handy for preparing presentation graphics and marketing literature.

Ideas about improving the accuracy if 'point along poly' or alternatives for stationing an linearc polyline would be appriciated.

DAVE C.

greatdavidc@mac.com

Link to comment

(1) Is there an another way to accurately station a arcline polyline without decompose/compose which is friendly to a PIO?(handle passing problems)

If you want accuracy, there is nothing better than calculating the stations the old fashion way. The polyline does not need to be decomposed for line & arc segments (only bezier curves would need to). You just need the center and radius. The station point on the arc can be calculated with:

l = rφ where

l = arc length

r = radius

φ = Angle of arc in radians.

And to calculate exact points along an arc use vector geometry which works with angle & length parameters.

I use a custom PIO for centerlines which can be either line or arc segments but the calculations for the stationing are the same as above. It comes really handy when reconstructing a street from existing plans and the data available can be points, stationing, and angles.

By the way, we share similar experience with VW. I bought the program (MiniCad 1+ I think) right after I bought my first Mac in 1986 and have developed my own engineering specific tools since scripting was added.

(2) Is there a way to set the internal conversion resolution of the internal polygon approximation to a higher resolution so that acceptable tolerances can be obtained?

You can use the function:

ConvertToPolygon(polylineHdl:HANDLE; resolution:INTEGER):HANDLE; (returns a handle to a polygon representing the shape of the polyline)

I found a resolution of 64 to be acceptable but you may want to experiment with this value; too small and accuracy is not that good; too high and it may slow down computations considerably.

Link to comment

Miguel and others:

I found this script posted by:

MullinRJ Offline

500 Club

Registered: 06/29/01

Posts: 672

Loc: Dallas, TX

PROCEDURE CentrePoints;

VAR

???obHd : HANDLE;

???clockWise : BOOLEAN;

???t : INTEGER;

???x, y, dx, dy, a, aR, a1, a2, r, d, l : REAL;

???x1, y1, x2, y2, x3, y3 : REAL;???{ added these to make it compile }

???v1, v2 : VECTOR;

BEGIN

???obHd := FSACTLAYER;

???GETPOLYPT(obHd, 1, x1, y1);

???GETPOLYLINEVERTEX(obHd, 2, x2, y2, t, r);

???GETPOLYPT(obHd, 3, x3, y3);

???

???v1.x := x1-x2; v1.y := y1-y2;??????{ make vector v1 point away from point 2 }

???v2.x := x3-x2; v2.y := y3-y2;??????{ yes, points away from point 2 }

???a1 := VEC2ANG(v1);

{??a2 := VEC2ANG(v2);}????????????????{ don't need this anymore }

???a := ANGBVEC(v1, v2)/2;??????????{ remove 180 from calculation, as v1 is now reversed }

???aR := TAN(DEG2RAD(a));

???d := r/aR;

???l := SQRT(r^2+d^2);

???

???{ use clockWise condition to add or subtract angle a to/from angle a1 }

???clockWise := GETOBJECTVARIABLEBOOLEAN(obHd, 652);

???if clockWise then a := DEG2RAD(a1+a)

???else a := DEG2RAD(a1-a);

???

???dx := l*COS(a);

???dy := l*SIN(a);

???LOCUS(x2+dx, y2+dy);

END;

RUN(CentrePoints);

By using a modified version of this script my problem is solved.

Thanks Everyone!

Dave C.

greatdavidc@mac.com

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...