Jump to content

Digital design...which software can generate this questiion


Recommended Posts

Posted

vraagstuk curve.pdf

 

Short and briefly:

 

How to generate the red line from shape Y in any software (see attachment)?

Is there a software that can read surfaces from a arbitrary shape and generate this surface in a graphic line.

 

In other words, I need a program that can 'read' shapes and generate a graphic line from their surfaces based on intervals. (maybe something to do with mathematique integrals...but it should be from arbitrary shapes)

 

I need to convert 500 shapes into graphic lines. So a software that could do this automaticaly would save my time

 

Any ideas how to do this....?

 

Thx!

  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

  • MVMV

    12

  • marko_ribar

    9

  • Stefan BMR

    6

  • Barneel

    2

Top Posters In This Topic

Posted Images

Posted

Well, nobody has replied to this yet....

 

Are all your shapes in .pdf format? What file type do you want them outputted as?

 

It is possible to convert some .pdf files to .dxf files which, in autoCAD terms, will convert all the lines in the pdf to 'polylines' (see attached conversion). If the attached is similar to what you are looking for I would look into .pdf to .dxf converters.

 

vraagstuk_curve.dxf

Posted

Thx for the reply...but its not really an answer on my question. The PDF is converted from a CAD-file already itself.

 

My question is more like this:

 

I need a program that can draw shape Y based on the information from shape X. So the program needs to be able to read the surface of shape X and convert it into shape Y. (distance A-B in shape X = distance A-B in Y)

 

I think maybe its more a geometrical - mathematical based software that i am looking for.

 

Cheers

Posted

Ah, sorry I misunderstood.

 

From what I can tell the shape on the RHS is generated by aligning the leftmost point of each line and redrawing the resultant line you highlighted in red. I imagine this would be possible with the help of a LISP, but unfortunately I cannot help with that.

 

You need a LISP magician!

Posted

From what I can tell the shape on the RHS is generated by aligning the leftmost point of each line and redrawing the resultant line you highlighted in red. I imagine this would be possible with the help of a LISP, but unfortunately I cannot help with that.

 

You need a LISP magician!

 

Magician where are you??

Posted (edited)

You can make polyline with some approximations and then pedit it and apply fit option, but exact curve I think you can't get... Every curve entity in CAD has its paramters as contol vertices, so you can't generate curve with infinitely large number of control vertices - parameters...

Edited by marko_ribar
Posted

I like others here I am sure am totally confused as what you actually have as starting point ignoring PDf but back to cad dwg is the "Shape" a 3d surface or is it a series of cross sections that you want to make into a surface and then slice again ?

 

Is each of the horizontal lines actually a series of 3d lines/plines if so then surface is easy.

 

Really need more information a 3dview etc would explain a lot.

Posted

MVMV

Maybe if you explain how you do it manually, somebody can help you.

