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.

Routing curve & Control point curve - Introduction of two new features for 3D curve creation

GregBrownGregBrown Member, Onshape Employees, csevp Posts: 211
edited August 21 in General

Today we are excited to announce two new features: Routing curve and Control point curve, designed to address a multitude of applications such as pipe routing, wiring, and more generic NURBS curve creation/editing for advanced surfacing.

Executive summary

  1. The intent is to provide these as public Custom features while we gather your feedback, but in the short/medium term we intend to include these as part of the Onshape native curve toolset.
  2. Get the features here
  3. Watch the demo/how-to videos (embedded below)
  4. Play with this example (public) doc
  5. And a Chair frame
  6. This 6-cylinder turbo manifold
  7. And a Motorbike frame
  8. Please provide all feedback/issues here in the forum post (NOT in separate tickets). We will respond here.

Examples of usage

There are a number of new and novel UI/UX aspects to this feature. For example we have added a new manipulator to provide 3 translations and 3 rotations and 3 planes control; we have implemented a new Button parameter; and we have introduced a new, more interactive feature dialog for creation/editing. Incidentally, the new manipulator (fullTriadManipulator) and button are available in FeatureScript for use in your own Custom features. In addition, an opPolyline function has been added, while the existing opFitSpline has a new optional derivatives parameter. All of this is documented in https://cad.onshape.com/FsDoc/index.html

The two features share a lot of common code, but are sufficiently different in their respective applications that we decided to separate them into two sibling features.

Each feature has a large number of capabilities and possible workflows, and may seem overwhelming at first. However if you take a few moments to familiarize yourself with the feature set described here and follow along some of our intro tutorials you’ll find they are very powerful AND easy to use. While it is possible to create some incredibly complicated results with a single feature, they are also designed to efficiently do basic tasks - it really is a Swiss Army knife (or Multi-tool depending on your location!)

Feature Summary

Many engineering applications require routed paths or 3D curves in space, such as wiring, pipe routing, skeletons for frames, and advanced 3D curves for surfacing workflows. They share the requirements: create of a series of points, create a reference system, perform easy manipulation of the points (creation and editing), provide control over specific relationships between points, and provide specific attributes governing the shape of the result. The Routing curve feature and Control point curve feature is designed to meet all these needs. The feature dialog (seen below) separates these shape control, references, point creation and editing functions into groups/options/actions in the UI.

Features common to both Routing curve & Control point curve

  • Inputs (group)
    • Vertex
      • Vertices (QLV) - picked vertices or mate connectors
    • Edge 
      • Input (QLV)
      • (Additional displayed options are specific to Routing / Control point curve)
      • Process (Button)
    • CSV 
      • File reference (reference in document, or in a linked document)
      • Data start column (integer 0,1,2…)
      • Unit system (list selection)
      • Process (Button)
  • Closed curve (Boolean) - creates a closed (periodic) curve
  • Curve reference (QLV: Mate connector) - the overall CSYS reference for the curve. If left empty the reference will be the Part Studio origin,
  • Selected point (READ ONLY) - shows the index/ID of the current selected point. “Zero” is the first point in the curve.
  • Delete point/Add point (Button) - deletes current selected point, or adds new point at same location as Current selected point. Add points fully duplicates the current point (except in relative mode where it sets the offsets to 0), so it also keeps the reference, bend radius, derivative and triad orientation
  • Reset triad (Button) - resets the manipulator triad if it has been rotated away from initial WCS orientation
  • Add point on axis drag (Boolean) - automatically add a new point if the translation axis of the manipulator is dragged (performs the same as Adding a point, then dragging it as a second operation)
  • Current point (group)
    • Relative to previous point (Boolean) - the X/Y/Z offset values for the point will be relative to the previous point in the curve. Using this option hides the “Point reference” QLV 
    • Point reference (QLV: Mate connector, vertex, sketch point) - the X/Y/Z offset values will be relative to this point. By default this will be Origin of the Part Studio 
    • X/Y/Z offset - this displays the current position of the point, and values can also be typed in 
  • Show reference coordinate system (Boolean) - shows the reference CSYS for the current selected point. This is extremely useful to quickly diagnose/recognize what the X/Y/Z offsets are with respect to. (Often, people will leave the origin as the default but really meant/assumed they were using some other entity as the reference)
  • Keep points (Boolean) -  creates point entities at the location of all the points in the curve

