well I finally cleared my desk and got back to this - works like a charm Tony!
thanks
--
Princess Jamie,
Life shrinks or expands in proportion to one's courage.
- Anais Nin
"Tony Tanzillo" wrote in message news:5138867@discussion.autodesk.com...
Yes, the (trans) function accepts a Z-axis vector for the
or arguments. So, you can use the WCS
(0) for the argument, and the result of the call
to vector-cross as the argument.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"Jamie Duncan" wrote in message news:5138807@discussion.autodesk.com...
very nice - I'd have had to dig out my old linear algebra book - it's been
25 years since I loast looked at it..
Now the question - does this verctor cross product allow me to transform the
points into ocs? I need to z set to 0, and I know with ocs it's through the
origin - so no shift, but there must be the rotation of ucs about the z - or
is ocs always with 0 degree rotation?
--
Princess Jamie
"Tony Tanzillo" wrote in message
news:5138767@discussion.autodesk.com...
The UCS Z-axis normal is the cross product of the
UCS X and Y axes (UCSXDIR and UCSYDIR sysvars):
; (vector-cross )
;
; Returns the cross product of vectors v1 and v2.
(defun vector-cross (v1 v2)
(list (- (* (cadr v1)
(caddr v2))
(* (cadr v2)
(caddr v1)))
(- (* (caddr v1)
(car v2))
(* (caddr v2)
(car v1)))
(- (* (car v1)
(cadr v2))
(* (car v2)
(cadr v1)))
)
)
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"PJ" wrote in message
news:5138332@discussion.autodesk.com...
Hey Tony
so I found a quick and dirty way of doing it - create a pline using
vl-cmdf - obtain the 210 normal and use the entity name to
transform the points
somehow I should be able to do this by getting the normal from ucsxdir,
ucsydir, and ucsaxisang etc and using a trans matrix to
convert the points. not knowing the arbitrary axis theorem though makes
that beyond me now...any vlisp possibilities?
Thanks
--
Princess Jamie,
Life shrinks or expands in proportion to one's courage.
- Anais Nin
"Tony Tanzillo" wrote in message
news:5137833@discussion.autodesk.com...
Try changing to a UCS that's not parallel to the WCS,
and use the PLINE command to draw a lwpolyline.
The, do an (entget (entlast)) and look at the last
element in the returned list.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"Jamie Duncan" wrote in message
news:5137777@discussion.autodesk.com...
the points are derived from polar to a 'default' insertion point thus all
cals are in ucs. because I am using entmake I thought that I needed to
translate to wcs and now I see that the normal vector is needed.
I have no experience with this - any ideas?
--
Princess Jamie
wrote in message news:5137789@discussion.autodesk.com...
>>the functiin jddtrans simply translates a list of points.<<<
How are you aquiring/determining these points?
>>>this polyline will work in wcs - but won't for otyher ucs's.<<<
Wouldn't this be setting the points to the wcs?
(setq pt_list (jddtrans pt_list 1 0))
>>>any ideas on ocs transformation would help.<<<
OCS requires a transformation matrix or vla function "TranslateCoordinates
and the normal property"
>>>also the ins_pt and all point calcs are done in
world before using this function - which translates the point list from ucs
to world. any ideas?<<<
Again, how are you aquiring these point to begin with?
Bill