<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Draw a rectangular box knowing two base center points, its width and height. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11900308#M31453</link>
    <description>&lt;P&gt;I can get you partially there with a Square when Width=Height by using command:&lt;/P&gt;&lt;P&gt;POLYGON&lt;/P&gt;&lt;P&gt;4 sides&lt;/P&gt;&lt;P&gt;center is C1&lt;/P&gt;&lt;P&gt;Circumscribed option&lt;/P&gt;&lt;P&gt;Radius is Width or Height divided by 2&lt;/P&gt;&lt;P&gt;Then use the following command to create the BOX:&lt;/P&gt;&lt;P&gt;Extrude&lt;/P&gt;&lt;P&gt;Last&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Direction&lt;/P&gt;&lt;P&gt;C1&lt;/P&gt;&lt;P&gt;C2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 16 Apr 2023 23:26:10 GMT</pubDate>
    <dc:creator>paullimapa</dc:creator>
    <dc:date>2023-04-16T23:26:10Z</dc:date>
    <item>
      <title>Draw a rectangular box knowing two base center points, its width and height.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11900244#M31452</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Objectif: Draw a rectangular box knowing center of two base, width and height:&lt;/P&gt;&lt;P&gt;Input:&lt;/P&gt;&lt;P&gt;- center point C1 = '(x1 y1 z1) of the first base&amp;nbsp;&lt;/P&gt;&lt;P&gt;- center point C2 = '(x2 y2 z2) of the second base&lt;/P&gt;&lt;P&gt;- Width and Height.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AskFor.PNG" style="width: 651px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1203048i83C6B9A28F26805F/image-size/large?v=v2&amp;amp;px=999" role="button" title="AskFor.PNG" alt="AskFor.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you know, BOX command asks for P1 P2 P3 and P4 points (see picture, red points), but for us the input we know are only Center1, Center2, Width and Height.&lt;/P&gt;&lt;P&gt;It's a geometric issue, but you may have idea to help...&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 16 Apr 2023 22:25:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11900244#M31452</guid>
      <dc:creator>Kh.mbkh</dc:creator>
      <dc:date>2023-04-16T22:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangular box knowing two base center points, its width and height.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11900308#M31453</link>
      <description>&lt;P&gt;I can get you partially there with a Square when Width=Height by using command:&lt;/P&gt;&lt;P&gt;POLYGON&lt;/P&gt;&lt;P&gt;4 sides&lt;/P&gt;&lt;P&gt;center is C1&lt;/P&gt;&lt;P&gt;Circumscribed option&lt;/P&gt;&lt;P&gt;Radius is Width or Height divided by 2&lt;/P&gt;&lt;P&gt;Then use the following command to create the BOX:&lt;/P&gt;&lt;P&gt;Extrude&lt;/P&gt;&lt;P&gt;Last&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Direction&lt;/P&gt;&lt;P&gt;C1&lt;/P&gt;&lt;P&gt;C2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Apr 2023 23:26:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11900308#M31453</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2023-04-16T23:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangular box knowing two base center points, its width and height.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11900392#M31454</link>
      <description>&lt;P&gt;Your talking about a SOLID Box ? So you have distance between pt1 pt2 as the length so need width and extrusion height, so just do that use solid box command then do a rotate and move to the 2 points.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 00:36:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11900392#M31454</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-04-17T00:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangular box knowing two base center points, its width and height.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11900716#M31455</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;I like where you're going with this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8942850"&gt;@Kh.mbkh&lt;/a&gt;&amp;nbsp;see example pix below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paulli_apa_0-1681710111865.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1203123i078DE62C60A5E8D9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="paulli_apa_0-1681710111865.png" alt="paulli_apa_0-1681710111865.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 05:42:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11900716#M31455</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2023-04-17T05:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangular box knowing two base center points, its width and height.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11900853#M31456</link>
      <description>&lt;P&gt;hey,&lt;/P&gt;&lt;P&gt;just box with width, height and depth&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(setq center_point_1 '(-100. 150. 200.))
(setq center_point_2 '(300. -50. -400.))
(setq height 130.)
(setq width 50.)
;(command "_line" center_point_1 center_point_2 "")
(command "_rectang" "_non" (list (* -1 0.5 height) (* -1 0.5 width)) "_non" (list (* 0.5 height) (* 0.5 width)))
(setq profile_object (vlax-ename-&amp;gt;vla-object (setq profile_ename (entlast))))
(setq divider (apply 'max (mapcar 'abs (mapcar '- center_point_1 center_point_2)))) 
(vla-put-normal profile_object (vlax-3d-point (mapcar '/ (mapcar '- center_point_1 center_point_2) (list divider divider divider))))
(vla-move profile_object (vlax-3d-point '(0 0 0)) (vlax-3d-point center_point_1)) 
(command "_extrude" profile_ename "" "_d" center_point_1 center_point_2)    &lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 17 Apr 2023 07:32:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11900853#M31456</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2023-04-17T07:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangular box knowing two base center points, its width and height.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11901705#M31457</link>
      <description>&lt;P&gt;Thank you for your time:&lt;/P&gt;&lt;P&gt;I did thoses steps:&lt;/P&gt;&lt;P&gt;-Command box - Center (Select midpoint of Center1-Center2) - Length (Insert my length = distance between center1 and center2) - Width (Insert my width) - Then, autocad asks to insert height or 2Points, I tried both height and 2Points, but can't draw the correct box.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AskFor2.PNG" style="width: 795px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1203249iF0F17769355EE622/image-size/large?v=v2&amp;amp;px=999" role="button" title="AskFor2.PNG" alt="AskFor2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 13:57:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11901705#M31457</guid>
      <dc:creator>Kh.mbkh</dc:creator>
      <dc:date>2023-04-17T13:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangular box knowing two base center points, its width and height.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11901739#M31458</link>
      <description>&lt;P&gt;You forgot the step before the Box command which is:&lt;/P&gt;&lt;P&gt;UCS&amp;nbsp;&lt;/P&gt;&lt;P&gt;ZAxis&lt;/P&gt;&lt;P&gt;Center1&lt;/P&gt;&lt;P&gt;Center2&lt;/P&gt;&lt;P&gt;now do the Box command sequence then for height you can pick either Center1 or Center2&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 14:06:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11901739#M31458</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2023-04-17T14:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangular box knowing two base center points, its width and height.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11902088#M31459</link>
      <description>Good, but I may need to calculate new coordinate (In new systeme) for each point (Box center point - center1 - center2 ); because when I run Box command - center (I inserted coordinate of Box center point in old systme W-UCS) , so here "No Center found for specified point".&lt;BR /&gt;Maybe need to calculate new coordinate in the new UCS ?</description>
      <pubDate>Mon, 17 Apr 2023 16:03:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11902088#M31459</guid>
      <dc:creator>Kh.mbkh</dc:creator>
      <dc:date>2023-04-17T16:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Draw a rectangular box knowing two base center points, its width and height.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11902105#M31460</link>
      <description>&lt;P&gt;Yes all points now need to be entered in the current ucs or use lisp trans function to translate the coordinates from one ucs to another:&lt;/P&gt;&lt;P&gt;&lt;A href="http://docs.autodesk.com/ACD/2013/ENU/index.html?url=files/GUID-1A316343-0B68-4DBE-8F49-B4D601CB8FCC.htm,topicNumber=d30e633480" target="_blank"&gt;http://docs.autodesk.com/ACD/2013/ENU/index.html?url=files/GUID-1A316343-0B68-4DBE-8F49-B4D601CB8FCC.htm,topicNumber=d30e633480&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 16:09:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/draw-a-rectangular-box-knowing-two-base-center-points-its-width/m-p/11902105#M31460</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2023-04-17T16:09:30Z</dc:date>
    </item>
  </channel>
</rss>

