This function returns a particular intersection point between the curve and surface. intNum must be greater than zero and less than the total number of intersection points.the index is zero based
ID = BJ1-106
ID = BJ1-106
ID = BJ1-106
ID = BJ1-140
ID = BJ1-108
ID = BJ1-102
ID = BJ1-140
ID = BJ1-125
ID = BJ1-102
ID = BJ1-143
ID = BJ1-132
ID = BJ1-132
ID = BJ1-119
ID = BJ1-115
ID = BJ1-145
ID = BJ1-141
ID = BJ1-131
ID = BJ1-129
ID = BJ1-127
ID = BJ1-122
ID = BJ1-12
ID = BJ1-117
ID = BJ1-107
ID = BJ1-106
ID = BJ1-10
I grouped every pair of sphere-block, after using your lisp only spheres are selected not the entire group.
another way to link them?
tried Gccoincident but only works with 2d objects
Bummer, yeah you can probably get the solid and decode it (http://www.theswamp.org/index.php?topic=25097.0)
You should be able to build a list of planes from the face vertexs, then do the ray trace thing.
I noticed some plane functions here (http://www.theswamp.org/index.php?topic=40494.msg457913#msg457913)
here's the list of objects I found.. though it seems the ID is not uniqueQuoteID = BJ1-106
ID = BJ1-106
ID = BJ1-106
ID = BJ1-140
ID = BJ1-108
ID = BJ1-102
ID = BJ1-140
ID = BJ1-125
ID = BJ1-102
ID = BJ1-143
ID = BJ1-132
ID = BJ1-132
ID = BJ1-119
ID = BJ1-115
ID = BJ1-145
ID = BJ1-141
ID = BJ1-131
ID = BJ1-129
ID = BJ1-127
ID = BJ1-122
ID = BJ1-12
ID = BJ1-117
ID = BJ1-107
ID = BJ1-106
ID = BJ1-10
I grouped every pair of sphere-block, after using your lisp only spheres are selected not the entire group.
another way to link them?
tried Gccoincident but only works with 2d objects
For linking purposes, I stated GROUPS, but there are more ways : XDATA, LDATA, LAYER, and so on...
Could you try to GROUP/LINK by LAYER for ex...
After your SOLIDS have been highlighted, you could qselect with LAYER matching filter, and choose non SOLID entity types, do SELECT command, press ENTER, qselect with LAYER matching filter, choose only SOLID entity types, hit DEL and finally you'll have (sssetfirst nil (ssget "_P"))...
Marko, again asking for your help, would it be possible to modify your code so that, instead of checking for interference between each and every one of the solids, it would check only using the first one as a base/pivot and only those that interfere with it?
Marko, again asking for your help, would it be possible to modify your code so that, instead of checking for interference between each and every one of the solids, it would check only using the first one as a base/pivot and only those that interfere with it?Code: [Select](defun c:chk3DSOLint ( / *error* s sol_ sol n interf sol_interf ss )
(vl-load-com)
(defun *error* ( msg )
(vla-endundomark (vla-get-activedocument (vlax-get-acad-object)))
(if msg (prompt msg))
(princ)
)
(vla-startundomark (vla-get-activedocument (vlax-get-acad-object)))
(if (and
(princ "\nSelect MAIN 3D SOLID")
(setq s (ssget "_.+:E:S" '((0 . "3DSOLID"))))
(princ "\nSelect CHECKING 3D SOLIDS")
(while (null sol_)
(setq sol_ (ssget "_:L" '((0 . "3DSOLID"))))
(if (null sol_) (prompt "\nEmpty sel. set... Try selecting again...") sol_ )
)
)
(progn
(repeat (setq n (sslength sol_))
(setq sol (cons (ssname sol_ (setq n (1- n))) sol))
)
(mapcar
(function (lambda ( a )
(if (vla-CheckInterference (vlax-ename->vla-object a) (vlax-ename->vla-object (ssname s 0)) :vlax-true 'test)
(progn
(setq sol_interf (cons a sol_interf))
(entdel (entlast))
(setq interf (1+ interf))
)
)
))
sol
)
(setq ss (ssadd))
(foreach ent sol_interf (ssadd ent ss))
(sssetfirst nil ss)
(princ
(strcat
"\nNumber of checked 3D SOLIDS : " (itoa (sslength ss))
"\nNumber of interferences : " (itoa interf)
)
)
)
)
(vla-endundomark (vla-get-activedocument (vlax-get-acad-object)))
(princ)
)
HTH.
I've fixed it in my post...
I've fixed it in my post...
perfect! thanks a lot man.
the code from last post it's not working for some reason, but with the one you just fixed it's more than enough.
I've fixed it in my post...
perfect! thanks a lot man.
the code from last post it's not working for some reason, but with the one you just fixed it's more than enough.
Can you check it once again, have changed some minor mistakes...
I've fixed it in my post...
perfect! thanks a lot man.
the code from last post it's not working for some reason, but with the one you just fixed it's more than enough.
Can you check it once again, have changed some minor mistakes...
still error, but not the same, if I select "BB" it says "bb too few actual parameters".
if I choose "SPH" it creates a sphere only in one block and then it says "bad argument type: stringp nil".
Maybe I am not following the procedure as requested by the lisp, as I understand now you can directly select the blocks, but they need to be grouped with a solid? a sphere inserted inside the same block?
What would be an input entity?
It works, but during debugging, I've noticed that rectangular Bounding Box 3DSOLIDS (height = 1e-3) don't match position of blocks - it looks that perhaps that small height (1e-3) causes that blocks don't overlap with their linking 3DSOLID - with spheres it's all well... Don't know, try changing that height to something more reliable, but can't guess what would it be...
QuoteIt works, but during debugging, I've noticed that rectangular Bounding Box 3DSOLIDS (height = 1e-3) don't match position of blocks - it looks that perhaps that small height (1e-3) causes that blocks don't overlap with their linking 3DSOLID - with spheres it's all well... Don't know, try changing that height to something more reliable, but can't guess what would it be...
I've figured it out :
vla-addbox looks for first argument as center of box - i.e. (mid minpt maxpt) and I thought it should be just minpt... Fixed all - should work as expected...