Assign materials (electric and electromagnetic properties) to a compound in Points WB - Python lib processing

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
dfosorio11
Posts: 36
Joined: Thu Sep 09, 2021 10:58 pm

Assign materials (electric and electromagnetic properties) to a compound in Points WB - Python lib processing

Post by dfosorio11 »

Hello dear community and fellow pro developers!

Long time no see and best of regards to everyone. I'm working at the processing of Point Clouds files via a Python Library.
I need to assign electric properties ( The following: relative permittivity, conductivitym relative permeability, magnetic loss) to the points exported from FreeCAD.
I have managed to develop a 3D Numpy integer library which converts the Point Clouds of each body part from FreeCAD with macro pd_extract_features.py but, as the Point clouds of each body part is individually extracted in relation to the entire compound therefore the orginial dimensions do not agree.

I need an alternative of export files which I can sucessfully process individually and I can export that the dimensions in relation with the other body parts agree with the entire compound (material assignation is done in the Python Lib and post processing simulator), maybe with the Mesh WB or something. The important thing is that the export files for each body-part agrees with the original geometry of the compound.

I attach the results of the different results:


The first 2 correspond to the most accurate results desired beacuse all the body parts of the 3D compound agree in dimensions because the Python Lib processing was done using the entire Point Cloud of the compound, therefore there is no material assigment. The botton body part agrees with the orginal dimensions.

The third image shows the 3D Numpy integer Lib and then each material has each own integer and color, but dimensions don't agree so it just won't work.

I need an alternative to processes this FreeCAD files so I can process each body part individually and with the original dimensions for post processing.

Thanks in advance
Big hugs
Attachments
im16_paraview_body_parts_respaldo.PNG
im16_paraview_body_parts_respaldo.PNG (11.78 KiB) Viewed 385 times
im16_3Dint_2.PNG
im16_3Dint_2.PNG (111.52 KiB) Viewed 385 times
im15_paraview_antenna_vivaldi2.PNG
im15_paraview_antenna_vivaldi2.PNG (11.78 KiB) Viewed 385 times
im14_paraview_antenna_vivaldi.PNG
im14_paraview_antenna_vivaldi.PNG (14.96 KiB) Viewed 385 times
dfosorio11
Posts: 36
Joined: Thu Sep 09, 2021 10:58 pm

Re: Assign materials (electric and electromagnetic properties) to a compound in Points WB - Python lib processing

Post by dfosorio11 »

Sorry images related are from bottom to top, so the last 2 actually correspond to the 2 correspond to the most accurate results desired!!
Thanks
Post Reply