MarcoW Posted October 19, 2011 Posted October 19, 2011 Is it possible to draw a 3D object by lisp? For example a box? The answer will be "yes" I am sure... But I just can't seem to find any info about it using my friend. If somebody would be so kind to give me some hints / keywords then I can dig up a little info. Thanks in advance! Quote
Tharwat Posted October 19, 2011 Posted October 19, 2011 I am not a 3d user , and this is what I come up with from the help . (vla-addbox (vla-get-ModelSpace (vla-get-ActiveDocument (vlax-get-acad-object)) ) (vlax-3d-point 0. 0. 0.) 1. 1. 1. ) Tharwat Quote
MarcoW Posted October 19, 2011 Author Posted October 19, 2011 Thanks Tharwat! It is a nice start. I went looking for the function vla-addbox. Creates a 3D solid box with edges parallel to the axes of the WCS. Signature RetVal = object.AddBox(Origin, Length, Width, Height) Object ModelSpace Collection, PaperSpace Collection, Block The object or objects this method applies to. Origin Variant (three-element array of doubles); input-only The 3D WCS coordinates specifying the origin of the box. This coordinate represents the center of the bounding box for the object, not a corner. Length Double; input-only The length of the box. Must be a positive number. Width Double; input-only The width of the box. Must be a positive number. Height Double; input-only The height of the box. Must be a positive number. RetVal 3DSolid object A 3DSolid object as the newly created box. A quick copy of the help menu I have found in an old version. I will dig into that! ;; Draws a box (defun c:test nil (vl-load-com) (vla-addbox (vla-get-ModelSpace (vla-get-ActiveDocument (vlax-get-acad-object)) ) (vlax-3d-point 0. 0. 0.) 1. 1. 1. ) ) ;_defun Any further info is also appreciated. Quote
Lee Mac Posted October 19, 2011 Posted October 19, 2011 You can create 3D Solids and Meshes, but not Surfaces. Quote
BIGAL Posted October 20, 2011 Posted October 20, 2011 Sorry Lee you can cheat on surfaces they can be made Macrow has not hinted to complex about what he is trying to achieve. use Thickness 3dface PFACE Only draw back is they are all single planar, pface works great for house roofs. Quote
Lee Mac Posted October 20, 2011 Posted October 20, 2011 Sorry Lee you can cheat on surfaces they can be made Macrow has not hinted to complex about what he is trying to achieve. Sorry, I was just referring to ActiveX: Surface object Access via: ModelSpace.Item PaperSpace.Item Block.Item SelectionSet.Item Group.Item This object provides access to surfaces in AutoCAD. It lets you manipulate properties of the surface. You cannot create a surface entity via ActiveX. Quote
Recommended Posts
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.