0

I need to create screw shape using Eyeshot's libraries in .NET application.

In SolidWorks this is easily accomplished with creating the shape/profile that needs to be swept/stretched, and helix curve which is used as a rail or direction.

In SolidWorks positioning helix start point to some point in profile's diameter and using "Sweep" command results that point to be driven/rotated around the helix and the wanted shape is created.

SolidWorks example

In Eyeshot I create my profile as a LinearPath entity and use

SweepAsSolid(ICurve rail, double tol, sweepMethodType sweepMethod = sweepMethodType.RotationMinimizingFrames)

function but the result is different. It seems that SweepAsSolid function position helix start point in the center of the profile and different shape is created.

Is there a way to get wanted shape with Eyeshot's libraries using the same procedure as in SolidWorks?

1 Answers1

1

I think the method ExtrudeWithTwist() is what you are looking for:

            Point3D moveText = new Point3D(0,3,0);

            // new example
            Line l1 = new Line(-3, 0, 3, 0);
            Line l2 = new Line(3, 0, 3, 2);
            Line l3 = new Line(3, 2, -3, 2);
            Line l4 = new Line(-3, 2, -3, 0);

            CompositeCurve cc1 = new CompositeCurve(l1, l2, l3, l4);
 
            Surface[] loft1 = Surface.ExtrudeWithTwist(cc1, new Vector3D(0, 0, -10), new Point3D(0, 1, 0), Math.PI, 0.1);
            foreach (Surface s in loft1)
            {
                s.Translate(10, 0, 0);
            }
            model.Entities.AddRange(loft1, 0, Color.Orange);

the result

sgiulia
  • 31
  • 4