Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Create CAD Geometry in PTC Mathcad? Here's How

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-29-2019
05:16 PM

07-29-2019
05:16 PM

Create CAD Geometry in PTC Mathcad? Here's How

**Written by David Martin for PTC**

You might be aware that you can drive a Creo Parametric model from a PTC Mathcad worksheet. There are actually two ways to do this:

- You can embed a PTC Mathcad worksheet directly in a CAD model.
- You can create a Prime Analysis feature.

Both methods allow you to send values of dimensions and parameters from Creo Parametric to PTC Mathcad, perform calculations, and then receive dimensions back. These values can then be assigned to feature dimensions via relations, so that your engineering calculations drive your model geometry.

However, did you know that **you can create CAD geometry directly in PTC Mathcad**? Custom functions available to everyone from the PTC Community can be used to generate 2D curves using the IBL file format, and 3D surfaces using both DXF and STL file formats. In this post, we’ll look at the 3D methods.

The STL file format is an abbreviation of Stereolithography, and is commonly used in additive manufacturing, commonly known as 3D printing. Therefore, if you have access to a 3D printer, you can generate a real-world 3D part from PTC Mathcad! The **Write STL** function is available from this link: https://www.ptc.com/en/support/article?n=CS189486

The article includes two PTC Mathcad worksheets showing 2 different matrix styles possible to generate 3D models. “WriteSTL takes an array of triangle vertices. The included PTC Mathcad worksheets demonstrate inline routines to convert each matrix type to triangle vertices arrays,” writes the PTC support source.

The Drawing Exchange Format, or DXF, was created by Autodesk in 1982 to help share files between AutoCAD and other programs. In Creo Parametric, it tends to be used more for sharing 2D production drawings from other CAD packages. (In the past, I’ve used DXF to create drawing formats in Creo Parametric from legacy data when companies have switched over from another system.) But DXF can be used to generate 3D surfaces as well. The **Write DXF** function is available from this link: https://www.ptc.com/en/support/article?n=CS189645

One day while perusing the PTC Community, I saw a post in which someone asked how to create a hyperbolic paraboloid in Creo Parametric. That shape can basically be described as a saddle, and is defined by a straightforward equation. You can find more information about it in this Wikipedia article.

I didn’t have an answer for the end user, but the question always stuck in the back of my mind. You can’t create a surface from an equation. Maybe you could create the boundary curves and a couple internal curves, and then generate a parametric or “technical” surface using the **Boundary Blend** function in standard mode, or a freeform surface in ISDX.

After I came across the worksheets page in the PTC Community, I decided to give it a try. I modified the equations and write statements to fit the vector equation of a hyperbolic paraboloid. This generated STL and DXF files, which I was able to import into Creo Parametric.

You can see the final result here:

Pretty cool.

To see how you can further integrate PTC Mathcad into your design processes, view the prerecorded webcast, Engineering Calculations: A Prime Concern, with PTC Product Manager Andrew McGough. In just 20 minutes, you’ll see how you can use PTC Mathcad to solve calculations and send the results to Creo, document your data, and much more.

Labels:

Top Tags