Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Spirals?

don_williams909don_williams909 Member Posts: 138 PRO
Is there a feature script that creates a 2D spiral, from a given starting diameter, to ending diameter, over x degrees of rotation?

Comments

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,173
    Parametric curve can do this: https://cad.onshape.com/documents/578ff8b3e4b0e65410fcfda3  I don't know of a custom feature specifically for this case.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • don_williams909don_williams909 Member Posts: 138 PRO
    Yes, I see that it can do a 3D spiral, but I have no clue how that works, or how to get it to work as I described.
    Can you offer some help?

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,173
    Here's an example document: https://cad.onshape.com/documents/e8ddac56208e626aea470a7f/w/960ec1e9b0438f52cbbb76b8/e/e56c504367da67112fb9bc73

    The X and Y parameters of the parametric curve feature have the equations.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • don_williams909don_williams909 Member Posts: 138 PRO
    I see that it works, but how did you set up the parameters
    (x) #startRadius = 1
    (x) #endRadius = 3
    (x) #rotation = 90 deg

    ?

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,173
    I'm not sure what you mean -- they're just regular variables that I then reference in the X and Y equations.

    BTW, you can make a copy of my part studio, replace #startRadius, #endRadius, and #rotation with configuration variables, and then derive the spiral into your part studio.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • bruce_williamsbruce_williams Member, Developers Posts: 842 PRO
    @don_williams909
    main steps - 
    1) add the two feature scripts - #t Define Parameter and Parametric Curve
    2) Run Define Parameter (creates t)
    3) Build the variables and give them values
    4) Run Parametric Curve with formulas to produce desired curve

    What step are you questioning?
    www.accuratepattern.com
  • don_williams909don_williams909 Member Posts: 138 PRO
    edited December 2019
    @bruce_williams - I copied the feature scripts, and created "t".  It's Step 3 where I fall off the map.
    I have no clue how to "Build the Variables".
    I took Ilya's example and changed the values, and it doesn't work... it loses all the tangency.

    Or at least, I'm expecting it to look as tangent as his did.  I could very well be wrong.


  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,173
    What do you mean by "tangency"?  The spiral in your screenshot looks correct, given the values...
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • bruce_williamsbruce_williams Member, Developers Posts: 842 PRO
    @don_williams909
    Seems like you may be getting hung up on basics.  Instead of 'copying the feature script' you should add those FS to your toolbar. 

    On 'build variables' - I should have probably said 'create variables'.  That is done with standard variable feature.  You create the named variables to be used in the feature script 'Parametric Curve'.  Then when you run Parametric Curve, you need to enter a formula using t and your variables like @ilya_baran example.
    www.accuratepattern.com
  • don_williams909don_williams909 Member Posts: 138 PRO
    I think I'm looking at this incorrectly.  Apologies for assuming what it should look like when it's not the case.

  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    `opHelix` supports this if someone wants to take a crack at a "Spiral" custom feature.  Should be very simple.
    Jake Rosenfeld - Modeling Team
  • don_williams909don_williams909 Member Posts: 138 PRO
    Here's what I did, and I'm sure I have this all wrong.
    I copied the original file, saved the to feature scripts.
    I selected the #T FS, and it would seem that all I can do is hit the check mark...
    I then opened the Parametric curve FS, and copied the formulas from the original file into the X and Y fields.
    The FS would not accept the formulas.
    I seem to be missing some important steps?
  • bruce_williamsbruce_williams Member, Developers Posts: 842 PRO
    You do not mention creating the variables.  Look at the formulas you copy from the original.  They have variables - #startRadius, #endRadius, #rotation.  They need to be made with the standard variable feature before running Parametric Curve with the variable names used in formula as they are.

    See pics below.  Does your feature tree look like this?  The first pic shows creating the variable #startRadius; the 2nd shows where the variables are used in formulas in Parametric Curve.


    www.accuratepattern.com
  • steve_shubinsteve_shubin Member Posts: 1,066 ✭✭✭✭
    edited December 2019
    @don_williams909

    https://cad.onshape.com/documents/1c88574d442c89b0dbbd1e6c/w/b1a1a37b04758f14d0b35db8/e/26d52e6a01ab9d4d81b4638f

    If you find the variables and parametric curve method a bit much to deal with, there is an alternate way to get a 2d spiral. In the Features List, starting with Sketch 1, look at the last 5 features

    In a nutshell, this alternate method was made by —

    1. Create a cone
    2. Make a helix on the face of the cone
    3. Use the USE tool to project that helix down onto the top plane
    4. Trim the spiral to your desire

    This method took the same amount of features (steps) as using the parametric curve method, which is 5

    In the features list, Curve 1 was the spiral made using the PARAMETRIC CURVE method

    Sketch 3 was the spiral made using the CONE, HELIX and USE tool & TRIM method

    Notice that the 2 spirals, made with the two different methods, have the same shape.

    Now there may be a number of reasons why you would want to use the parametric curve method, but it’s always nice to have another method for handling a situation, just in case

  • bruce_williamsbruce_williams Member, Developers Posts: 842 PRO
    @steve_shubin
    great idea! 

    btw You amaze me with your skill at running Onshape on mobile.  It is inspiring to see mobile used so effectively. 
    www.accuratepattern.com
  • steve_shubinsteve_shubin Member Posts: 1,066 ✭✭✭✭
    @bruce_williams

    Thanks Bruce.

    It’s a fun app to use

  • MichaelPascoeMichaelPascoe Member Posts: 1,694 PRO
    This is not a 2d spiral, but in case you need solid body spiral try this feature out: Spiral

    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
Sign In or Register to comment.