How to make a sketch entity into a query?

nir_naron
nir_naron Member Posts: 26 EDU
<b><i>           "startPoint" : point1,</i></b>                "interval" : [0, 10],
                "clockwise" : true,
                "helicalPitch" : 0.1 * inch,
                "spiralPitch" : 0 * inch
        });
        
        skSolve(sketch1);        skCircle(sketch1, "circle1", {
                "center" : vector(0, 0)*meter,
                "radius" : BigRad});       
        skPoint(sketch1, "point1", {
                "position" : vector(0*meter, BigRad)});
        <strike>//definition.point1 is Query;      
        //var point1 = definition.point1;
        //println(point1);</strike>
        
        opHelix(context, id + "helix1", {
                "direction" : sketchPlane2["normal"],
                "axisStart" : Center,

In this code, I am making a sketch, add a circle to it, and a point onto said circle. I then want that point to be used as the "startPoint" of a Helix, but an error pops up saying "varieble point1 is not found". How can I use point1 as the start point for said Helix?

Best Answer

  • Jed_Yeiser
    Jed_Yeiser Member Posts: 62 PRO
    Answer ✓
    @nir_naron - opHelix requires a point (type Vector) as the startPoint. There is no need to sketch a circle to get this point - you're specifying the center of the circle with a vector already! Use this vector as the startPoint of the helix, and you should be all set. 

Answers

  • Jed_Yeiser
    Jed_Yeiser Member Posts: 62 PRO
    Answer ✓
    @nir_naron - opHelix requires a point (type Vector) as the startPoint. There is no need to sketch a circle to get this point - you're specifying the center of the circle with a vector already! Use this vector as the startPoint of the helix, and you should be all set.