Model.delete_logo#
- Model.delete_logo(collection, max_height, max_size, concavity_factor)#
Removes small geometric features that represent company logos from the model design.
- Parameters:
collection (Collection) – The collection containing the surface or solid entities for logo removal.
max_height (double) –
The maximum height/depth of a letter in the logo, as measured normal to the “shiny” surface.
If a negative value is provided, the max height is auto-calculated based on the geometry dimensions.
max_size (double) –
The maximum size of a letter in the logo, as measured along/parallel to the “shiny” surface.
If a negative value is provided, the max size is auto-calculated based on the geometry dimensions.
concavity_factor (double) –
Creates a filter to provide more flexible control of automatic logo recognition. This is a heuristic tool and may remove real features (such as flat bottom round dimples) which are not intended for removal.
This is a quantitative measure of a letters’ shape complexity, formally defined as (contour_accumulated_turn_angle/360)-1. The contour_accumulated_turn_angle is the sum of angles between a letters’ contour straight parts. Curved parts of a contour letter are approximated by a segmented line composed of short straight segments. For completely concave contours (such as circles, quads and hexagons) the
concavity_factor=(360/360)-1=0.0. To extend the recognition and removal of logos, this value should be reduced.
Examples#
Remove logos from all surfaces , use a max size of 30.0 , a max height of 1.1 and a concavity factor of 2.0#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains all the surfaces surface_collection = hm.Collection(model, ent.Surface) model.delete_logo( collection=surface_collection, max_height=1.1, max_size=30.0, concavity_factor=2.0 )
Remove logos from all surfaces , auto - calculate the max height and size with a concavity factor of 2.0#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains all the surfaces surface_collection = hm.Collection(model, ent.Surface) model.delete_logo( collection=surface_collection, max_height=-1.0, max_size=-1.0, concavity_factor=2.0 )