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.

Measuring along perimeter made up of several edges

graham_lockgraham_lock Member Posts: 142 PRO
edited November 2 in FeatureScript

Hi,

Referencing the image below:

I have flat parts where the perimeters may be comprised of combinations of lines, arcs and splines.

Taking the image as an example, if I have one point on the perimeter, is there a way to create another point at a given distance along the perimeter from that first point?

Any help appreciated.

Thank you.

Best Answer

  • graham_lockgraham_lock Member Posts: 142 PRO
    Answer ✓

    I found the easiest way to achieve this is to create a path around the edges and then set points along the path:

    path = constructPath(context, qEdges);

    pointLocationsArray = [positionsOnSide]; // 0-1

    lines = evPathTangentLines(context,
      path,
      pointLocationsArray
      );
    

    The end points are then found using:

    lines.tangentLines[x].origin

Answers

  • graham_lockgraham_lock Member Posts: 142 PRO
    Answer ✓

    I found the easiest way to achieve this is to create a path around the edges and then set points along the path:

    path = constructPath(context, qEdges);

    pointLocationsArray = [positionsOnSide]; // 0-1

    lines = evPathTangentLines(context,
      path,
      pointLocationsArray
      );
    

    The end points are then found using:

    lines.tangentLines[x].origin

Sign In or Register to comment.