cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

2D Parametric Geometry with Mathcad Prime

Perez
12-Amethyst

2D Parametric Geometry with Mathcad Prime

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

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ttokoro
20-Turquoise
(To:Perez)

10 REPLIES 10
LucMeekes
23-Emerald III
(To:Perez)

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

LucMeekes_0-1711494666961.png

 

Success!
Luc

Perez
12-Amethyst
(To:LucMeekes)

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.

LucMeekes
23-Emerald III
(To:Perez)

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.

Perez
12-Amethyst
(To:LucMeekes)

Hello @LucMeekes ,

 

This is quite intriguing. Upon reviewing the vertex coordinates, they don't seem to add up. The expected value for Do is 10.75, but calculations from the coordinates yield 10.544. The vertex coordinates should exactly match the data from the CAD system.

 

Perez_0-1711544329944.png

 

Perez_2-1711544899750.png

 

 

ttokoro
20-Turquoise
(To:Perez)

image.pngimage.pngimage.png

Perez
12-Amethyst
(To:ttokoro)

Hello @ttokoro san,

Your solution is looking very good. I will review and accept the solution soon. Thank you for your support.

 

Perez
12-Amethyst
(To:ttokoro)

Hello @ttokoro san,

I reviewed the solution, and it is perfect. I created a CSV file, imported the points into the CAD system, and everything works perfectly.

Perez_0-1712001053336.png

Perez_1-1712001163780.png

Perez_2-1712001395060.png

 

I have a question regarding the Mathcad plot: how to improve the lines to extend to the outer vertices?

 

Perez_3-1712001531462.png

 

ttokoro
20-Turquoise
(To:Perez)

Just change the radius from ttokoro_0-1712012134098.png to ttokoro_1-1712012161375.png.

 

 

image.pngimage.png

ttokoro
20-Turquoise
(To:ttokoro)

image.png

image.pngimage.png

ttokoro
20-Turquoise
(To:ttokoro)

Attach the worksheet.

Top Tags