[REQ] Selection by Surface ?
-
Maybe this yet existing ?
Selection by surface
Example : selection all facets > 13 m2
or Selection all facets < 8 m2 and > 23 m2
etc... -
Hi, Pilou:
I don't have an answer, but you got my vote. I think this is a good idea. -
sdmitch
Can I suggest some enhancements to your tool...
Useents=model.**active_**entities
- so it can be used inside a group etc.
Use@fbs_lt
etc rather$fbs_lt
etc as you get no benefit from using a global variable that is then accessible to all scripts and not just your own - and it might break another tool using the same name.
Use@fbs_lt=100**.0**
because setting it to an integer initially might preclude the user using a float value later.
Shouldn't the selection test be this?
sel.add(e) if e.area >= @fbs_gt * units_factor and e.area <= @fbs_lt * units_factor
[Your variables/prompts etc are a little confusing too - min/max would be clearer??]
You don't want to turn the value to an integer with@fbs_lt = ans[0].to_i
@fbs_lt = ans[0]
will do OR use.to_f
to ensure it's a float - though it will be anyway!
You could wrap you method in a module rather than expose it to the base class... BUT that's a lesson for another day...
-
Hello
yes something like that!
But seems there is something wrongHow have little surfaces? Not the bigs faces spherical < 6000 m2 ?
Seems there is not exclusive result!
-
Pilou, Are you trying to select only the faces that are < 6000m2? If so, setting the Greater Than value to 1000000 should exclude everything else.
TIG, Thanks for you comments. I admit that there are many areas and ways of improving the plugin but it is just something I through together in 30 minutes or less as a starting point.
-
AH OK!
that curious but that works
I have made empty value on "the Greater than" -
A new and improved fbs.rb is now available. Faces in groups and components are now checked along with all other faces in the model. Since the plugin is expecting numbers to be entered for the maximum and minimum areas, an empty entry is not valid.
If the "Area <" is less than the "Area >" an OR selection is made and all faces with an area less then the "Area <" value or an area greater than the "Area >" value are selected.
If the "Area <" value is greater than the "Area >" value an AND selection is made and all faces with an area greater than the "Area >" and less than the "Area <" value are selected.
For example, Area < 1000 and Area > 0 selects all faces with an area less than 1000. Area < 0 and Area > 1000 selects all faces with an area > 1000. Area < 2000 and Area > 1000 selects all faces with an area between 1000 and 2000. Area < 2000 and Area > 4000 selects all faces with an area less than 2000 or greater than 4000.
Advertisement