Cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this topic

How to use Extruded Draft

Pioneer
Pioneer

Hi.

I'm trying to create cone development.I have use "ExtrudedSurfaces.Add" API but it will not work.I have neglected crown argument.

Thanks.

~VPJ

Spoiler
Profiles Profs = Pdoc.ProfileSets.Add().Profiles;
Profile Prof = Profs.Add(TopPln);  // Plane selection
Relations2d Rels = (Relations2d)Prof.Relations2d;
Dimensions Dim = (Dimensions)Prof.Dimensions;

const double OD = 1.6;
const double height = 0.480;
const double angle = 60 * (Math.PI / 180);
const double thick = 0.006;

Circle2d c1 = Prof.Circles2d.AddByCenterRadius(0, 0, OD / 2.0);
Line2d LV = (Line2d)Prof.ProjectRefPlane(FrontPln);
Rels.AddKeypoint(c1, (int)igCircleCenter, LV, (int)igLineMiddle);

Dimension dimOD = Dim.AddCircularDiameter(c1);
dimOD.Constraint = true;
dimOD.TrackDistance = 0.015;

int stat = Prof.End(ProfileValidationType.igProfileClosed);
Debug.Assert(stat == 0);

//Create a Extruded surface
Profile[] profArr = new Profile[] { Prof };
// ExtrudedSurface mdl = Pdoc.Constructions.ExtrudedSurfaces.AddFinite(1, profArr, FeaturePropertyConstants.igRight, height);

ExtrudedSurface mdl = Pdoc.Constructions.ExtrudedSurfaces.Add(
NumberOfProfiles: 1,
ProfileArray: profArr,
ExtentType1: SolidEdgePart.FeaturePropertyConstants.igFinite,
ExtentSide1: SolidEdgePart.FeaturePropertyConstants.igRight,
FiniteDepth1: height,
TreatmentDraftSide1: SolidEdgePart.DraftSideConstants.seDraftInside,
TreatmentDraftAngle1: angle
);

//Create a Thicken feature

Model mdl2 = Pdoc.Models.AddThickenFeature(FeaturePropertyConstants.igRight, thick, 1, profArr);
Application.Exit();

 

Who Me Too'd this topic