Compression spring

Use the following code to model a compression spring.

2019-07-02_15-24-07.png

LinearPath lp = LinearPath.CreateHelix(10, 8, 4, false, 0.25);

Curve rail = Curve.CubicSplineInterpolation(lp.Vertices);

Plane normalToRail = new Plane(rail.StartPoint, rail.StartTangent);

model1.Entities.Add(new PlanarEntity(normalToRail, 5), model1.Layers[0].Name, Color.Magenta);

devDept.Eyeshot.Entities.Region sectionReg = devDept.Eyeshot.Entities.Region.CreateCircle(normalToRail, 2);

Brep compressionSpring = sectionReg.SweepAsBrep(rail, .1, sweepMethodType.RoadlikeTop);

model1.Entities.Add(compressionSpring, model1.Layers[0].Name, Color.SlateGray);

Previous versions of this article: Eyeshot 10

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.