Features specific to Routing curve

  • Interpolated spline vs. Polyline (selection)
    • Interpolated spline 
      • Creates a (degree 3) interpolated spline through all the points
    • Polyline
      • Creates line segments between each point in the list
      • Bend radius (length value)  - inserts an arc between each segment of the curve. Default value is 0 (i.e. no bend.) Can be overridden in individual point editing.
  • Input
    • Edge
      • Number of samples (integer) - sample the input edge to create this many points
      • Process (Button) - create the points (and thus the curve) from the edge input
  • Current point
    • Derivative (Boolean) - controls the derivative (tangent direction) of the curve at the given point. Use the manipulator to align the derivative (its X axis) as required. The Magnitude parameter affects the “strength” (influence) of the control.
    • Override bend radius (Boolean) - controls the bend radius of the polyline at this particular point, overriding the curve bend radius. Only applies to the first and last points if the curve is closed.
  • Segment editing - Note: when entering the “Segments” tab, the magenta lines are displayed, representing the segments. The outlined point shown on each segment is a manipulator, not  a control point or vertex. Use this point manipulator to select the segment in the actions below:
    • Add points - add a number of new points along a given segment. A segment has only start and end points, so this has the effect of subdividing the segment n times.
    • Ortho path - create a new path for a given segment that follows a given CSYS’s ortho directions. Choose the segment to edit, a blue outlined box will appear, oriented to the World coordinate system (or other reference selected). Choose the 3 components as denoted by the edges of the box. The new segments (there are now 3 instead of the original 1) will now be aligned with the WCS (or other). Note that this works for both polyline and interpolated spline, though is typically more associated with polyline for pipe routing).

Features specific to Control point curve

  • Inputs
    • Edge (QLV) - the (single) edge to be approximated
      • Approximate spline edge (Boolean)
        • Target degree (integer 1…15)
        • Maximum control points (integer)
        • Tolerance (Length)
        • Keep start derivative(Boolean)
        • Keep end derivative (Boolean)
      • Process (Button) - based on the inputs above, calculate the position/number of control points and knots and construct the curve.
  • Degree (positive integer < = 15) - assign a new degree to the curve
  • Elevate / Decrease (Button) - Elevates the degree by adding a control point(s). (Decrease is vice versa). Note this adding/removing a single control point is only true for Bezier curves. In more general NURBS curves, Elevate adds multiple control points, while Decrease removes multiple control points as the math requires. This is because for NURBS, we subdivide the curve into Bezier segments first, which adds points, then change the degree of the Beziers, then we stitch them together, which add multiplicity to the knots, and finally try to remove as many knots as possible.
  • Weights (positive real number) - assign the weight of the Current point. The resultant curve will be therefore be rational
  • Knots (group)
    • Make knot vector uniform (Button) - updates positions of knots to be uniform. Can be most useful when dealing with complex imported curves
    • Knot array (real number) - displays (read-only) the values of all knots in the array. 
  • Make piecewise Beziers (Boolean)
    • Creates curve as a series of Bezier curves each with the degree specified for the overall curve. The shape of this piecewise curve will be identical to the multispan curve, but the control points for each segment will obviously be different from the overall curve.

Demos/How-to videos

Routing curve how-to:

Control point curve how-to:

