Base revolve sketch

sketcher2.png

Sketch sk1 = new Sketch();

SketchLine[] segments = sk1.AddPolygon(
    new Point2D(0, 0),
    new Point2D(130, 0),
    new Point2D(130, 53),
    new Point2D(116, 53),
    new Point2D(116, 37.5),
    new Point2D(98, 37.5),
    new Point2D(98, 53),
    new Point2D(0, 53)
);

// hor/ver constraints
sk1.AddConstraintHorizontal(segments[0]);
sk1.AddConstraintVertical(segments[1]);
sk1.AddConstraintHorizontal(segments[2]);
sk1.AddConstraintVertical(segments[3]);
sk1.AddConstraintHorizontal(segments[4]);
sk1.AddConstraintVertical(segments[5]);
sk1.AddConstraintCollinear(segments[2], segments[6]);
sk1.AddConstraintVertical(segments[7]);

// dimensions
sk1.AddConstraintLength(segments[0]);
sk1.AddConstraintLength(segments[1]);
sk1.AddConstraintLength(segments[2]);
sk1.AddConstraintLength(segments[4]);
sk1.AddConstraintDistance(segments[0], segments[4]);

SketchPoint origin1 = sk1.AddOrigin();

sk1.AddConstraintPointOn(origin1, segments[0]);
sk1.AddConstraintPointOn(origin1, segments[7]);

sk1.Solve();
SketchEntity skEnt1 = new SketchEntity(sk1);

design1.Entities.Add(skEnt1);
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.