Jump to content

coordinates of points according to distance from centerline


anindya

Recommended Posts

Respected sir

 

I received those type of data in regular basis and it is done by linear measurement method.Now if i have to plot it in drawing then i need coordinate.How will i get that one.I know offsets are taken in perpendicular from alignment but to plot it in offset command is really a hard job to get the coordinates.If i get that in a table by just a click then it will make my job very easy.Is there any lisp or any Vba to solve that one.please help for that one.I have attached one sample drawing for understanding purpose.

Drawing1.dwg

Link to comment
Share on other sites

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • anindya

    10

  • BIGAL

    7

  • eldon

    4

  • sanju2323

    1

Top Posters In This Topic

Posted Images

I received those type of data in regular basis and it is done by linear measurement method.Now if i have to plot it in drawing then i need coordinate.How will i get that one.I know offsets are taken in perpendicular from alignment but to plot it in offset command is really a hard job to get the coordinates.If i get that in a table by just a click then it will make my job very easy.Is there any lisp or any Vba to solve that one.please help for that one.I have attached one more sample drawing for understanding purpose.

HHH.dwg

Link to comment
Share on other sites

It does seem to be taking things a long way round to create a table of coordinates, and then use those coordinates to plot something. The most common mistake when plotting coordinates is to transpose or misread digits.

 

I would use Measure to put blocks (consisting of straight lines) at right-angles along the alignment, and measure along those to give a required offset. Creating a table may be unnecessary.

Link to comment
Share on other sites

respected sir actually datas are taken by measurement tape and levelling instrument used by surveyors there only level & offset distance can be achieved.now if i have to plot on drawing i need coordinates.so please help me to plot.

Link to comment
Share on other sites

I thought that you already had the alignment drawn in CAD as a polyline.

 

If you are plotting a chainage and offset survey, I would still draw it manually, using distances rather than coordinates, especially as the offsets are not constant. Are the chainages at a constant interval?

 

I wish you success in your quest for coordinates.

Link to comment
Share on other sites

  • 4 weeks later...

You want a chainage and offset program that draws a series of points sq off a alignment. As already suggested, the method is pick a horizontal alignment, use the chainage point on the alignment, to draw a series of points as per your cross section values. Ch, +/- x, Rl

 

The best advice is that this is commercially available with lots of other extras, like make a surface model and contours, road design etc Its just not a default in say CIV3D.

 

I am working on something along this idea but no idea when it will be finished.

 

In old fashioned surveying a level book reduction.

Link to comment
Share on other sites

Ok here is a chainage offset and rl that will follow an alignment creating 3d points.

Chainage,Offset,RL

 

; Read a csv file and create 3d points along a pline alignment
; by Alan H jan 2016


;local defun for sq to pline
(defun alg-ang (obj pnt)
(- (angle '(0. 0. 0.)
  (vlax-curve-getfirstderiv obj (vlax-curve-getparamatpoint obj pnt)))(/ pi 2.0)
)
)

; thanks to Lee-mac for this defun
(defun _csv->lst ( str / pos )
(if (setq pos (vl-string-position 44 str))
   (cons (substr str 1 pos) (_csv->lst (substr str (+ pos 2))))
   (list str)
   )
)

(defun drawpt (chain offsetd rl / pt pt2 )
(setq Pt (vlax-curve-getPointAtDist Obj chain))
(setq ang (alg-ang Obj Pt))
(setq pt2 (polar pt ang offsetd))
(setq pt2 (list (car pt2) (cadr pt2) rl)) ; add z
(command "point" pt2)
)

(defun chofrl ( / fname strval lst)
(setq Obj (vlax-ename->vla-object (car (entsel "\nSELECT PLINE AS ALIGNMENT >>"))))
;(setq fname (open "c:\\acadtemp\\cross.csv" "r"))
(setq fname (OPEN (getstring "\nEnter file name") "r"))
(while (setq strval (read-line fname))
(setq lst (cons (_csv->lst strval) lst))
(setq chain (atof (nth 0 (nth 0 lst))))
(setq offsetd (atof (nth 1 (nth 0 lst))))
(setq rl (atof (nth 2 (nth 0 lst))))
(drawpt chain offsetd rl)
(setq lst nil)
(princ chain)
)
(close fname)
(princ)
)
(chofrl)

Link to comment
Share on other sites

RESPECTED BIGAL SIR WHEN I HAVE TRIED TO USE THAT LISP I GOT A MESSAGE AFTER SELECTING THE ALIGNMENT,THE DRAWING THE CSV FILE I SAVED IN DESKTOP I AM SENDING TO U.THE MESSAGE I GOT I AM SHOWING TO U.

 

SELECT PLINE AS ALIGNMENT >>

Enter file nameC:\Users\Anindya\Desktop\Table1.csv

point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0point

Current point modes: PDMODE=0 PDSIZE=0.0000

Specify a point:

Command: 0.0

HELP123456.dwg

Table1.csv

Link to comment
Share on other sites

This will create pts

; by Alan H jan 2016

;local defun for sq to pline
(defun alg-ang (obj pnt)
(- (angle '(0. 0. 0.)
  (vlax-curve-getfirstderiv obj (vlax-curve-getparamatpoint obj pnt)))(/ pi 2.0)
)
)
(defun drawpt (chain offsetd rl / pt pt2 )
(setq Pt (vlax-curve-getPointAtDist Obj chain))
(setq ang (alg-ang Obj Pt))
(setq pt2 (polar pt ang offsetd))
(command "point" pt2)
(princ pt2)
(princ "\n")
)

(defun chofrl (  )
(setq Obj (vlax-ename->vla-object (car (entsel "\nSELECT PLINE AS ALIGNMENT >>"))))
(setq offsetd (getdist "\NEnter offset distance"))
(while (/= chain nil)
(setq chain (getreal "\nEnter Chainage press <Cr> to exit")) ;make this a loop of chainage steps
(drawpt chain offsetd rl)
(setq lst nil)
(princ chain)
)
(close fname)
(princ)
)
(chofrl)

Link to comment
Share on other sites

RESPECTED SIR :Bigal sir something is going wrong to me. i cannot understand that after selecting the alignment it is asking me to enter offset distance where the offsets are different as i showing on excel sheet.if it just ask me the name of excel sheet (say if i put it on desktop).and create the 3d points it will be fine.but it is not happening like that .pls help.i want to see the point on both side of alignment according to the mentioned distance in excel sheet of mentioned chainage.

Link to comment
Share on other sites

Cadtutor is a free service so at some point the project gets big and the free time runs out. I have posted a how to method to get the point details it requires a loop to extract all the required values. If you want this and are prepared to pay I am sure someone can help.

 

Otherwise can any one help ? Or you may need to start to learn lisp. There is everything you need to know here at Cadtutor its a case of joining it all together.

Link to comment
Share on other sites

Speaking practically, I hope that the example that you posted of an alignment was a fictional one, and not an actual real life situation.

 

If it were to be a field example, I would question the ability of the surveyor to know where to survey on the cross sections without any ground marks.

PlotOffsets.jpg

Link to comment
Share on other sites

respected eldon sir i want to get the 3d points in the side of alignment from the datas i got from surveyor.the excel sheet i sent suppose i got from surveyor,now i want to see the offset points in the drawing. how to do it?

Link to comment
Share on other sites

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...