Tips/FAQ

  1. Use the Show reference coordinate system (suggest you make a habit to leave it turned on) in order to ensure your point offsets are relative to the intended reference point/vertex/mate connector/origin
  2. The Current point is the one where the manipulator is being shown. If you select a new point to the the Current point and then hit Delete point, this is the one that will be deleted
  3. Add point on drag is useful, but remember to turn it off before attempting to edit existing points, otherwise you will be adding extra points leading to confusion.
  4. Use the Relative to previous point option to “link” points together. This can be helpful when moving multiple points in one drag operation.. They are essentially “constrained”. It is also useful for ensuring the second point remains normal to the previous point - in the case of a pipe starting from a mate connector you will probably want this as the norm. Set Relative to previous point option to be ON and then drag only in Z. 
  5. When editing a point with the manipulator, the origin of the manipulator can be dragged to a new location - if it picks up an implicit location to snap to (implicit mate connector) then this will be the new location. Note that the Point reference does not get updated, just the offsets. If possible, set the Point reference location first, then do the move.
  6. When using the Derivative control for an Interpolated spline, note that the curve may fail to regenerate if the Magnitude is too large. Try smaller values and/or adjust the direction using the manipulator. 
  7. Points with reference such as Mate connectors or vertices of other features will associatively update if those upstream features are changed. However, due to the explanation in tip #5, it is possible to trick yourself into believing you have chosen a mate connector on a face as a reference point, and then be surprised that the point did not update… Again, refer to tip #1 to be sure your references are correct and that you don’t have an offset relative to a fixed point like the model Origin.
  8. The Selection point (read only) display is 0-indexed. I.e. the start of the curve (first point) is “0”
  9. When using CSV data as reference, be sure to check and set the units appropriately. You’ll have to verify the data beforehand. Also remember that you can either import the CSV file into the document first, OR link to CSV data contained in another document. If you mess up the units you can reselect the correct units, select Overwrite points and hit the Process button again.
  10. CSV data is processed as a one-shot operation. The points are all relative to the Curve reference (which is the Origin by default, unless you changed it). Yes, after the fact you can individually reassign the individual point references to something else (e.g. Relative to previous point) but there is no associativity to updates made to the CSV data. If you Update the imported CSV file using the regular import update workflow, then you will need to Process the data again, losing any of those previous edits. 
  11. When adding bends to Polylines, if it is not possible to add the bend, the feature will fail to regenerate and segments will be shown in magenta and offending bend in red. A tip is to roughly get the points into place first without the bends, then add them next. To override the bend radius at a specific point between segments there is a checkbox under the X/Y/Z offsets control. Note you can not override the bend radius at the start or end point of an open curve (since this point is not between two segments)
  12. The Inputs and Current point groups can be collapsed - By collapsing the Inputs group you can save some screen real estate, though it is more likely that the Current point group will need to stay expanded….
  13. The manipulators for the Segments (which you need for selecting a specific segment) that are displayed when you enter the Segments mode appear the same as the points themselves, though are never displayed at the same time.  These are segments of a Polyline in magenta, with manipulators shown: And these are points for a Polyline:
  14. Don’t forget that you can Reset triad as many times as you like… that’s why the Button is large!
  15. Where is my Control point curve?  The default for a Control point curve is deg 3, which means the minimum number of points you need is 4. Until you have created/selected 4 points you will not see any curve. So, you can either keep selecting points… OR change the degree to something else like “2” or “1”. If your workflow starts by creating a line between two points, then consider setting the degree to “1” first, then select your 2 points. This is the cleanest way and will avoid error states. Info bubbles are provided to remind you of any situations like this:
  16. By default the Curve reference is the Part studio origin. You can select other references if you like, e.g. a Mate connector.  As already mentioned above, make sure to use the Show reference coordinate system so there is no confusion over the Curve reference..
  17. The manipulator is shown with respect to the Curve reference coordinate system - which by default is the origin and thus aligned with the WCS. If you choose, for example, a mate connector as the Curve reference that is rotated away from WCS, then the manipulator will also be oriented to this reference. If you make local changes to the manipulator, they are stored with each specific point for which those changes were made. Pressing the Reset triad will restore its orientation to the Curve reference’s system.
  18. You can create Bezier curves or generalized NURBS curves using the Control point curve feature. If the degree n is defined, then creating/selecting n+1 points will result in a single span Bezier. If more than n+1 points are created/selected, then a multi span curve of degree n will result. The Make piecewise Bezier option can be used to force the creation of edges each being a single span Bezier with degree n. Naturally the shape of the curve is identical either way.
  19. Curves can have their degree elevated (increased) using the Elevate button. In doing so the original shape of the curve is exactly preserved and the distribution of control points will be adjusted to achieve this. While degree Decrease is also provided, the shape can not be exactly maintained. The feature will try to maintain it as far as possible, but as math is taken out of the curve it may become impossible to maintain the original shape. Note: Curve elevation works with both Bezier and general NURBS curves! Try creating an interpolated spline in a sketch. Create a Control point curve feature, and use the sketch edge as the input, and Process this to obtain the control points. Now Elevate the degree, or Decrease the degree.
  20. Approximate spline edge is a powerful option that allows for complex/dirty input edges to become clean curves (even single span Beziers). To force a Bezier curve, just set the degree to n and the Maximum control points to n+1. Give a large enough Tolerance value… you may need to iterate on this to find a reasonable tolerance that is small enough to preserve the intent of the shape, but also allow the n+1 control points to fit correctly. Note that by giving larger and larger tolerance values you will effectively “fair” the original curve. Of course forcing a Bezier result is not necessary in all cases, therefore you can provide a larger number for Maximum control points and still get a clean result. Another note: if you use the option to Keep start/end derivative, you will unlikely be able to obtain a single span Bezier result. The Process button is designed to be pressed many times, so iterating the inputs until the desired result is obtained is encouraged.
  21. Shift-C (show curvature/surface analysis) will work as always during the feature creation process. It is interesting to see it dynamically update when you are editing points, or Processing inputs with approximation settings being iterated.
  22. Q: What’s the difference between setting the Degree, and Elevating the degree of an existing curve? A: Given an existing Control point curve you can:
    1. Change the degree - by typing in a new value here: This will change the shape of the curve but NOT change the number nor location of the control points. At the extreme low end, if you change a curve to a degree=1 then the result will be a polyline (straight line segments between successive control points). At the other extreme you can assign a maximum degree that is the number of control points - 1. For any changes of degree, the number of spans and therefore number/location of knots will change. 
    2. Elevate the degree - with this button, this will NOT change the shape of the curve, but it will increase the number of control points AND change the location of the control points as necessary to maintain the shape. Note that Decreasing the degree of the curve (using the   button) will change the location of control points and TRY to maintain the shape of the curve. While it is mathematically possible to exactly match the curve shape with degree elevation, the reverse is not true, and at some amount of Decrease the shape will change. A typical use case for Elevating the degree is matching the shape of reference geometry (against scan or imported geometry/mesh) with the simplest (lowest degree) curve possible. Once the correct shape is obtained, the curve can be adjusted to meet desired specification: degree 5 or sometimes 7 are commonly used values. There are other reasons and use cases, just getting you started here..
  23. When edges are processed in order to create points for a Routing curve or Control point curve, all points are created with respect to the curve reference and are NOT associative to the curve itself. Thus if the original edge is modified, the Routing curve will not update parametrically. This is a general (expected/by-design) behavior when edges (or CSV data) are Processed. 
  24. Here is an example (public) doc to try. I have created Part studios that cover most of the features.

