[brlcad-tracker] [ brlcad-Feature Requests-1677383 ] need tool to list empty trees
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: SourceForge.net <no...@so...> - 2007-03-09 16:45:08
|
Feature Requests item #1677383, was opened at 2007-03-09 11:08 Message generated for change (Comment added) made by lbutler You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640805&aid=1677383&group_id=105292 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Geometry Editing Group: Minor Effort Status: Open Resolution: None Priority: 8 Private: No Submitted By: Dwayne (dwaynelk) Assigned to: Lee Butler (lbutler) Summary: need tool to list empty trees Initial Comment: Converted geometry often contains empty trees. Need capability to list and remove empty trees. ---------------------------------------------------------------------- >Comment By: Lee Butler (lbutler) Date: 2007-03-09 11:45 Message: Logged In: YES user_id=1179270 Originator: NO Save the attached file and "source" it into mged. Then run the "empty_combs" command. It will report the empty combinations found. If you provide an argument to the empty_combs command, it is taken as a file to write the list into. File Added: foo.tcl ---------------------------------------------------------------------- Comment By: Dwayne (dwaynelk) Date: 2007-03-09 11:34 Message: Logged In: YES user_id=1209946 Originator: YES While I'm asking. Another useful option would remove empty combinations from a database. ---------------------------------------------------------------------- Comment By: Dwayne (dwaynelk) Date: 2007-03-09 11:28 Message: Logged In: YES user_id=1209946 Originator: YES Thank you. How could I change the script to output the list to a text file? ---------------------------------------------------------------------- Comment By: Lee Butler (lbutler) Date: 2007-03-09 11:24 Message: Logged In: YES user_id=1179270 Originator: NO Sure. To list the empty combinations, the following Tcl would do the trick: set glob_compat_mode 0 foreach comb [ls -c] { set t [get $comb tree] if { [string length $t] < 1} { puts $comb } } set glob_compat_mode 1 This will list the empty combinations in the geometry file. I can create an MGED command. What do you think this should be called? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640805&aid=1677383&group_id=105292 |