Message 1 of 1
How to change size of cylinder surface?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hii....I want to change the size of cylinder surface or extrude that surface.Here attaching the code for extruding the plane surfaces .Can anyone help me for the cylindrical surface?
PartDocument doc = (PartDocument)mApplication.ActiveDocument;
PartComponentDefinition compDef = doc.ComponentDefinition;
SurfaceBody body = compDef.SurfaceBodies[1];
foreach (Face top in body.Faces)
{
PlanarSketches sketches = compDef.Sketches;
PartFeatures feats = compDef.Features;
//Face top = body.Faces[1];
PlanarSketch sketch = sketches.Add(top, true);
//sketch.Name = "TOP_SURFACE";
Profile profile = sketch.Profiles.AddForSolid();
ExtrudeDefinition def = feats.ExtrudeFeatures.CreateExtrudeDefinition(profile, PartFeatureOperationEnum.kSurfaceOperation);
def.SetDistanceExtent(1, PartFeatureExtentDirectionEnum.kPositiveExtentDirection);
ExtrudeFeature oExtrude = feats.ExtrudeFeatures.Add(def);
//oExtrude.Name = "Test";
}