Search found 2913 matches

Go to advanced search

by looo
Wed Sep 14, 2016 2:27 pm
Forum: Developers corner
Topic: Packaging solution: (ana)conda
Replies: 233
Views: 25775

Re: Packaging solution: (ana)conda

it's not possible to call new netgen::Mesh inside of the smesh netgen-plugin. This will always have memory corruption. But with the new netgen interface we will have to construct the mesh within the smesh netgen-plugin. I have no idea how to make this work. Maybe there is missing an include??? https...
by looo
Mon Sep 12, 2016 9:31 am
Forum: Help on using FreeCAD
Topic: converting wires to tubes at any angle
Replies: 19
Views: 2458

Re: converting wires to tubes at any angle

Nice to see that this is already possible with pure gui functions. the frame tools I have made once are still alive. The tools are limited to straight extruded pipes (no arcs...). The cutting options are miter-cut, shape-cut and plane cut. The first two work good, the last is very dependent on topol...
by looo
Sun Sep 11, 2016 10:21 am
Forum: Developers corner
Topic: Packaging solution: (ana)conda
Replies: 233
Views: 25775

Re: Packaging solution: (ana)conda

trying the other method cause a crash. This is how I have tried to solve the problem: https://github.com/looooo/FreeCAD/blob/occ_patch/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp#L2507 #0 0x00007ffff3d28418 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:5...
by looo
Sat Sep 10, 2016 9:27 pm
Forum: Developers corner
Topic: Packaging solution: (ana)conda
Replies: 233
Views: 25775

Re: Packaging solution: (ana)conda

Hmm, but have a look at this example: creating a shared pointer with std::make_shared seems to create not only a new instance but also a new raw-pointer. #include <memory> #include <iostream> class A { }; int main() { A* a; a = NULL; std::shared_ptr<A> a_ptr(a, [](A*){}); a_ptr = std::make_shared<A>...
by looo
Sat Sep 10, 2016 5:05 pm
Forum: Developers corner
Topic: Packaging solution: (ana)conda
Replies: 233
Views: 25775

Re: Packaging solution: (ana)conda

I have tried to un-un-comment the line you have mentioned. No crash but also no mesh.
Could it be that the pointer used in smesh netgen plugin is still a Nullptr?

Code: Select all

_ngMesh=NULL;
shared_ptr<Mesh> mesh_ptr(_ngMesh,  [](Mesh*){});
mesh_ptr = make_shared<Mesh>();
mesh_ptr.get() == _ngMesh //????
by looo
Sat Sep 10, 2016 4:38 pm
Forum: Developers corner
Topic: Packaging solution: (ana)conda
Replies: 233
Views: 25775

Re: Packaging solution: (ana)conda

But isn't the old way more strange? (Creating a new mesh inside of netgen which is used outside the library.) When should the mesh be deleted? Why not create an instance of the mesh inside of smesh netgen-plugin? something like this: #if NETGEN_VERSION >=6 _ngMesh = new netgen::Mesh(); std::shared_p...
by looo
Sat Sep 10, 2016 3:01 pm
Forum: Developers corner
Topic: Packaging solution: (ana)conda
Replies: 233
Views: 25775

Re: Packaging solution: (ana)conda

in older versions of netgen a new mesh was created inside the OCCGenerateMesh function. https://github.com/vejmarie/netgen_5.3. ... .cpp#L1283.
by looo
Sat Sep 10, 2016 2:08 pm
Forum: Developers corner
Topic: Packaging solution: (ana)conda
Replies: 233
Views: 25775

Re: Packaging solution: (ana)conda

thanks, I have tried to debug with std::cerr. It seems that the problem is at the first call to OCCGenerateMesh . And in this function the crash happen here: https://github.com/looooo/netgen/blob/master/libsrc/occ/occgenmesh.cpp#L1294 Looking at the smesh implementation the shared pointer holds a NU...
by looo
Fri Sep 09, 2016 10:53 am
Forum: Developers corner
Topic: Packaging solution: (ana)conda
Replies: 233
Views: 25775

Re: Packaging solution: (ana)conda

any ideas how to debug the netgen stuff? I tried to place std::cout in the netgen plugin but nothing got printed. I also have build netgen in debug mode, but gdb doesn't show anything related to netgen.
by looo
Fri Sep 09, 2016 5:51 am
Forum: Archived Pull Requests
Topic: PR: some updates in smesh netgen plugin for netgen6.1
Replies: 11
Views: 1264

Re: PR: some updates in smesh netgen plugin for netgen6.1

No, it's only to make freecad build with netgen6.1.

Go to advanced search