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.

New FeatureScript: Hose Routing

sebastian_glanznersebastian_glanzner Member, Developers Posts: 425 PRO
Hello Everyone,

Good News! I'm releasing my Hose Routing FeatureScript:

https://cad.onshape.com/documents/54d06a3b8abd1fcb0daba26b/w/00a336bf184d3800f0194a5c/e/e689b647e557695970d3d603

The FeatureScript uses Arcs and Circles as input (either from solids or sketches).
You don't need sketches at all, which makes it more efficient if you want to create hose routings in context.

Usage:
  1. Select the start of the hose
  2. Select the end of the hose
  3. Optional: Add midpoints between start and end (in the correct sequence)
  4. Use the flip direction buttons if the assumed direction is wrong (only start and end)
  5. Choose a hose size or use the "Custom Size" Button
  6. You can also edit the straightness but normally this is not necessary
There are some cases the FeatureScript can't find the correct path for the hose:
  • Try to use different "Mid points"
  • Flip the direction at start/end if necessary
  • Make sure the hose does not intersect itself

Thanks for the help, support, inspiration (Wiring FeatureScript :) ) and motivation:
@Jake_Rosenfeld
@ilya_baran
@romeo_graham392
@owen_sparks
@MBartlett21
«1

Comments

  • lougallolougallo Member, Moderator, Onshape Employees, Developers, csevp Posts: 2,004
    Nice job @sebastian_glanzner.  Might consider adding array parameters so you can nest multiple Hose routes in one feature.  Love this.
    Lou Gallo / PD/UX - Support - Community / Onshape, Inc.
  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    This looks wonderful, I'm enthusiastic to try it out tomorrow, thanks for making it public.
    Owen S.
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • michael_mcclainmichael_mcclain Member Posts: 198 PRO
    @sebastian_glanzner Good work and I really like using this feature for flexible tubing or cable routing with certain types of cable.

    Can I request some updates to it?

    I would like to be able to re-order mid point selection similar to how the loft command has right now. It would be very useful for changing midpoints without having to clear the selection.

    Regards, Michael
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    @sebastian_glanzner should be able to use the
    ALLOW_QUERY_ORDER 
    UIHint to allow query reorder. To learn more please see the UI Hint section of our documentation:
    https://cad.onshape.com/FsDoc/library.html#UIHint
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • sebastian_glanznersebastian_glanzner Member, Developers Posts: 425 PRO
    @michael_mcclain
    Thanks for the nice feedback. I am very happy that the feature is useful and hopefully saves a lot of time.
    I think your improvement idea is very good! I have updated the feature!  B)

    @TimRice
    Thanks for the support, that was exactly what I needed. It helped me a lot  :)
  • michael_mcclainmichael_mcclain Member Posts: 198 PRO
    @sebastian_glanzner thank you very much! And thank you to @TimRice for the help. That change makes the feature a bit more robust when facing downstream changes.

    I have a question about the feature. Is there a reason why you can select the ID and OD of the tube, but the geometry only shows the OD? Does it create self intersecting geometry when it Calculates?

    I think the feature is great and I end up using it a lot in my design work.

    Regards, Michael
  • sebastian_glanznersebastian_glanzner Member, Developers Posts: 425 PRO
    The ID is used only used for internal calculation of the density/mass.
    When I developed it I also used the ID for the inner geometry but the sweep command was quite time costly.
    This is the only reason. 

    Can you share a screenshot of some your work?
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,050 ✭✭✭✭✭
    TimRice said:
    @sebastian_glanzner should be able to use the
    ALLOW_QUERY_ORDER 
    UIHint to allow query reorder. To learn more please see the UI Hint section of our documentation:
    https://cad.onshape.com/FsDoc/library.html#UIHint
    @TimRice

    Will this UIHint get added to the 3d fit spline command at any point? It would be very useful
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • KrzKrz Member, Developers Posts: 68 ✭✭✭
    @sebastian_glanzner Could you please add icon?
  • sebastian_glanznersebastian_glanzner Member, Developers Posts: 425 PRO
    @Krz Icon added  :)
  • KrzKrz Member, Developers Posts: 68 ✭✭✭
    nice :-) It's easier to find it on the list now. Thank you
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    edited August 2019
    @MBartlett21

    This has now been released for the selections we thought were appropriate.  Feel free to let us know if there are any we did not make reorderable that you think should be.

    https://forum.onshape.com/discussion/12157/improvements-to-onshape-august-20th-2019
    Jake Rosenfeld - Modeling Team
  • andres_dandlerandres_dandler Member Posts: 17 PRO
    @sebastian_glanzner  Thank you for the feature!  It is excellent.  Could I make a request, please?  We are routing some hoses, and it is important to respect a minimum bending radius.  This way, we can avoid the tubing from kinking.  Would it be possible to set a minimum radius for the hose routing?
    Thanks again for an excellent feature.
  • sebastian_glanznersebastian_glanzner Member, Developers Posts: 425 PRO
    @andres_dandler Thanks for the feedback! 

    About the minimal radius:
    I'm not sure how to solve this. I think I would have to start a query that finds the smallest bend radius of all splines.
    I don't know if there is a command for this.

    @TimRice
    Is there a command to find the smallest bend radius on a spline?
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    I checked in with our internal FeatureScript team and @paul_chastell suggests calling evCurvature along a number of samples on the curve to get the largest curvature. Then 1/curvature = radius of curvature. Keep in mind this is an approximation. @ilya_baran also mentioned you should check tangency along the curve to ensure you do not miss small high curvature sections.
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • lanalana Onshape Employees Posts: 711
    @sebastian_glanzner
    FS does not have a way of finding min curvature radius, but there is evEdgeCurvatures, that you can call in multiple points and maximize curvature over that. You can do several iterations refining at promising areas. 
  • sebastian_glanznersebastian_glanzner Member, Developers Posts: 425 PRO
    Onshape is able to calculate the min. Radius by showing the curvature, which is really cool!



    Is there really no FeatureScript function?
  • sebastian_glanznersebastian_glanzner Member, Developers Posts: 425 PRO
    @andres_dandler I made a big update for the feature! It took me longer than I expected, but it was worth it!


    • You can set an custom minimal bend radius.
    • This feature extracts the minimum bending radius of each segment.
    • The smallest radius is displayed as info text when editing the feature.
    • If a bend radius smaller than the "minimum bend radius" is found, a warning is displayed and the feature shows a red question mark.
    • Any segment that violates the bend radius is also highlighted in red. 
    @TimRice @lana
    Thanks for your tips about the evEdgeCurvature :-)
  • TimRiceTimRice Member, Moderator, Onshape Employees Posts: 315
    @sebastian_glanzner
    I love all the UI/UX hints you added in. Nice work!
    Tim Rice | User Experience | Support 
    Onshape, Inc.
  • jonathan_monettejonathan_monette Member Posts: 34 ✭✭
    WOW great job Sebastian! very usefull
  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO
    i'll be giving this a tray thanks
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    i'll be giving this a tray thanks
    https://youtu.be/Sv5iEK-IEzw
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO
    Nice one! I won't edit, just for context. 
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • andres_dandlerandres_dandler Member Posts: 17 PRO
    Wow!  @sebastian_glanzner, this looks great!  I will give it a try.  Thank you so much!
      -Andres
  • victor_ragusilavictor_ragusila Member Posts: 8
    awesome! this is really cool. For my project, a humanoid robot, we have hydraulic hoses routed around joints. I am trying to make sure they dont change length as I look at different joint positions.
    I can position the joint however I want in the part studio using variables. Is there a way to specify length of hose, such that its length is kept constant at different positions?
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,938 PRO
    you can define the length of an arc or spline simple by adding a dimension.


  • victor_ragusilavictor_ragusila Member Posts: 8
    edited December 2019
    Thanks, I used that previously and I was able to build a somewhat decent sketch for that...but it cant be in 3D, only 2D. My question was whether the point-driven spline from the Hose Routing FeatureScript release is able to also have a total length defined.
  • sebastian_glanznersebastian_glanzner Member, Developers Posts: 425 PRO
    edited December 2019
    @victor_ragusila
    At the moment, you can configure the straightness values manually to get the same length in each position.
    I'm not sure how to do something like this automatically. 

    I created a small example and I can see why it is necessary to have a constant length for each position  :#




Sign In or Register to comment.