Visual LISP, AutoLISP and General Customization

## Visual LISP, AutoLISP and General Customization

Mentor
Posts: 1,678
Registered: ‎03-14-2004
Message 11 of 23 (145 Views)

# Re: Select Arcs by with Normal Z = -1

02-12-2013 06:35 AM in reply to: devitg

at least , not ay least

*Expert Elite*
Posts: 4,815
Registered: ‎09-13-2004
Message 12 of 23 (143 Views)

# Re: Select Arcs by with Normal Z = -1

02-12-2013 06:37 AM in reply to: Kent1Cooper

Kent1Cooper wrote:
.....  I gave a quick try to Mirror3D, but I must have been misunderstanding how to define the axis, because it didn't work.  ....

EDIT:  NO, hold off on that [I hadn't done something I should have....].  I was trying the Object option, which works manually, but doesn't accept an entity name in a (command) function.

Kent Cooper
*Expert Elite*
Posts: 2,215
Registered: ‎12-17-2004
Message 13 of 23 (131 Views)

# Re: Select Arcs by with Normal Z = -1

02-12-2013 07:10 AM in reply to: bhaushalter1

normal z=-1

command: flatten

nornal z = 1

Henrique

Mentor
Posts: 1,678
Registered: ‎03-14-2004
Message 14 of 23 (130 Views)

# Re: Select Arcs by with Normal Z = -1

02-12-2013 07:13 AM in reply to: hmsilva

Just SIMPLE , thanks

Active Member
Posts: 8
Registered: ‎02-11-2013
Message 15 of 23 (126 Views)

# Re: Select Arcs by with Normal Z = -1

02-12-2013 07:18 AM in reply to: devitg

Thanks again Guys for your invaluable help. I ended up finding a program and applying devitg's filter suggestion and it works great!!!!

(defun c:fliparcs3 (/ ss hpi en el)
(setq
ss (ssget "X" (list (cons 0 "ARC") (cons 210 '( 0 0 -1))))
hpi (* 0.5 pi)
)
(cond
(
(not (null ss))
(repeat (sslength ss)
(ssdel (setq en (ssname ss 0)) ss)
(setq el (entget en))
(entmod
(mapcar
(function
(lambda (x / g)
(setq g (car x))
(cond
((= g 10) (cons 10 (mapcar '* (list -1.0 1.0 -1.0) (cdr x))))
((= g 210) (cons 210 (mapcar '- (cdr x))))
((= g 50) (cons 50 (+ hpi (- hpi (cdr (assoc 51 el))))))
((= g 51) (cons 51 (+ hpi (- hpi (cdr (assoc 50 el))))))
(t x)
)
)
)
el
)
)
)
(princ "\nDone")
)
(t (princ "\nNothing selected"))
)
(princ)
)

*Expert Elite*
Posts: 2,215
Registered: ‎12-17-2004
Message 16 of 23 (124 Views)

# Re: Select Arcs by with Normal Z = -1

02-12-2013 07:22 AM in reply to: devitg

You're welcome, devitg

Active Member
Posts: 8
Registered: ‎02-11-2013
Message 17 of 23 (117 Views)

# Re: Select Arcs by with Normal Z = -1

02-12-2013 07:38 AM in reply to: hmsilva

hmsilva wrote:

normal z=-1

command: flatten

nornal z = 1

Henrique

I tried that originally but for some reason these DXF files will not convert to a joined polyline after using that command. If I flip the arcs with the normal z of -1 they will.

*Expert Elite*
Posts: 2,215
Registered: ‎12-17-2004
Message 18 of 23 (115 Views)

# Re: Select Arcs by with Normal Z = -1

02-12-2013 07:46 AM in reply to: bhaushalter1

bhaushalter1,

just flatten and pedit...

Henrique

Active Member
Posts: 8
Registered: ‎02-11-2013
Message 19 of 23 (105 Views)

# Re: Select Arcs by with Normal Z = -1

02-12-2013 08:56 AM in reply to: hmsilva

hmsilva wrote:

bhaushalter1,

just flatten and pedit...

Henrique

Interesting... I must be doing something wrong. Im new to ACad.  Below are my steps:

Command: ucs
Current ucs name:  *WORLD*
Specify origin of UCS or [Face/NAmed/OBject/Previous/View/World/X/Y/Z/ZAxis]
<World>: w
Command: plan
Enter an option [Current ucs/Ucs/World] <Current>:
Regenerating model.
Command: flatten
Select objects to convert to 2d...
Select objects: Specify opposite corner: 19 found
Select objects:
Remove hidden lines? <Yes>:
-
Command: pedit
Select polyline or [Multiple]:
Object selected is not a polyline
Do you want to turn it into one? <Y>
Enter an option [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype
gen/Reverse/Undo]: j
Select objects: 1 found
Select objects: 1 found, 2 total
Select objects: 1 found, 3 total
Select objects: 1 found, 4 total
Select objects: 1 found, 5 total
Select objects:

*Expert Elite*
Posts: 2,215
Registered: ‎12-17-2004
Message 20 of 23 (99 Views)

# Re: Select Arcs by with Normal Z = -1

02-12-2013 09:23 AM in reply to: bhaushalter1

bhaushalter1,

in this example, in the pedit command, I used the option multiple to be faster, and in this way created two polylines

Command: ucs
Current ucs name:  *WORLD*
Specify origin of UCS or [Face/NAmed/OBject/Previous/View/World/X/Y/Z/ZAxis]
<World>: w
Command: plan
Enter an option [Current ucs/Ucs/World] <Current>:
Regenerating model.
Command: flatten
Select objects to convert to 2d...
Select objects: all
19 found
Select objects:
Remove hidden lines? <No>:
Command: pe
PEDIT Select polyline or [Multiple]: Select polyline or [Multiple]: m
Select objects: all
19 found
Select objects:
Convert Lines, Arcs and Splines to polylines [Yes/No]? <Y>
Enter an option [Close/Open/Join/Width/Fit/Spline/Decurve/Ltype
gen/Reverse/Undo]: j
Join Type = Extend
Enter fuzz distance or [Jointype] <0.0000>:
17 segments added to 2 polylines

but if you select the objects in the orden which we want the polyline be joined, like the dwg I have attached you'll only get with one polyline

Command: pedit Select polyline or [Multiple]:
Object selected is not a polyline
Do you want to turn it into one? <Y>
Enter an option [Close/Join/Width/Edit vertex/Fit/Spline/Decurve/Ltype
gen/Reverse/Undo]: j
Select objects: 1 found
Select objects: 1 found, 2 total
Select objects: 1 found, 3 total
Select objects: Specify opposite corner: 13 found, 16 total
Select objects: 1 found, 17 total
Select objects: 1 found, 18 total
Select objects:

hope that helps

Henrique

Recently Solved