TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: m4rdy on January 21, 2011, 07:37:49 AM

Title: Wall Intersection
Post by: m4rdy on January 21, 2011, 07:37:49 AM
I'll appreciate for any help
I also attached file.
Thank you.

mardi

(http://D:\Mardi\wall_intersection.bmp)
Title: Re: Wall Intersection
Post by: Matt__W on January 21, 2011, 08:10:01 AM
What are you trying to do?  Do you want the two to clean up auto-magically?  Or are you hatching manually?
Title: Re: Wall Intersection
Post by: m4rdy on January 21, 2011, 08:19:25 AM
What are you trying to do?  Do you want the two to clean up auto-magically?  Or are you hatching manually?

I think i prefer to 'clean up auto-magically'  :-D :-D
Thank you.

mardi
Title: Re: Wall Intersection
Post by: SOFITO_SOFT on January 21, 2011, 09:49:31 AM
Hello people of the swamp:
It's not magic, especially if the shades are associated with polylines.
An algorithm could be:
- doubling the 2 polylines
- Searches the 4 intersections
- For each polyline (4)
   - take a vertex
   - moves the vertex to the nearest intersection

is not difficult ... Or... I am today specialty ingenious ?
Greetings from Madrid
Title: Re: Wall Intersection
Post by: SOFITO_SOFT on January 21, 2011, 10:15:17 AM
Hello people of the swamp:
I'm not specialty was light today, I am especially optimistic.
Is more complex. only move 2 vertices in each polyline. Those who are on the other side of the intersections. It really is not very easy.
Title: Re: Wall Intersection
Post by: m4rdy on January 21, 2011, 10:30:09 AM
- For each polyline (4)
   - take a vertex
   - moves the vertex to the nearest intersection
is not difficult ...

Thank you for your reply SOFITO_SOFT,
Apologies I didn't describe the problems before.
I know how to find the intersection of 2 closed pline so the result are four intersection points. (http://lee-mac.com/intersectionfunctions.html (http://lee-mac.com/intersectionfunctions.html)).
But i have difficult :
1. how to break and trim each of pline to become 4 plines
2. how to grab all pline after trim to become closed pline.
3. how to hatch'em with the same old pattern.

If you dont mind, can you show me the way.
Thank you,

mardi
Title: Re: Wall Intersection
Post by: Krushert on January 21, 2011, 10:34:13 AM
What version of Cad are you running?

Do you have the lineworksubtract command? Select objects and Right Click   I think Autodesk rolled it out in 2011 for all platforms but it has been in ACA since 2004 version, I think but definitely in 07.  

If you do have it select both walls and both hatches and then select your none option to pick the four corners.

Code: [Select]
Command: LINEWORKSUBTRACT
Select linework to subtract from: Specify opposite corner: 2 found
Select linework to subtract from:
Select object(s) to subtract or NONE to pick rectangle:
Specify first corner:
Specify opposite corner:
Title: Re: Wall Intersection
Post by: m4rdy on January 21, 2011, 10:45:24 AM
What version of Cad are you running?

I tried with A2009 and A2007, there's no LINEWORKSUBTRACT command.

Code: [Select]
Command: LINEWORKSUBTRACT
Unknown command "LINEWORKSUBTRACT".  Press F1 for help.

mardi
Title: Re: Wall Intersection
Post by: Krushert on January 21, 2011, 11:04:01 AM
Yeah Plan Autocad did not have those tools in those versions.  Just the architecture platform did.  Sweet commands I use them every day.

Title: Re: Wall Intersection
Post by: Matt__W on January 21, 2011, 11:05:02 AM
Yeah Plan Autocad did not have those tools in those versions.  Just the architecture platform did.  Sweet commands I use them every day.


Way to rub his nose in it, dude!   :roll:
Title: Re: Wall Intersection
Post by: Krushert on January 21, 2011, 11:07:53 AM
Yeah Plan Autocad did not have those tools in those versions.  Just the architecture platform did.  Sweet commands I use them every day.


Way to rub his nose in it, dude!   :roll:
Was not trying to do that! 

m4rdy:  My apologies if I came across as that.
MattW:  Why don't you go stick your head in a snow bank. :pissed: 
 :-D
Title: Re: Wall Intersection
Post by: SOFITO_SOFT on January 21, 2011, 03:00:59 PM
Helo:
you must not break the polylines .... lose the hatched asocitivity !
doubles the polys... and change the vertices of the new (one side of the crossing) and the former (the other side). -> is more comfortable and easier.