How to change size of cylinder surface?

How to change size of cylinder surface?

supriya_chaugule
Contributor Contributor
174 Views
0 Replies
Message 1 of 1

How to change size of cylinder surface?

supriya_chaugule
Contributor
Contributor

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";
}
0 Likes
175 Views
0 Replies
Replies (0)