Point1 and Point2 to Hatch

Point1 and Point2 to Hatch

k005
Advisor Advisor
1,949 Views
28 Replies
Message 1 of 29

Point1 and Point2 to Hatch

k005
Advisor
Advisor

Hello everyone


As I mentioned in the attachment, how can I have a solid scan automatically when I mark pt1 and pt2?


The place where I operate is a closed area...


Thanks.

 

 

SOLIDHATCH.jpg

0 Likes
1,950 Views
28 Replies
Replies (28)
Message 21 of 29

k005
Advisor
Advisor

Yes, of course. This may be what you mean by remembering. However, since there is no loop, it will be necessary to enter the command again. I want to add both cases to this code. I am also experimenting.


* Of course, it can still be used this way.


Thanks.

0 Likes
Message 22 of 29

CADaSchtroumpf
Advisor
Advisor
Accepted solution

So here is the version for a loop and memorization (and proposition) of the last value...

Message 23 of 29

k005
Advisor
Advisor

In one word, Super! 🤗


Thank you very much. @CADaSchtroumpf 

0 Likes
Message 24 of 29

calderg1000
Mentor
Mentor
Accepted solution

Regards @k005 

Try this little code, maybe it will help you.

 

(defun c:hh3 (/ p1 p2 s)
  (setq p1 (getpoint "\nPick Point 1: ")
        p2 (getpoint p1 "\nPick Point 2: ")
  )
  (command "_rectangle" p1 p2)
  (setq s (entlast))
  (command "_-hatch"
           "s"
           s
           ""
           "_P"
           "s"
           ""
           "_draworder"
           "l"
           ""
           "B"
           "_erase"
           s
           ""
  )
)

 


Carlos Calderon G
EESignature
>Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Message 25 of 29

k005
Advisor
Advisor

There was a small bug. This solved it. Thanks @calderg1000 

Message 26 of 29

k005
Advisor
Advisor

Hello my friend.


Can we revise the code in angled walls?

0 Likes
Message 27 of 29

k005
Advisor
Advisor

* I can make a front preparation with the UCS/E option for the angled wall in terms of helping ...

0 Likes
Message 28 of 29

Kent1Cooper
Consultant
Consultant

@k005 wrote:

Can we revise the code in angled walls?


If they're not orthogonal, then picking two points at opposite corners of the intended area would have an infinite number of valid results.  It is going to require something more than two points -- three should be enough, or two plus selection of some edge of the area to establish the angle.  But then it's not very much simpler than just using the native SOLID command [which will have you pick four points].

Kent Cooper, AIA
0 Likes
Message 29 of 29

k005
Advisor
Advisor

I think like this; First of all, if we change UCS/E and watch an approach. When I go to the angle of the angled line, a flat floor is formed again ... Here, even if there is no solid hatch. No problem. If we calculate the thickness of the wall and print it. It could be in a separate routine ... C: Ang.

0 Likes