create boundary by 3dpoly

create boundary by 3dpoly

neam
Collaborator Collaborator
2,745 Views
23 Replies
Message 1 of 24

create boundary by 3dpoly

neam
Collaborator
Collaborator

hi every body

I have many many 3dpoly in project and want create boundary inside in 3d polylines by pick inside them.

I remember there was a command in the mechanical desktop called amcontin this feature Which gave you this capability. I don't want flat or explode or convert to lwpolyline them.

Would be grateful if you could provide some guidance on how to do this in autocad by lisp.

 

0 Likes
2,746 Views
23 Replies
Replies (23)
Message 2 of 24

Kent1Cooper
Consultant
Consultant

JOIN  (Admittedly, it doesn't work by picking inside an area, but by object selection, but it will make a single shape preserving the variance in elevation.  If you also want the originals preserved as separate pieces, JOIN a copy of the selection.)

Kent Cooper, AIA
0 Likes
Message 3 of 24

neam
Collaborator
Collaborator

Dear Kent

Thanks for your reply.

But it was my fault that i simplified the example In essence, 3d polylineas are each a closed area.

0 Likes
Message 4 of 24

marko_ribar
Advisor
Advisor

@neam wrote:

Dear Kent

Thanks for your reply.

But it was my fault that i simplified the example In essence, 3d polylineas are each a closed area.


How about that you explode all and then join only what you need... Of course if you need originals you create copy of them and operate on copy only...

Marko Ribar, d.i.a. (graduated engineer of architecture)
0 Likes
Message 5 of 24

neam
Collaborator
Collaborator

Hi Marko

Thank you for considering the question I asked.
1-The first question is how to break them (3d polylines) from the intersection.
2-And secondly, as I explained, they are numerous and most of them intersect in many places.

0 Likes
Message 6 of 24

marko_ribar
Advisor
Advisor

When you look your DWG from 3D VIEW - orbiting it is obvious that grey area is not touching any adjacent areas... Fix your DWG and then explode all and finally join only those lines that are of interest to get 3dpoly of area you want...

Marko Ribar, d.i.a. (graduated engineer of architecture)
0 Likes
Message 7 of 24

john.uhden
Mentor
Mentor

It sounds like all you need to do is flatten a copy of the 3D polyline.

If the FLATTEN command doesn't do it, then I will provide you my M2D program.

With an ssget you could process thousands in a tick of the clock.  Then again, you probably don't have any clocks that tick, let alone have a big hand and a little hand.  I have an original Eli Terry clock on my fireplace mantle, but it tells the right time only twice per day.  I don't think it has ticked in a century.

John F. Uhden

0 Likes
Message 8 of 24

devitg
Advisor
Advisor

Hi John. Nice to meet you.

I tried the flatten , and I guess to make REGIONS, and then UNION them , but I can not get the way to union the RED one.  Of course I do not have a clue how I would get the inner area. But as I can not get the UNION from all FATTENed poly , I stop digging on it.

PS. I love tour humor sense. At yours end phrases 

Gabriel, from Córdoba Argentina

 

 

0 Likes
Message 9 of 24

doaiena
Collaborator
Collaborator

There seems to be something wrong with this drawing /red poly is self intersecting/. I'm not sure lisp automation is possible, because of such unforeseen circumstances. I got to the boundary by following these steps:

1 - Flatten all 3dPolys, using @Kent1Cooper's Pline3Dto2D.lsp 

2 - Explode red poly, remove self intersection, then join again

3 - Region all polylines

4 - Union all regions

5 - Use the "boundary" command to create the required polyline

 

selfIntersBig.jpgselfInters.jpgarea.jpg

0 Likes
Message 10 of 24

john.uhden
Mentor
Mentor
I had no idea you wanted to UNION anything. That makes for a greater
challenge where I would be of little help. Sorry.

John F. Uhden

0 Likes
Message 11 of 24

Sea-Haven
Mentor
Mentor

His request was for a boundary, use bpoly yes its flat zero Z. If want Z then use getcoordinates and use a match XY adding Z to new bpoly as a 3dpoly using entmake etc.

 

Took 2 seconds to make.

0 Likes
Message 12 of 24

neam
Collaborator
Collaborator

Thanks for all the kind replies.

 

As I explained before, I am avoiding any flattening and exploding actions. I should explain that these boundaries are catchment basin extracted out of CIVIL 3D. What I need is to create a complementary boundary out of surrounding basins in the form of a BPOLY.

This objective is achieved through a PARCEL command in CIVIL 3D itself; though I have to select all neighboring objects and create numerous parcels. So, I am wondering if it’s possible to do it in AUTOCAD via an AUTOLISP app similar to AMCONTIN command with a simple picking action in MECHANICAL DESKTOP.

0 Likes
Message 13 of 24

Sea-Haven
Mentor
Mentor
 

Did you read my post ?

 

You don't need 3d polys for CIV3d boundaries.

0 Likes
Message 14 of 24

neam
Collaborator
Collaborator

I apologize first and foremost to myself.
It should be explained that I have little knowledge of the software of the mentioned software.
I know that the catchment area can be two-dimensional (2d Polyline).
I beg you all, to ask this question Think of this question as a general question or a challenge.
Given my flawed English, I can't ask my question any better.
Thankful
Thankful
Thankful

0 Likes
Message 15 of 24

john.uhden
Mentor
Mentor
I guess I just don't get it. If he is starting with a 3Dpoly, then it
sounds like he needs to do nothing, except he mentioned the UNION command.
Sometimes I should just stay out of the conversation.

John F. Uhden

0 Likes
Message 16 of 24

devitg
Advisor
Advisor

The UNION command do it for coplanar  region entys. and as the red 3dpoly have self intersections, so it can not be convert to a REGION, then it can not be UNIONed. 

 

 

0 Likes
Message 17 of 24

john.uhden
Mentor
Mentor
I think that's called a conundrum. 😕
The UNION command appears to have a mind of its own as well.
I suppose it would be a bit of work, but it might be valuable to someone to
come up with a routine to join overlapping polylines into one, maybe even
with the choice of inner or outer or both.
Okay, you start and I'll check your work. 🙂

John F. Uhden

0 Likes
Message 18 of 24

devitg
Advisor
Advisor

My Pseudo Code is

 

Copy selected 3dpolys , to a new layer

flatten or apply 3d to 2d lisp

make each FLATENed to be a REGION

then UNION all region 

and get the boundary inside it, 

 

Please see post 9 , where it is explained .

 

The main problem at this case is that the red 3dpoly is self-intersected , so it cannot be converted to a REGION , thus it cannot be  UNIONed .

 

 

0 Likes
Message 19 of 24

john.uhden
Mentor
Mentor
Yes, but after you convert it to 2D you could Bpoly it to make 2 (or more)
regions.
My 2004 exhibited undesirable results in not UNIONing adjacent regions into
one.
I hope that is working better these days. *(Or maybe it was an ID-Ten-T
error)*

John F. Uhden

0 Likes
Message 20 of 24

devitg
Advisor
Advisor

Yes. it is what I do , make all z=0 polys to region, and then Union , but acad show that should be a gap and can not make the inside boundary 

 

0 Likes