Known Limitations/Issues

  1. Defaults are not finalized, nor are sticky settings. We welcome your feedback and suggestions. 
  2. Value of 1.0 (the default) for the magnitude of the derivative can be too high, causing the curve to disappear (i.e. the feature is in a failed state). Just edit the magnitude and/or direction of the derivative and things will work as intended.
  3. The triad uses the same color scheme (red = X, green = Y, blue = Z) as the triad in the viewcube, and is displayed when the Show reference coordinate system option is selected. The triad is displayed at a fixed size and is not editable. Thus if you have a very large curve dimension (i.e. multiple meters) then the triad may be hard to see. Conversely, for very small models the triad may be extremely large.

Help and feedback

  1. All issues and feedback must be here in this post, NOT in separate support tickets. Onshape Support and R&D will monitor and respond here
  2. Please refer to this document and embedded videos as there is no other documentation at this time
  3. We welcome and encourage your comments, opinions and findings - in fact the more engagement we have, the sooner we will be able to make any necessary adjustments and get in into the native curve toolset

«13

Comments

  • Nick_HolzemNick_Holzem Member Posts: 118 PRO

    @S1mon should help our team with freeform curve design!

    @GregBrown Thanks for sending this one through!✌️

  • eric_pestyeric_pesty Member Posts: 1,953 PRO

    These will take a bit of time to get familiar with but seems like it will solve a lot of tricky workflows!

    It's going to put @Evan_Reese Freeform spline out of work.

  • S1monS1mon Member Posts: 3,047 PRO
    edited August 17

    Indeed, both of these are much more powerful than some of the other custom features that are out there and will extend the power of Onshape significantly. I've watched the two demo videos and spent a short amount of time with the control point curve.

    Some initial thoughts:

    1. It would be nice if processing edges worked on more than one continuous edge at once.
    2. While you can link some CVs together using relative to previous point option, many people would expect - coming from other tools - to be able to select more than one CV at a time and use the triad on multiple CVs.
    3. The new triad manipulator is a great feature, but it's missing scaling functions that most other surfacing CAD tools have. Scaling from various references is pretty fundamental to how a lot of curves and surfaces are manipulated in Alias, Rhino, NX, Plasticity, etc.
    4. Ideally there would be a more extensive surfacing or at least 3D sketcher/curve mode which would allow not just manipulating multiple CVs at the same time, but CVs from more than one curve at the same time.
    5. It seems like periodic curves are not supported - it would be great if they were, especially to process a circle into a particular degree/span.
    6. It would be nice if the current number of spans was displayed in the feature somewhere.
    7. I don't understand why Processing an edge with say a degree 5 curve requires 8 or more CVs. Does processing always create multi-span curves?
    8. When processing a curve, it would be great to see a graph of the deviation.
    9. Using vertex mode gives each CV an absolute offset from vertices, mate connectors etc. Often as the underlying geometry changes, you want those offsets to be parametric but scale based on the distance between endpoints. Bridging curve does this automatic scaling well, and indeed you show starting with a bridging curve and manipulating it, but since Processing is not parametric you can't start with a Bridging curve and elevate degree and manipulate that in a parametric way.

    Overall it feels like a lot of useful tools have been jammed into a single feature, and ultimately that single feature really wants to be more of a mode like Sketcher where there are tools and constraints which are evaluated simultaneously. Each tool wants to have a smaller scope, but be orthogonal to all the other entities. Rhino and especially Grasshopper excel at this concept. Each building block in Grasshopper does a very focused thing, but they typically take as wide a variety of inputs as possible and do that thing to them. If you input a vertex, maybe you only get one result, but if you input an array of vertices, you get an array out. Many of the underlying FeatureScript functions support this kind of behavior, but sometimes at a higher level, the orthogonality gets lost.

    We now have a regular transform feature (parametric, supports scaling), a transform tool in Sketcher (not parametric) and different manipulators in several custom or soon to be official features. In this case we have a parametric tool for moving CVs relative to other references, which is very useful, but there's no scaling. While there are clear needs for special case manipulators, it seems odd to have so many and have them not all have the same basic powers. Ideally a specialized CV manipulator would include an NU (and NUV for surfaces) mode, and have options for fall off.

    It would be great to select one or more CVs from one or more curves in order to transform/scale or modify the weight of them at the same time.

    Other surfacing CAD systems allow for planarizing a curve. I would love to have that ability here, but adding that into this current Swiss army knife would be suspect. One could write a general purpose custom feature to do this, with various inputs around what to maintain and what to change, but it would be nice to have this as a non-parametric tool within a 3D sketcher.

    Approximate offsets or dropping a curve onto a surface (see ISDX) are further examples of tools that would be great to add to Onshape, but don't make sense within the complexity of this feature's interface.

    Processing a curve (rebuilding) is a common useful thing, but it's not the start of every control point curve. It's also not parametric in this feature which feels odd. You had another custom feature for rebuilding curves which was parametric, but then of course modifying that curve afterwards is harder because Onshape doesn't have persistent CVs which can be hidden/shown and manipulated. (Of course they exist under the hood, but they're not consistently supported throughout the product for users.)

    Similarly, importing a CSV file and being able to use those points as a reference for other features is great, especially when it gains the ability to reference a mate connector, but it feels like its own discrete tool.

  • Nick_HolzemNick_Holzem Member Posts: 118 PRO
    edited August 17

    Yeah this is Awesome, SO much freeformability!

    My 2 asks

    Like Simon speaks to, the lack of parametric reprocessing is the a downfall. With point references used, the point position will update with upstream changes, but the direction and continuity of the original input is lost.

    1. How hard would it be to add a checkbox for reprocessing/remember inputs on regeneration? I'd like to see parametric updates reflected based on input settings.

    My workflow: (think bicycle frame - connecting top tube to down tube - head tube junction, silhouette)

    -Create bridging curve between two bodies, G3 at each end

    -Use Control Point Curve, edge input, select bridging curve

    -Elevate from processed 7-degree to 9-degree

    -Add reference point selections at start and end CV's, and also reference point selections for 2 middle CV's to anchor to a location on the head tube

    -Make some tweaks to the middle CV's while bumping up the weight on a few points (LOVE THIS) to create unique curve.

    This is great this first time its created. But when up tree/primary geometry changes or we go to create the next size frame the CPC does not maintain its input, so the curve essentially needs to be manually reprocessed.

    2. Add an option for the control point offset to reference their original starting position, rather than origin or chosen reference point. I think this would better work alongside means for scaling and parametric reprocessing.

    Greg, I know you got this ;)

    Thanks again for the great new tools and training aids!

  • EvanReeseEvanReese Member, Mentor Posts: 2,188 ✭✭✭✭✭

    woo FINALLY! This was always the hope. I have been willing it to be 👹

    Evan Reese
  • GregBrownGregBrown Member, Onshape Employees, csevp Posts: 211

    Thanks S1mon and Nick for your immediate and thoughtful feedback! There's a lot to process so we'll have to get to it in chunks…

    To an easy one first, S1mon you said:

    I don't understand why Processing an edge with say a degree 5 curve requires 8 or more CVs. Does processing always create multi-span curves?

    Can you show/explain your test case for this? Did you use Approximation, and also did you have the Keep derivatives at start/end option on? Did you set the Max control points to 6?

    A "processing" of an existing deg 5 Bezier sketch did yield 6 CP's for me:

    Note that if I unchecked the Approximate option, then the 6 original CP's would also have been Processed in their original position.

  • GregBrownGregBrown Member, Onshape Employees, csevp Posts: 211

    Evan I suspect you'll be digging into the new manipulator and Button FeatureScript code for use in your own Custom features. I'm sure many of yours could benefit.

  • rafael_telgmannrafael_telgmann Member Posts: 125 ✭✭✭

    Just plain WOW!

  • S1monS1mon Member Posts: 3,047 PRO
    edited August 17

    On further exploration, it was the case that I had the start/end derivatives turned on. I was processing an arc into a spline. When I have the derivatives turned off it does a good job of creating a single span Bézier from an arc input. Depending on the angle of the arc and the degree of the Bézier, I can get a good approximation without turning on the derivatives.

    I'm also realizing that there is a periodic option ("closed"), but I'm finding the process of creating the initial points a bit baffling. I would expect that if I process a sketched circle that I could convert that into a closed curve and edit it from there. It's also weird that elevate and decrease don't work, but I can type in a degree. I realize that the shape is changing as the degree changes, so it's not the same as De Casteljau degree elevation.

    Perhaps it would make more sense to just have [+1][-1] buttons next to degree. In the case of a periodic curve, it would change the shape, but a Bézier could be modified up or down without shape change (with obvious limitations of the Parasolid kernel going up, and the approximation algorithm going down).

    Closed curves seem like a good place to have a separate feature. Alias handles these very well in terms of rational and non-rational options, as well as creating pieces of arcs and pseudo-arcs. Being able to toggle symmetry options, and use scaling for the CVs would be very helpful for managing CV movements. I'd like to be able to either select an arc, circle or ellipse as a reference, or a mate connector and a radius to create the initial closed curve.

  • EvanReeseEvanReese Member, Mentor Posts: 2,188 ✭✭✭✭✭

    I've not written any code in a while, but if I get back to it I absolutely will!

    Evan Reese
  • GregBrownGregBrown Member, Onshape Employees, csevp Posts: 211
    edited August 19

    Here are three public docs that you might like to view, or copy and play with. They all use Routing curve and might be good simple tutorials. Each would have been significantly harder without the Routing curve…

    Chair frame

    6-cylinder turbo manifold

    Motorbike frame

    PS: It's worth repeating that the Routing curve and Control point curve features as you see them today are not intended to be their final form. We are learning/debating/testings things as the feedback is coming in (and as we are using them ourselves extensively)

  • martin_kopplowmartin_kopplow Member Posts: 543 PRO

    Feedback: I tried to use derivative for start and end point of the routing curve. I used mate connectors as the references and found the resulting takeoff direction unpredictable (not following mate connector). When trying to manipulate the direction (with the manipulator) it appeared it did not affect the axis intended, but some other axis and moved contrary to my input. Also, When rotating a point, it might be desirable to have control over the angle by displaying/inputting numbers for degrees.

  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,072 PRO
    edited August 19

    This is an interesting router inside Onshape. It's very powerful:

    Typically, routes will end up in an assembly and curves won't import into an assembly. Composites will import, just add your curves into a composite.

    It seems to me that if you have 2 surfaces (bad, good), you should be able to ask for max deviation between the 2 and show where it occurs.

  • Matt_NCMatt_NC Member Posts: 6 PRO

    Particularly for routing, it can be very helpful to be able to define the length of a curve. I have no idea how that would be implemented, but I know it's possible in other programs, such as Solidworks. I can imagine it being particularly difficult here where you can switch between the interpolated line and the polyspline, or switching to piecewise Beziers on the CPC.

  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,072 PRO

    route 2 is my router, routing curve 1 is the your new router:

    the change:

    route 2 updates & routing curve 1 does not.

    So the use case here is to design a piece of equipment and make it as small as possible. The equipment is in an assembly with all the plumbing hooked up ready for the changes to occur. Re-stack the equipment, click update context and the plumbing updates. My crummy router updates.

    I think you need to add some form of parametrics. After all, your name is parametric technology corporation.

  • GregBrownGregBrown Member, Onshape Employees, csevp Posts: 211

    We just pushed an update to the feature to take care of this bug. Thanks for the feedback - and happy we could jump on it so quickly.
    The derivative will now correctly follow the X axis of the mate connector

  • S1monS1mon Member Posts: 3,047 PRO
    edited August 19

    Some more issues:

    1. This is likely a universal thing in Onshape, but if I use my mouse wheel to dial up the degree of a control point curve to where I get an error because it's too high of a degree for the number of CVs, I can't roll the mouse wheel back down to fix it. I have to type in a new number.
    2. The way that mate connectors are being used for references in these features is different than in Bridging curve. Bridging curve uses the Z direction as a tangent reference. There are times when X or Z would be preferable in either tool, but it should be more consistent.
    3. If I use an implicit mate connector for a routing point, they seem to disappear and there's no way to go back and edit them.
    4. It's very confusing when points end up on top of one another. There are situations where it's ok, but there should be more clear indication and possibly a special type of point selector to deal with it.
    5. It would be really nice to scroll through the selected point numbers in order to tweak X,Y,Z and/or weight values
    6. The new buttons in the dialogs have the text vertical alignment up a bit high. If you compare the [Final] button and the [Elevate] button, the final button has the text biased towards the bottom, and the others are biased towards the top.
    7. The selected point number sometimes doesn't update right away. Opening and editing a previously completed feature, and then deleting points can leave the selected point number larger than the actual number of points.
    8. It would be nice if the "add point on axis drag" changed the manipulator in some way so that the different mode was more obvious.
    9. It would be great if the add point on axis drag - when in the middle of curve - would avoid creating zig-zag control polygons. I pretty much never want to create zig-zags. You could look at the bounding boxes of the current point and the next point, and the current point and the previous point. If these bounding boxes are non-overlapping (except at the current point) then you can figure out where to add a point by which bounding box the manipulator passes through.
    10. Adding points in the middle of Bézier curves in 2D sketcher only lets you do so on the control polygon legs. With the 3D control point curve it's only at a control point or beyond the end. It makes a certain amount of sense to be able to do either with the 3D mode.
    11. Elevating a closed control point curve gives an error message and makes the feature red even though nothing has changed. If I manually tweak the degree of the curve, it resets the error.
    12. It would be great if any/all of the inputs were configurable.

  • GregBrownGregBrown Member, Onshape Employees, csevp Posts: 211

    Bill, can I ask what references you used in the Routing curve - were they vertices in sketches? Also, was the change you made to one of the sketch circles? It failed in a way that is not expected.

  • S1monS1mon Member Posts: 3,047 PRO
    edited August 20

    Bug:

    I've created a variable that I'm using as a weight to make a rational curve. Adjusting the variable causes the value in the dialog to update sometimes, but the curve only updates if I manually type in a new value. Sometimes the variable name is still there as I tweak the value in the variable panel and sometimes it seems to lose the reference.

  • martin_kopplowmartin_kopplow Member Posts: 543 PRO

    That's great news! Just a thought: Wouldn't it be more practical to have the derivative follow the Z-Axis of a mate connector? To me, that appears to be closer to the actual modeling situation, and would provide a bit more control options.

  • GregBrownGregBrown Member, Onshape Employees, csevp Posts: 211
    edited August 20


    In fact we pushed a subsequent update where there is a choice of triad axis alignment:

  • Nick_HolzemNick_Holzem Member Posts: 118 PRO

    Add point on drag is not always consistent. In this scenario a CP will be added in 2 of 3 directions only.

  • Nick_HolzemNick_Holzem Member Posts: 118 PRO

    After shifting the 2 boxes around. Reselecting the bridging curve gives this false warning. "Need at least 8 control points for deg 5"

    Once I re-process the curve it goes away

  • GregBrownGregBrown Member, Onshape Employees, csevp Posts: 211
    edited August 20

    Nick, this is by design. Dragging multiple times in the same axis will not create a new point. If you do require one then hit the Add point button, and then keep dragging.

  • Nick_HolzemNick_Holzem Member Posts: 118 PRO

    Yeah, Bad design. It should add if add is checked. Otherwise it's not intuitive. Consistency over confusion.

  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,072 PRO

    @GregBrown I've though a lot about constraining routes. 1st is the mathematical approach and then theres the use case, these are not in alignment.

    You currently differentiate between a mate connector and a vertex and I believe you're on the right track. I can't find anything wrong here. I would remember the mate connectors in a list and not the vertices. If you define using a mate connector then it's remembered, if you pick a vertex, it's in 3D space.

    When constraining with mate connectors, you need to deal with "Z" & "X" which constrains the route parametrically. I'm close but still working on it.

    I think you're close to having a parametric router & curve generator. Currently I'm focused on the polyline trying figure out how to constrain it in a meaningful way.

    I have found that storing mate connectors in a query array is a problem because you can't manipulate it. I stack an array with coordinates so I can insert and better manage the list of constraints. You probably already knew this, after all you guys did write feature script.

    Designing a lot of complex geometries and now plumbing, I don't think parametric routing will ever be perfect, after every change I'll clean up curves & routes tweaking it. My parametric models aren't perfect by design, but I'm not doing demos any longer and trying to highlight the "big change".

    At this point don't try to constrain everything and focus on constraining mate connectors (coordinates) & leave vertices free to roam.

    A couple of other things:

    -change "override bend radius" to "add bend radius" it's more obvious.

    -When picking an edge, you need to change the direction. It shouldn't always go from 0→1 sometimes it goes from 1→0.

    Your routing is really good and much better than what mine will ever be.

  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,072 PRO
    edited August 20

    @Matt_NC I've never used routing in SW, just wasn't interested so I can't comment on how they do it.

    I'm working on many structures inside OS trying to create a parametric project for a piece of equipment. In the end, they want it as small as possible. I'm currently on my 4th layout or maybe 5th. I probably have a 100 more before I'm done which is why I have to get parametrics working well.

    I'm using assembles mostly to handle plumbing bits. You might think its a lot of work to assemble the gaskets, end fittings, check valves…. but its really fast. Controlling plumbing in an assembly is the way to go. I'm using routing at the begin just to define where things need to go, from here to there, but assembling the plumbing using simple mates. The speed comes from windowing in a pipe segment, then copy & then paste. You get everything including the constraints. You can even copy to another assembly. I can't tell you have fast it is to design plumbing inside OS.

    When you build a pipe run, you leave room for adjustments with slides and rotates. The inverse kinematics inside OS will solve the pipe shape after making a change. The only thing that changes currently in my parametric model is pipe length for straights. I solve these with in context. After an update all pipes lengths update connecting things together. I'm thinking of adding angles to elbows and solving this with inverse kinematics. Currently I'm thinking plumbing needs to be vertical & horizontal, If I need to pack tighter, then I'll start using angled elbows. With angles I could really pack the spaghetti tightly.

    Oh yeah, the BOM's are correct and pipe lengths are contained in the BOM. I've set this up so I don't think about BOM's.

    It's easy to compute route lengths including the arcs, so yes, let's do it.

Sign In or Register to comment.