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.

Hose/tube/wire routing workflows

michael_mcclainmichael_mcclain Member Posts: 198 PRO
Hello all,

I am tasked with routing many tubes in a complex system.

I am currently using the Hose Routing custom feature: https://cad.onshape.com/documents/54d06a3b8abd1fcb0daba26b/v/16f739552dcdf3d410138b57/e/e689b647e557695970d3d603
I am using a combination of circular faces, cylindrical surface extrusions, & sketched circles to route tubes, but I find it to be a lot of work.

I would like to ask the community for workflows, and tips & trick to routing tubing, wiring, hoses, etc...

I am also wondering if someone has a featurescript that uses spatial points (maybe x,y,z coordinates) to pass a 3D curve through and then sweeps a circle profile along the curve path. I am not very familiar with featurescript or I would attempt it.

Thank you, Michael

Comments

  • tomasz_szwarc457tomasz_szwarc457 Member Posts: 7 PRO
    Hi,
    I'm now facing same issue with our projects and found that: https://rustyshed.com/?quill=5ef402aa2094fd499f1372ea
  • dirk_van_der_vaartdirk_van_der_vaart Member Posts: 549 ✭✭✭
    Try this one? FeatureScript Wiring


  • EvanReeseEvanReese Member, Mentor Posts: 2,188 ✭✭✭✭✭
    edited February 2022
    Hey Michael, I use two of my own features for this; Freeform Spline for the routing, and Wire for the sweep (I'm just making this one public today!). If you're routing hoses and have interest in some Featurescript practice, maybe you could copy the parts of the Hose FS that you need to get all of the standard sizes, and smash it together with my Wire feature to make a Hose feature.
    Evan Reese
  • eric_pestyeric_pesty Member Posts: 1,951 PRO
    I haven't found the "wiring" feature to be that helpful as there isn't enough control on the shape. I have instead been using the "freeform spline" and sweeps pretty effectively (I recommend the pattern and sweep feature if need to do several so you don't need to draw the circle for each sweep).
    I also created a custom feature for small "jumpers": basically just a feature that creates as spline between 2 points and a circular sweep (with some basic control for tangency), I don't think it's quite good enough for "general consumption" by the public yet but maybe I'll get it to that point eventually!
    If I have a jacketed cable in my assembly I use the freeform spline to get close to the end, and then create the last little bit using these "jumpers". 
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,071 PRO
    edited February 2022
    This is the workflow I've been using to manage cabling/piping and any routed part.

    I'm using incontext to route my cables. In an assembly, I define a part studio at the assemblies origin and then double click a part inside the part studio. This takes me to the part studio with the assembly ghosted. Then I copy faces using offset surface with a 0 distance which gives me a local reference that's tied back to the assembly. After copying some geometry local, I proceed to route the cables with the local references. If the assembly changes, then the local references update causing the cable to update. Throughout the design process, cable tie points will change which are handled with incontext, deleted or added references will manually need to edited in the cable part studio. Setting this arrangement up will allow you to mindlessly maintain a cabling layout.

    Updating the top assembly becomes tiresome when adding new cables from a part studio so I create a separate assembly just for the cables. Everytime I add a new cable, I delete all the cables in the cable assembly and then add them all from the part studio. I do this so I don't have to remember which cable I just created and which one needs to be inserted into the top level.

    Having all the cables in a sub-assembly is just a clean way to manage all your cables in a top assembly.

    Here's my top level with a cable sub-assembly:



    I double click a cable to edit the cable part studio in context:

    You've gotta have a part in a part studio before making the part studio visible and using incontext. Also, after deleting this seed part studio, you'll have to deal with primary instance. I let you ask OS why there's an primary instance.


    Incontext, I copy face local in the part studio using offset surface with a value 0:

    I do tend to keep the offset faces organized to help manage changes.


    Then you define your cable, @Evan_Reese cabling is looking good:

    After I have the local references, I turn off incontext. The cables are referencing a local instance of the assemblies geometry using assembly references or incontext references (whatever you want to call them).


    Instead of returning to the top assembly, I create an intermediate assembly for the cables:

    After each edit/cleanup of cables, I delete all the cables and just re-add them to this assembly. I don't have to remember which cable I just added.


    Back to the top-level assembly, the cable assembly automatically updates with my changes:

    I do this a lot and I don't have to think about what's going on. As the design progresses, cables will fail. This is a mindless workflow that you can perform without thinking about what changed and fixing issues caused by changes.
    '

    I wrote a cabling program but never finished it, it's something I want to do. The relationship between a part studio and an assembly isn't well defined leaving us to develop work arounds to accomplish simple things ie.. like having an assembly for every part studio. When I get some time I'm hoping to write up a bitch to OS and have some things changed with respect to the relationship of part studios and assembles.

    Right now this workflow is working fine but it could be easier and more intuitive.







  • eric_pestyeric_pesty Member Posts: 1,951 PRO
    @billy2
    Just slightly curious about the "offset face" part of your process... I guess the biggest benefit would be that you can then use mate connectors to directly reference "routing points" that are in free space as I do find it unfortunate that you can't directly reference the centerpoint of a context face (for example) when using something like the freeform spline... What happens when face reference go missing? I assume the entire surface and reference break and any downstream relations need to be fixed after rebuilding the surface?

    I have been creating sketches on context faces for this and for example if I have a 6position connector I will create a sketch and put a pattern with the correct connector pitch in the sketch, this way if you do break the reference it's quicker to fix than fixing 6 references...

    I like to just create a composite of the wires at the end and insert that in my assembly (instead of a sub-assembly). It's also a good way to create configurations of the wire (for example a "door closed" and "door open") by configuring the selection set of the composite.
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,071 PRO
    edited February 2022
    @eric_pesty how do you create a freeform spline?

    It could be a difference in how the cable feature scripts are written. I use mate connectors for my feature script when selecting node points for my cable and ignore direction except at the ends. I like them because they're 3D and I can establish offsets from geometry which cabling does do in reality. I'm not sure how Evan defines his knots in his freeform spline and I'm not sure how OS constrains a 3d point in space. I don't think OS has a 3d point. I do know I didn't want to deal with 2d sketch points and their constraints.  

    Turns out you can't add a mate connector to incontext geometry, thus making it necessary to copy geometry locally. To copy faces it's an offset surface command. I do like the simplified rep of the geometry when doing this even though I have to maintain it. I also like the ability to turn off incontext when routing cables and only use select faces. The downside is that I have to remember to offset surface any newly added faces to the cable part studio. It'd be better to add mate connectors directly to incontext geometry but OS doesn't support that.

    As far as deleting a referenced face and a cable failing, I believe that would happen regardless of making local references, if a cable's reference is gone, then it fails. One thing to help build robust models is to pick larger objects as references. I don't find deleted faces to be the cause of failed cables. I do find that referencing edges & vertices to be a greater cause of errors due to the fact that they are more dynamic than faces. Smaller things tend to be more vulnerable than larger things.

    There's many cable routing feature scripts out there and some create the bundled cable you're describing. When I wrote my cable featurescript I wanted a fast way to throw cables down. A lot of designs are cableless and you get into trouble at assembly. I wanted something that I could throw together quickly and then maintain it. I wasn't interested a sexy looking cable, it's a utility, I want to allocate space for the cable.

    In your example with a specific cable, cabinet & door, you can design this inside one part studio and create an assembly that updates. But as things scale up, you can't do cabling. You need a way to add cabling at the assembly level, thus incontext.

    I think the point of the workflow is how to do cabling at the assembly level. Cabling usually comes at the end of a project and is an assembly level objective. The problem with parametric modelers is that they don't work that way. Incontext/Design in the assembly is a goofy way to fix this issue and it's been with us since the 1990s. It does work but it's not obvious to the casual user. To route something through your large design, you'll be using incontext. This was just an example of this workflow.

    I hate cabling:
     
    But you have to do it and I do a lot of it.



  • eric_pestyeric_pesty Member Posts: 1,951 PRO
    @billy2
    Freeform spline feature: https://cad.onshape.com/documents/cd51f29c6937305f86a9df95/v/7ce0984014b269c33c1e7379/e/44de484ba0acba52f99fcfc5

    House wiring would not be much fun I agree... If you don't need "sexy smooth curves", and you are mostly going along X, Y, Z, you could try the "3D routing" featurescript as it might get you 80% of the way:

    https://cad.onshape.com/documents/e9510fd9afb962d7ce9a8022/w/b3fa818fd06e3d170672e959/e/13b3e0761b89e89cacdcb732
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,071 PRO
    @eric_pesty so you are using Evans freeform spline, it's cool.

    I think I'm misunderstanding this whole thread. I'm more interesting in managing the cables for something like this:


    This will end up being an abstraction from reality. You'll never have each wire (in my life time), but you could still manage it. This will be done at an assembly level and cabling would/should have it's own structure (it won't be one part studio).

    Showing a cable harness with the door open and closed is pretty cool, but I'm thinking about a larger scale issue.


Sign In or Register to comment.