Jump to content

3D-polyline Intersection ?


ghostware

Recommended Posts

Lee,

 

But [noparse](-4 . "&") (70 . 8)[/noparse] would not exclude 3D Polylines with Spline/Curve fit vertices, for which the linear 'FindZOnLine' would fail.

 

Because each segment is still in straight 3dline ( no bulge factors allowed ) findzonline should work so I included splined entities.

 

I thought the last one we worked on ( points at vertices ) would return erroneous results if the point was on a control vertex, I excluded them then. This time I thought with the possiblity of toppo 3dplines being splined that we should include them.

 

thus I used

              
(and (/= (logand (cdr (assoc 70 vd)) 16) 16)
    (=  (logand (cdr (assoc 70 vd)) 32) 32)
    (setq vl (cons (cdr (assoc 10 vd)) vl)))
  

 

 

(vl-sort) is very convenient (and pretty quick too); I remember gile wrote a nice equivalent here which uses only Vanilla AutoLISP.

 

 

I will definetly look into it!

 

I would think the *error* handler would only be required to suppress a function cancelled message should the user hit Esc, or close any Undo marks. After all, we are not changing any System Variables and nothing need be reset.

 

When using ( command ) (like I did ) , I have always thought it best to add an *error* trap. You really don't know the status of the current *error* It may call a "_.UNDO" to a place where you really don't want to be.

 

I don't think the values of CECOLOR/CLAYER/THICKNESS etc. come into play here, since (entmake) will use the current values for these as default, this would be expected behaviour.

 

Yes, it should be expected behavior to an experienced user. With a routine like this, I doubt the end user has actually set the layer, color etc to a predetermined value before hand. For a robust routine or one that I would use on a regular basis, I would have the routine control all of the sysvars and entity construction values. ie a 3DPOLY cannot have thickness or linetype, so why have (entmake ) include those groups in it's definition.

 

We do tend to post snippets of code here rather full blown robust programs. It is more a matter concept vs entirety.

 

Have a good week! -David

Link to comment
Share on other sites

  • 2 years later...

Dear ,

I have some thing similar requirement as David lisp is executing, but I need to have exact of coordinates (X,Y and Z valve in text) where a line intersects red color 3d polylines. I will draw line / pline (from A1 to A2, again b1 to b3 and so on) and lisp must generates the coordinates.. Please find the attached file in this link (https://www.dropbox.com/s/4fxsq9lr2cnuk5h/3dpolyline%20to%20text.dwg). This is very urgent for me. Please advice…..

Link to comment
Share on other sites

  • 5 years later...

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