Message 1 of 3
Problem with extrude-cut through all entities

Not applicable
06-01-2018
05:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to create cut extrude through all objects. I tried to use ThroughAllExtentDefinition but it's not working because it returns NULL when I try to create extrude with this options.
Ptr<ExtrudeFeatureInput> extrudeInput = extrudes->createInput(profile, FeatureOperations::CutFeatureOperation);
Ptr<ThroughAllExtentDefinition> throughAll = ThroughAllExtentDefinition::create();
extrudeInput->setOneSideExtent(throughAll, ExtentDirections::NegativeExtentDirection);
Ptr<ExtrudeFeature> extrude = extrudes->add(extrudeInput);
I've tried to switch ExtentDirections from NegativeExtentDirection to PositiveExtentDirection, but it's still no working.
Ptr<ExtrudeFeatureInput> extrudeInput = extrudes->createInput(profile, FeatureOperations::CutFeatureOperation);
Ptr<ThroughAllExtentDefinition> throughAll = ThroughAllExtentDefinition::create();
extrudeInput->setOneSideExtent(throughAll, ExtentDirections::PositiveExtentDirection);
Ptr<ExtrudeFeature> extrude = extrudes->add(extrudeInput);
Its working when I am changing ThroughAllExtentDefinition to DistanceExtentDefinition with -100000 value, but I need make cut through all entities.
Ptr<ExtrudeFeatureInput> extrudeInput = extrudes->createInput(profile, FeatureOperations::CutFeatureOperation);
Ptr<ValueInput> distance = ValueInput::createByReal(-100000);
Ptr<DistanceExtentDefinition> distanceExtentDef = DistanceExtentDefinition::create(distance);
extrudeInput->setOneSideExtent(distanceExtentDef, ExtentDirections::PositiveExtentDirection);
Ptr<ExtrudeFeature> extrude = extrudes->add(extrudeInput);
What's the correct way to create Extrude Cut with ThroughAllExtentDefinition? Appreciate any help. Thanks.