I remember doing something like that back in college (I don't know the terms, but it was about steel forging, hot plastic deformation ??)

If a high precision is not required, maybe this lisp is just enough.

The X profiles must be LWPOLYLINES in WCS.

(defun c:test ( / d e1 e2 l p p1 p2 y1 y11 y12 y2 y21 y22)
 (if
   (and
     (princ "\nSelect first object")
     (setq e1 (ssget ":E:S:L" '((0 . "LWPOLYLINE"))))
     (princ "\nSelect second object")
     (setq e2 (ssget ":E:S:L" '((0 . "LWPOLYLINE"))))
     (not (eq (setq e1 (ssname e1 0)) (setq e2 (ssname e2 0))))
     (setq d (getdist "\nInterval: "))
     (setq p (getpoint "\nSelect insertion point: "))
   )
    (progn
      (setq y11 (cadr (vlax-curve-getstartpoint e1))
            y12 (cadr (vlax-curve-getendpoint e1))
            y21 (cadr (vlax-curve-getstartpoint e2))
            y22 (cadr (vlax-curve-getendpoint e2))
      )
      (mapcar 'set '(y11 y12) (list (min y11 y12) (max y11 y12)))
      (mapcar 'set '(y21 y22) (list (min y21 y22) (max y21 y22)))
      (if
        (or (<= y12 y21) (< y22 y11))
         (princ "\Objects not overlaping...")
         (progn
           (setq y1 (max y11 y21)
                 y2 (min y12 y22)
                 d  (/ (- y2 y1) (fix (/ (- y2 y1) d)))
           )
           (entmake
             (list
               '(0 . "LINE")
               (list 10 (car p) y1 0)
               (list 11 (car p) y2 0)
             )
           )
           (while (<= y1 y2)
             (setq p1 (vlax-curve-getclosestpointtoprojection e1 (list 0.0 y1) '(1 0 0))
                   p2 (vlax-curve-getclosestpointtoprojection e2 (list 0.0 y1) '(1 0 0))
                   )
             (entmake (list '(0 . "LINE") (cons 10 p1) (cons 11 p2)))
             (entmake (list '(0 . "LINE") (list 10 (car p) y1 0) (list 11 (+ (car p) (distance p1 p2)) y1 0)))   
             (setq l (cons (list 10 (+ (car p) (distance p1 p2)) y1) l)
                   y1 (+ y1 d)
             )
           )
           (entmake
             (append
               (list
                 '(0 . "LWPOLYLINE")
                 '(100 . "AcDbEntity")
                 '(100 . "AcDbPolyline")
                 (cons 90 (length l))
                 '(70 . 0)
                )
              l
             )
           )
         )
      )
    )
 )
 (princ)
)

Posted

I think i need to specify the practical use of my question a bit more, so please download following link:

 

click here

 

The aim is to create lamels for a parking garage that visualize images of the historical context of the site. Therefore, I need to find a script in autocad that can generate the red line automaticaly from the halftone pattern shape (For now i did al the cutting lines for the lamels manuallly for the testfragment).

 

The red line will function as the cutting line for the CNC cutter, therefore a postive and negative image will appear. (costwise, there wont be any loss of material)

 

I hope i clarified myself...

 

Pls shoot!

Posted

Stefan,

 

See my next post on page 02 for practical use of my question.

I've never worked with LISP...but i think it starts to be time to check out the possibilities

Posted

Manual description

 

adobe photoshop:

>create halftone line pattern

 

adobe illustrator:

>create image trace for vector lines halftone line pattern

>export as dwg

 

 

autocad: (i need the script for this)

>divide halftone line shapes in intervals (horizontal lines in shape x)

>project length horizontal lines on straight line (from shape Y)

>connect ends of horizontal lines with spline (creates the red line from shape y)

>do this over for every shape from halftone pattern

Posted

MVMV

I need to see a dwg sample. From your pdf files, I can only make assumptions.

What autocad object is your shape? It is a surface, region, polyline?

Anyway, I think my lisp is what you need, but some minor adjustments may be required, depending on particular cases.

Posted (edited)

MVMV,

 

If I follow you correctly, your input is an image, that is a raster.

 

You want to generate the redline to a given scale that is transform it to vectors.

 

There are some freeware for that, for example WinTopo

 

Once you have the outline in vector form, Autolisp can help you to simplify the vertices list and to generate

the profile you want (Left side or Right side).

 

Although you seems to have vector from Adobe.

 

How about posting your file ? Once in Autocad Stefan's proggie can help you.

 

ymg

Edited by ymg3
Posted

Stefan,

 

link CAD-file

 

Here you have the CAD-file. Some of the shapes are touching each other. So consider they have to be splitted apart from each other.

 

Some of the splines are converted to Polylines already. (if needed for the LISP)

 

Thx for checking out!

Posted

Stefan,

 

I'm not familiar with LISP...so i need to dive into this first.

 

Grtz

Posted

Still not entirely clear in my mind, but take a look at image below which is a simplified representation of what I think you are after.

 

ymg

strip.png

Posted

OK MVMV.

First, follow steps described in attached dwg.

To run lisp:

- save lisp file (this one, attached) in your computer and remember save path

- on Autocad, at command prompt run appload (or ap). In dialog box, navigate to lisp file location, select the file and press "load" button.

- run test command. When prompted, select one of spline, then the other. Next, enter interval value (I've put 1). A smaller interval means higher precision. Finally, pick a point on a clean area. Done.

profile.LSP

halftone_vector.dwg

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...