Jump to content

Recommended Posts

Posted

Dear Friends,

 

Greetings

 

I am trying to draw a rectangle on a 3d solid face, i am able to make my ucs to that face. But when i giving first corner & the opposite corner, the rectangle is aligning to the our view not to the ucs.

 

Once i pick the point in that condition, it is drawing as required to the face.

 

How to view the opposite corner to the ucs.

 

Please help me in this regard.

 

thanks in advance

 

Ramana

Posted

Can you post a sample? A '3D solid face' is a bit of oxymoron. -David

Posted

Dear David,

 

thanks for your reply, Please find the two images and the code which i developed to do a boolean operation in a solid.

(DEFUN C:window()
 (SETQ FACE(GETPOINT "PICK A POINT ON THE FACE"))
 (COMMAND "ucs" "F" FACE "")
 (SETQ W(ENTLAST))
 (SETQ P1(GETPOINT "START PT OF WINDOW")
   P2(GETCORNER P1 "OPP OF WINDOW"))
 (TRANS P2 1 1)
 (COMMAND "RECTANG" P1 P2)
 (SETQ W1(ENTLAST))
 (COMMAND "EXTRUDE" W1 "" -200)
 (SETQ W2(ENTLAST))
 (COMMAND "SUBTRACT" W "" W2 "")
 (princ)
 );defun

rectangle aligned to plane.jpg

rectangle not aligned to plane.jpg

Posted

the ucs command with the option face must select an object and not by specifying a point ..

e.g.

(if (setq obj (car (entsel "\n Select object :")))
 (command "_.ucs" "_face" obj "")
)

Posted

Dear Mr.Tharwat,

 

Thanks for your reply,

 

My program is working fine, but while specifing first corner and opposite corner of rectangle, that rectangle is showing alinging to the ucs. once i pick the opposite corner, then it is drawing rectangle with proper dimensions and 3D boolean is happening.

 

My query is while picking first corner and opposite corner of rectangle, those points should align to the ucs for the better understanding of the customization.

 

Ramana

Posted

So if I understood you well , replace this line of code with the one you have in yours .

 

(COMMAND "_.RECTANG" "_non" P1 "_non" P2)

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