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.

Pattern on points

philippe_marinphilippe_marin Member Posts: 23 EDU
Hi, I wonder if there is a way to repeat a selected feature on a part, based on a series of points.  
Patterns do work linear, circular, or on curve, but always with regular distances. But I need to put the same feature on a line with varying distances... I assume putting points in a sketch to define the position of each feature would be a way to do this. Is there a way to do so in Onshape?  Or any other way to repeat a feature on a set of given positions?
Otherwise I would ask for this to be developed ;-)

Comments

  • matthew_stacymatthew_stacy Member Posts: 473 PRO
    @philippe_marin788, I routinely create point patterns using Creo (another PTC product) in my day job.  But prior to reading your question I had not actually done this in Onshape.  The good news is, it works beautifully!  You will need to add a custom feature script called "Point Pattern".

    Here is a link to a shared Public document illustrating a simple point pattern.

    The first step is to sketch the curve or line along which the pattern points will lie.  However, do NOT place the pattern points at this time.  They will be placed on a subsequent sketch.  This curve may or may not be appropriate for your application.  Skip this sketch if a random (x,y) point cloud would be more suitable.


    Then sketch a lattice to define where the PATTERN POINTS will be located ALONG the CURVE.  But again, the actual pattern points will be placed on a subsequent sketch (not this one).  If this current sketch were to be used numerous extraneous vertices (the end points of lattice lines for example) would have to be deselected from the point pattern.  This lattice sketch is not absolutely necessary, but provides a robust method to fully constrain sketch geometry and simplify the point pattern that we intend to place later.  There are numerous other ways that this could be addressed.

    Now place the actual vertices at the locations defined (note the fully constrained sketch geometry, not mandatory, but certainly good practice) in the previous sketch.

    Then place your primary feature at one of the previously defined vertices.

    And finally, pattern that feature using the POINT PATTERN feature script.

    This feature script is similar to most Onshape tools in that there are several important configuration options to tailor it to the task at hand.  For this example we need a FEATURE pattern (circled above).  For LOCATIONS those points can be selected individually, but it is often more efficient to select the entire sketch.  That is why we didn't place curve, lattice, and points on the same sketch.  A single sketch would have resulted in numerous extraneous vertices requiring manual selection or deselection.  And don't forget the magic "Apply per instance" option.  This is a common Onshape option.  I don't understand how it works, but when you see red (feature failed) check that box.  I'm sure that someone will chime in with a concise explanation of Apply-per-instance.

    I was concerned that the primary instance would be double-counted, but this is not the case.  Go Onshape!  The first point does NOT have to be explicitly de-selected from the LOCATIONS field.  Note for that for this example, I selected the entire "vertices" sketch and the quantity in the hole table on the drawing still displays correctly (3 not 4).  I believe that we have @cody_armstrong to thank for this fine FS.  It's just another thing to make me wish that I could use Onshape in my day job.
  • philippe_marinphilippe_marin Member Posts: 23 EDU
    Thanks a lot @matthew_stacy for this valuable piece of information!
    I think this is exactly what I was looking for, and I will try it as soon as possible.
    Best regards.

Sign In or Register to comment.