grandhougday Posted June 1, 2013 Share Posted June 1, 2013 I need a lisp to explode a Cylindrical Solid shape. in fact explode 2 times. first it become to surface and after another explosion it become to two circles. then i want to do something with that circles. How i can do this? in VBA by Explode Function by default return objects: explodedObjects = BlockObj.Explode but how is it in lisp? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 1, 2013 Share Posted June 1, 2013 (vlax-invoke [color=green][/color] 'explode) Will return a list of exploded objects (where is the object to be exploded); note that this method will retain the original object. Quote Link to comment Share on other sites More sharing options...
pBe Posted June 1, 2013 Share Posted June 1, 2013 or (defun c:demo (/ qf) (setq qf (getvar 'Qaflags ) ) (setvar 'qaflags 1) (if (setq ss (ssget "_:L" '((0 . "3DSOLID")))) (progn (command "_explode" ss "") (command "_explode" "_Previous" "") (sssetfirst nil (ssget "P" '((0 . "[color=blue][b]CIRCLE"[/b][/color][color=black]))))[/color] (setvar 'qaflags qf) ) ) ) Quote Link to comment Share on other sites More sharing options...
vanowm Posted March 12, 2015 Share Posted March 12, 2015 Hello. I'm trying pBe's code on ruled surface: (defun c:demo (/ qf) (setq qf (getvar 'Qaflags ) ) (setvar 'qaflags 1) (if (setq ss (ssget '((100 . "AcDbPolygonMesh")))) (progn (command "_explode" ss "") (command "_explode" "_Previous" "") (sssetfirst nil (ssget "P" '((0 . "3DFACE")))) (setvar 'qaflags qf) ) ) ) but it returns Command: demoSelect objects: 1 found Select objects: _explode Select objects: 1 found Select objects: Command: _explode Select objects: _Previous 12 found 12 were not able to be exploded. Select objects: None found. Command: 1 Any ideas how I can retrieve 3dface's out of a ruled surface without possibly affecting the original surface? Thank you. Quote Link to comment Share on other sites More sharing options...
pBe Posted March 12, 2015 Share Posted March 12, 2015 (defun c:demo (/ qf) (setq qf (getvar 'Qaflags ) ) (setvar 'qaflags 1) (if (setq ss (ssget '((100 . [b]"Mesh"[/b])))) (progn [b] (command "_copy" ss "" "0,0" "@" "")[/b] (command "_explode" ss "") (sssetfirst nil (ssget "P" '((0 . "3DFACE")))) (setvar 'qaflags qf) ) ) ) Quote Link to comment Share on other sites More sharing options...
vanowm Posted March 13, 2015 Share Posted March 13, 2015 Thank you very much! The problem was (command "_explode" "_Previous" "") Removed that line and it worked. Copy object on top of itself also worked, thank you. P.S. rulesurf creates mesh with (100 . "AcDbPolygonMesh") Quote Link to comment Share on other sites More sharing options...
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.