Model.sketchintersect#
- Model.sketchintersect(sketch_id, collection, create_entities=0, only_displayed=1, planeDimension=0.0)#
Adds intersected curves into the sketch by intersecting selected entities with the sketch work plane.
- Parameters:
sketch_id (unsigned int) – The ID of the sketch entity.
collection (Collection) – The collection containing the entities to intersect with the sketch. Valid entities are parts, solids and surfaces.
create_entities (unsigned int) –
0 - Intersected curves are added as guide curves in the sketch.
1 - Intersected curves are added as sketch geometries.
only_displayed (unsigned int) –
0 - All entities in the input
collectionare considered.1 - Only displayed entities in the input
collectionare considered.planeDimension (double) – Reserved for future development
Example#
Add intersected curves as sketch geometries by intersect the work plane of sketch with ID 5 with all displayed solids#import hm import hm.entities as ent model = hm.Model() model.sketchintersect( sketch_id=5, collection=hm.CollectionByDisplayed(model, ent.Solid), create_entities=1, only_displayed=1, )