Jump to content

Filter for small parts (ssget)


halam

Recommended Posts

Hi there,

 

 

I am looking for a way to get rid of small volume parts in a DWG file.

In some cases we recieve the most 'dumbest' export models you can think of in DWG. Bolts and rings make the model very big and hard to handle. I did a small excercise and a small workaround will save at least 50% of the filesize! ..and loading time

 

 

Does any one can know if it is possible to filter 3D solids WITH a volume criteria? Can anybody help me a little to set this up in a decent matter? This would really be a big help for to get this working. Especially because we sometimes want 3D DWG to be used in Revit as well. Would be very handy to have a method to make the data more LEAN and reloadable. Clash detection on this level is totally irrelevant for us!

 

 

Thanks in advance

 

 

Hans

ISOLATE SOLID.LSP

Edited by halam
some typing im not goodat
Link to comment
Share on other sites

First step..

Selection set not to be based on volume but on Bounding box.

I tried Lee Mac's routine and this can work on 3D objects as well.

However, i do not know how to set the criteria (area) yet, put this in a selection set and loop it.

 

 

Kind of beyond my programming skills.

Maybe a small commercial tool would fill my needs?

Anyone know about this?

 

http://www.lee-mac.com/ssboundingbox.html

 

 

quote

 

 

"I think bounding box would be easier to obtain than volume.

Perhaps something like this (thrown together and untested):

 

(setq ObjectBoundingBox (GetBoundingBox CurrentEntityName))

(setq CompareBoundX (- (car ur) (car ll)))

(setq CompareBoundY (- (cadr ur) (cadr ll)))

(setq CompareBoundZ (- (caddr ur) (caddr ll)))

(setq ObjectVolume (* CompareBoundX CompareBoundY CompareBoundZ))

 

(defun GetBoundingBox (ent / obj)

(setq obj (vlax-ename->vla-object ent)

(vla-getBoundingBox obj 'll 'ur)

(setq ll (vlax-safearray->list ll)

ur (vlax-safearray->list ur)

);end setq

);end setq

);end defun

Edited by halam
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...