Skip to main content
14-Alexandrite
March 26, 2024
Solved

2D Parametric Geometry with Mathcad Prime

  • March 26, 2024
  • 1 reply
  • 3667 views

Hello everyone,

 

I require your expert assistance in setting up a 2D parametric plot to represent the geometry of a miter bend.

The attached Prime 7 worksheet contains the formulas driving the plot.

 

Although I utilized AutoCAD to sketch the miter elbow from the results from the worksheet, I need to recreate it in Mathcad through a 2D plot.

 

The ultimate aim is to generate a DXF of the 3D object for import into the 3D design software but my first priority now is to achieve the 2D plot in MathCAD prime.

 

 

Perez_0-1711487766260.png

 

 

 

 

 

Best answer by ttokoro

image.pngimage.pngimage.png

1 reply

23-Emerald IV
March 26, 2024

Something like the attached might be of help, I hope.

LucMeekes_0-1711494666961.png

 

Success!
Luc

Perez14-AlexandriteAuthor
14-Alexandrite
March 27, 2024

Hello @LucMeekes ,

Your solution is very interesting.

Could you please explain the purpose of each function and how do they work?

Perez_0-1711506313163.png

 

Perez_2-1711506361313.png

 

Perez_3-1711506375227.png

Additionally, could you provide the coordinates of each point or vertices? I will compare them with the CAD drawing to ensure the calculations are accurate.

 

The dimension O should not be a user input.

 

Below is an image with some comments.

 

Perez_4-1711507890457.png

P.S. I have Prime 9.

23-Emerald IV
March 27, 2024

The matrix(r,c,f) function creates a matrix with r rows and c columns where the elements are creating by feeding the r and c values to function f.

Thus the expression matrix(4,1,max) creates a 4 element (1 column) vector with sequential numbers from 0 to 3. Multiply the result with 2 and 1 to get odd numbers 1,3,5,7. And multiply that with BA/N to divide angles over the BA range. That's how phi works.

Polar creates polar coordinates of the points along your approximated curve, using R1 and Do. Notice that Polar uses the function matrix() again, but now with min as the 3rd argument. That creates a vector of all zero elements.

Rect uses the Polar results and adds them to the end pieces.

The amount of extension wasn't clear from your picture, so I decided to introduce O, but I think I have it solved now and I removed the parameter O.

If you want to see the vertex coordinates, simply type:

LucMeekes_2-1711527663975.png

 

and you will get a table with the (x,y) coordinates.

For the cut lines I created a new function and added a trace to the plot.

LucMeekes_3-1711527692850.png

See updated file, attached. Prime 7.

 

Success!
Luc

 

P.S. You'll notice that it works fine for different values of N, R1 and Do. But if you choose BA other than 90°, funny things happen. It's not perfect yet.