Punch! CAD
»
ViaCAD & Shark
»
Surface Modeling
»
Macro file format circle import (#4395)
Rank: Junior Member
Joined: 6/9/2012(UTC) Posts: 5
I need to import a mathematically derived surface which (fortunately) can be defined by skinning over a series of about 100 circles. So I tried using the macro file format, which does allow lines in 3D to be imported, but so far I can only specify circles that lay parallel to the XY plane. I need some way to specify circle locations in 3D- that is, the center location x,y,z, the diameter and the tilt angles (or a local workplane). Can't locate much documentation on ViaCad's version of a macro text language. I've created a number of test shapes in viacad, exported to macro, renamed the file format to .txt, and read. But all tilted circles are exported as flat. Any help or alternatives would be greatly appreciated.
Rank: Senior Member
Joined: 11/4/2007(UTC) Posts: 515
Was thanked: 1 time(s) in 1 post(s)
If it's a formulaic surface, can you use .spl import? Tim's tutorial is here:
http://www.csi-concepts.com/Dem...rtingSplinesTutorial.pdf
Rank: Junior Member
Joined: 6/9/2012(UTC) Posts: 5
No, I hadn't tried this approach. Surfaced-circles are convenient to tweak inside ViaCad, but I might be able to use the law spline functions- will investigate. Thanks for the suggestion.
Rank: Senior Member
Joined: 2/2/2007(UTC)
Posts: 5,447
Was thanked: 503 time(s) in 353 post(s)
Attached is an example showing how to create a circle and then to rotate into another plane using the macro file format.
Tim
File Attachment(s):
circle.zip
(1kb) downloaded 11 time(s). You cannot view/download attachments. Try to login or register.
Tim Olson IMSI Design/Encore
Rank: Junior Member
Joined: 6/9/2012(UTC) Posts: 5
Just what I was looking for, thanks. One other question- I kind of like the .spl file import as well. Is there a way to specify a variable in the .spl file? Currently, I save the equation I'm using to generate the 3D surface in a word doc, and search/replace variable names with numbers, then save as .spl. OK solution, but awkward. Appreciate the help, for what I know is a quirky use of the program.
Rank: Senior Member
Joined: 2/2/2007(UTC)
Posts: 5,447
Was thanked: 503 time(s) in 353 post(s)
>>Is there a way to specify a variable in the .spl file? No sorry. Tim
Tim Olson IMSI Design/Encore
Rank: Junior Member
Joined: 6/9/2012(UTC) Posts: 5
No problem- the macro or spl files are workable solutions for now. Normally I can design fully within ViaCad, but this project required surface positioning that is hard to achieve by modifying basic solids and curves.
Rank: Senior Member
Joined: 11/4/2007(UTC) Posts: 515
Was thanked: 1 time(s) in 1 post(s)
What's the relationship of the last integer (1.5707963267948966) to 180 degrees, Tim? *d'uh* radians just occurred to me.....
Rank: Junior Member
Joined: 6/9/2012(UTC) Posts: 5
I was able to finish the project using the spline file format- thanks. If anyone else wants to use splines to precisely define a surface according to a mathematical function, but needs to easily vary parameters in the equations, here is useful suggestion: I wrote the equation in excel, and placed the variables in separate cells. By using the text concatenating functions, excel automatically assembles the equation, substituting the parameters in the right places in the equation, and formatting a cell with the .spl code. Just cut and past into a .txt file, rename as .spl and import into ViaCad. Pretty fast and efficient.
Punch! CAD
»
ViaCAD & Shark
»
Surface Modeling
»
Macro file format circle import (#4395)
Forum Jump
Punch! CAD
ViaCAD & Shark
- News and Announcements
- General
- 2D Drafting
- Surface Modeling
- Solid Modeling
- Subdivision Modeling
- Rendering & Display
- Import/Export
- Tips and Tutorials
- Suggestions
- Gallery
- PowerPack
- Punch Lounge
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.