Jump to content

Recommended Posts

Posted

Good evening,

 

I have been frusturated for over an hour now at why i can't mirror the last selection. AAAAAAAHHHHHH!!!!!!

 

Any good reason as to why would be great, I just cant get it...

 

(command "-osnap" "nea,mid")
 (setq p1 (getpoint "\nSpecify insertion point of valve: "))
 (setq r1 (getangle p1 "\nSpecify direction of flow: " ))
 (setq r2 (angtos r1 0))
 (command "_.insert" (block_name2) "s" scale p1 r2)
 (setq r3 (atoi r2))
 (if (>= r3 90)
   (if (< r3 270)
     (progn (setq ss (ssget "_L"))
(command "mirror" "P" "" P1 R1))
     )
   )

 

And please don't go and say this has been covered, if you know what it is just tell me, you don't even have edit anything.

 

Thanks:),

 

Matt

Posted
You're using an angle, mirror takes two points.

Ok, that was the last thing I tried. Lets say that you inserted the block at p1 then rotated it to r2. its just that the block is between these values: >= 90degrees and

 

Matt

Posted

Use the polar function or otherwise to define the second point of your mirror axis.

Posted
Use the polar function or otherwise to define the second point of your mirror axis.

 

(polar pt ang dist)

 

How would the distance work in the polar function?

Posted
(polar pt ang dist)

 

How would the distance work in the polar function?

 

Got it with out polar...

 

  (setq p1 (getpoint "\nSpecify insertion point of valve: "))
 (setq p2 (getpoint p1 "\nSpecify direction of flow: " ))
 (setq r1 (angle p1 p2)
r2 (angtos r1 0))
 (command "_.insert" (block_name2) "s" scale p1 r2)
 (setq r3 (atoi r2))
 (if (>= r3 90)
   (if (< r3 270)
     (progn (setq ss (ssget "_L"))
(command "mirror" "P" "" P1 p2 "y"))
     )
   )

 

Thanks

Posted
(polar pt ang dist)

 

How would the distance work in the polar function?

 

To use the POLAR for your case, will have to input an arbitrary distance (i.e. 1.0) since you need to define only a direction between P1 and P2.

 

(setq P2 (polar P1 R1 1.0)

 

Regards,

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