<?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 Rotate3d with reference line in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rotate3d-with-reference-line/m-p/1749264#M150261</link>
    <description>Hello,&lt;BR /&gt;
I am trying to create a rotate3d lisp routine with the ability to rotate an object by defining a base point, a reference angle from a 3d line (or two 3d points), and a new angle defined in the same manner.&lt;BR /&gt;
Has anybody been down this path before?</description>
    <pubDate>Tue, 29 Aug 2006 14:16:05 GMT</pubDate>
    <dc:creator>james_hough</dc:creator>
    <dc:date>2006-08-29T14:16:05Z</dc:date>
    <item>
      <title>Rotate3d with reference line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rotate3d-with-reference-line/m-p/1749264#M150261</link>
      <description>Hello,&lt;BR /&gt;
I am trying to create a rotate3d lisp routine with the ability to rotate an object by defining a base point, a reference angle from a 3d line (or two 3d points), and a new angle defined in the same manner.&lt;BR /&gt;
Has anybody been down this path before?</description>
      <pubDate>Tue, 29 Aug 2006 14:16:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rotate3d-with-reference-line/m-p/1749264#M150261</guid>
      <dc:creator>james_hough</dc:creator>
      <dc:date>2006-08-29T14:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Rotate3d with reference line</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rotate3d-with-reference-line/m-p/1749265#M150262</link>
      <description>Hi james_hough,&lt;BR /&gt;
Here a sample to create rotate3d in 3d object.&lt;BR /&gt;
&lt;BR /&gt;
[code]&lt;BR /&gt;
(defun c:test (/ el1 el2 frad len loc p1 rad)&lt;BR /&gt;
  (command "_vpoint" "r" 275 35 "")&lt;BR /&gt;
  (setq loc '(0 0 0))&lt;BR /&gt;
  (setq rad 3)&lt;BR /&gt;
  (command "_circle" loc rad "")&lt;BR /&gt;
  (setq el1 (entlast))&lt;BR /&gt;
  (setq len 10)&lt;BR /&gt;
  (command "_extrude" el1 "" len 0 "")&lt;BR /&gt;
  (setq el2 (entlast))&lt;BR /&gt;
  (setq p1 (polar loc 0 2.5))&lt;BR /&gt;
  (setq p2 (polar p1 (* pi 0.25) 0.7071))&lt;BR /&gt;
  (setq p3 (polar p2 0 0.5))&lt;BR /&gt;
  (setq p4 (polar p3 (* pi 1.5) 1))&lt;BR /&gt;
  (setq p5 (polar p4 pi 1))&lt;BR /&gt;
  (command "_pline" p1 p2 p3 p4 p5 "c" "")&lt;BR /&gt;
  (setq el3 (entlast))&lt;BR /&gt;
  (if&lt;BR /&gt;
    (not (member "geom3d.arx" (arx)))&lt;BR /&gt;
    (arxload "geom3d")&lt;BR /&gt;
    )&lt;BR /&gt;
  (rotate3d el3 "x" p1 "r" 0 90)&lt;BR /&gt;
  (setq el4 (entlast))&lt;BR /&gt;
  (setq p6 (list (car loc)(cadr loc) 10))&lt;BR /&gt;
  (command "_line" loc p6 "")&lt;BR /&gt;
  (setq el5 (entlast))&lt;BR /&gt;
  (command "_revolve" el4 "" "o" el5 "")&lt;BR /&gt;
  (setq el6 (entlast))&lt;BR /&gt;
  (command "_erase" el5 "")&lt;BR /&gt;
  (command "_subtract" el2 "" el6 "")&lt;BR /&gt;
  (command "_shademode" "g")&lt;BR /&gt;
  (command "_3dorbit")&lt;BR /&gt;
  (princ)&lt;BR /&gt;
  )&lt;BR /&gt;
[/code]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;JAMES_HOUGH&gt; wrote in message news:5310852@discussion.autodesk.com...&lt;BR /&gt;
Hello,&lt;BR /&gt;
I am trying to create a rotate3d lisp routine with the ability to rotate an &lt;BR /&gt;
object by defining a base point, a reference angle from a 3d line (or two 3d &lt;BR /&gt;
points), and a new angle defined in the same manner.&lt;BR /&gt;
Has anybody been down this path before?&lt;/JAMES_HOUGH&gt;</description>
      <pubDate>Wed, 30 Aug 2006 00:21:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/rotate3d-with-reference-line/m-p/1749265#M150262</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-08-30T00:21:35Z</dc:date>
    </item>
  </channel>
</rss>

