FastFieldSolvers Forum
FastFieldSolvers Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
 All Forums
 FastFieldSolvers
 E.M. Workbench
 How to execute Export_mesh.py in FreeCAD?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic   

HallieHe

USA
4 Posts

Posted - May 21 2018 :  17:56:22  Show Profile  Reply with Quote
Is there a detailed instruction of how to export the mesh file from FreeCAD? I have a geometry opened in FreeCAD and was able to add Export_mesh.py as a macro. But what should I do next?

Hallie He

Enrico

410 Posts

Posted - May 22 2018 :  15:54:12  Show Profile  Reply with Quote
You need to use one of the functions available in the macro. Usually this is
export_faces

You can see the function prototype for a short description on how to use it:


def export_faces(filename, isDiel=False, name="", showNormals=False, folder=DEF_FOLDER):
    '''export faces in FasterCap format as conductor or dielectric interface
    
    The function operates on the selection. The selection can be a face, a compound or a solid.
    'filename' is the name of the export file
    'isDiel' specifies if the mesh is a dielectric, so the function will add 
        a reference point to each panel to indicate which is the external side (outside)
    'name' is the name of the conductor created in the file. If not specified, defaults
        to the label of the first element in the selection set
    'showNormals' will add a compound object composed by a set of arrows showing the 
        normal direction for each panel
    'folder' is the folder in which 'filename' will be saved
    
    Example:
    export_faces("mymesh.txt", folder="C:/temp")
'''


Best Regards,
Enrico
Go to Top of Page

HallieHe

USA
4 Posts

Posted - May 23 2018 :  22:04:12  Show Profile  Reply with Quote
Thanks! I spent some time to get used to FreeCAD and was able to run it. It turns out I didn't need export_faces - I only need to call export_mesh in the Python Console.

BTW, this macro is so helpful! I was able to convert all the copper pads on my PCB to FastCap and simulate the capacitance.

Hallie He
Go to Top of Page

Enrico

410 Posts

Posted - May 24 2018 :  21:30:30  Show Profile  Reply with Quote
Happy you found it useful! Planning to make it more user-friendly, and with a GUI, since a while, probably this will happen later this year. This will be easier and faster if we can also find a sponsor.

Best Regards,
Enrico

Go to Top of Page
  Previous Topic Topic   
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
FastFieldSolvers Forum © 2018 FastFieldSolvers S.R.L. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.06