Foxelmanian / ToOptixFreeCADAddon

Addon for FreeCAD using ToOptix
GNU General Public License v2.0
18 stars 2 forks source link

Does this Addon work with FreeCAD v0.19.x ? #2

Open luzpaz opened 4 years ago

luzpaz commented 4 years ago

CC @berndhahnebach

Foxelmanian commented 4 years ago

@luzpaz I dont think so, due to the change in the API. But I can rewrite that one.

Currently its working only on FreeCAD v.017. But it just takes some small amount of effort to rewrite these functions on the latest version.

Is there a documentation on FreeCAD v0.19 especally for the API.

joha2 commented 4 years ago

Hey guys I worked on it quite for a while, but I did not get it complete. But I could provide a pull request. See the workbench PR. Maybe it helps!

luzpaz commented 4 years ago

Nice @joha2!

Foxelmanian commented 4 years ago

@joha2 Hi,

currently I am programming on a more advanced topology optimization API. I hope I can add noise reduction and a speed performance about 100%.

I will take a look on your UI (I have never worked with QT)

joha2 commented 4 years ago

Hey @DMST1990 nice one! What's the difference to ToOptix? How did you improve? Can the changes be incorporated into ToOptix?

Best wishes Johannes

Foxelmanian commented 4 years ago

Hi @joha2 I have created a Software Architecture (Builder Pattern),

where we can combine several load cases (heat transfer, static analysis, sound wave function) by weight factors (pareto optimization).

Also i will add an option solving voxelized objects with a python internal sparse solver :), by building up stiffness matrixes by myself. For these elements a quite advanced interpolation method on nodes can be used. ( I always have to wait for the review of some paper until i can upload the corresponding code :)).

The canges can incoperate with ToOptix but the API looks quite similar but with additional settings.

Best wishes

Martin

joha2 commented 4 years ago

Hey @DMST1990 sorry for my late reply! Your improvements sound really cool! Would be really nice if we could implement them here, such that FreeCAD could have a real nice topology optimization workbench. Can you estimate, how long it will take, to implement these things into this repo? Or do you plan to start a new repo with all the new stuff? Is there any literature on your new stuff? Like the paper you mentioned? Are you able to share it?

Sorry for all my questions, I am really excited about this stuff :-)

Best wishes Johannes

Foxelmanian commented 4 years ago

Hi @joha2 sorry for the late response. I just tried to implement that one :). Currently it only works for Voxel-Grids. I will start a new repro, because i try to implement a automatic parametric reconstruction into a CAD-Like format. I think this an take up to 6 months (depending on thre review).

Best Regards

Martin

j2l commented 4 years ago

+1, would love to see it works for FreeCAD 0.19 and 0.18

madnificent commented 4 years ago

Hi @VoxelBeaver, any news on the updated API? Being able to specify multiple load patterns to be optimized would be awesome to play with! I'm thinkering with some 3D printer optimizations where it could help.

Foxelmanian commented 4 years ago

Hi @madnificent , on the API yes but not on the FreeCAD-Version.

You can still use several loadcases, but only on the core functionality. https://github.com/VoxelBeaver/ToOptixCore

I hope that i can recenlty publish some now Code. For more details you can read the open acess publication: https://www.designsociety.org/publication/43028/Multi-Objective+Topology+Optimization+of+Heat+Conduction+and+Linear+Elastostatic+using+Weighted+Global+Criteria+Method

joha2 commented 4 years ago

Hey @VoxelBeaver nice paper! I would suggest when you create an API for this optimization, just concentrate on the pure Python implementation with some nice frontend functions only getting file names or parameters (dictionaries).

class TopoOptimizer:
      def __init__(self, init_parameters_dict):
            pass
      def init_load_case_and_boundary_definitions(self, load_case_boundary_dict):
            pass
      def optimize(self, optimization_parameters_dict):
            pass
      def write_results_to_stl_file(self, filename):
            pass

The API will fill up the parameter dictionaries as needed and does not need to know how the class works inside. Important is (I think that these were the major problems in our last attempt to create a GUI), that:

I cannot wait until you have your API completed :-)

Best regards Johannes

Foxelmanian commented 4 years ago

Hi @joha2 sorry for the late response, thanks. The paper will be extended hopefully in further publications, but its currently limited to voxel elements. (No need of CalculiX any more but scipy dependencie).

I can change the API quite fast, but the results of the current paper will be available after my PHD (Then I have enough time for that) :)

Best Regards,

Martin