Topological Naming (another take)
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 656
- Joined: Tue May 19, 2015 1:11 am
Re: Topological Naming (another take)
Posted a brief readme on the OccWrapper repository. I hope to add more info to the TopoManager repository too, to hopefully make my code a bit easier to understand.
- tanderson69
- Veteran
- Posts: 1626
- Joined: Thu Feb 18, 2010 1:07 am
Re: Topological Naming (another take)
occ containers comes up quite often. have you seen romans blog about standard allocators?ezzieyguywuf wrote: ↑Tue Mar 27, 2018 3:19 am Posted a brief readme on the OccWrapper repository. I hope to add more info to the TopoManager repository too, to hopefully make my code a bit easier to understand.
http://opencascade.blogspot.com/2011/11 ... rface.html
http://opencascade.blogspot.com/2012/11 ... art-2.html
-
- Posts: 656
- Joined: Tue May 19, 2015 1:11 am
Re: Topological Naming (another take)
I had not seen those, thanks for posting. I think taking Roman's example and expanding it (or utilizing it straight up) would probably be a good idea for a better long-term OccWrapper solution.tanderson69 wrote: ↑Tue Mar 27, 2018 2:36 pm occ containers comes up quite often. have you seen romans blog about standard allocators?
http://opencascade.blogspot.com/2011/11 ... rface.html
http://opencascade.blogspot.com/2012/11 ... art-2.html
As it stands, a planned improvement is to do away with, say, Occ::Solid::myFaces (which is a local std::vector of all of Occ::Solid's TopoDS_Face's), and move the getFaces method up to Occ::Shape.
The return type of getFaces will have to change from a constant reference to a plain copied vector. The Occ::Shape::getFaces method would then utilize TopExp::Map (or w/e) to construct a new vector each time it is called and return that vector.
This would result in more processing each time getFaces is called (since we'd had to loop through each face each time to create the vector), but would also mean that any TopoDS_Face's that are stored in a vector would essentially be transient. They'd be gone as soon as they go out of scope. This could effectively minimize the issue that Roman mentions in his blog post. That doesn't mean that we'd want to completely ignore his suggestion, though, as what I'm proposing would merely make things "a bit better" but not really "solve" them the way that OpenCasCade has done so internally.
Re: Topological Naming (another take)
It looks like there are some header files missing. For example:
Code: Select all
src/Mod/Part/App/PropertyTopoShape.h:33:22: fatal error: OccSolid.h
src/Mod/Part/App/FeaturePartBox.cpp:30:27: fatal error: OccSolidMaker.h
src/Mod/Part/App/PropertyTopoShape.h:34:27: fatal error: ISolidManager.h
-
- Posts: 656
- Joined: Tue May 19, 2015 1:11 am
Re: Topological Naming (another take)
What are you trying to compile? Can you post the full output?triplus wrote: ↑Wed Mar 28, 2018 11:29 am It looks like there are some header files missing. For example:
Code: Select all
src/Mod/Part/App/PropertyTopoShape.h:33:22: fatal error: OccSolid.h src/Mod/Part/App/FeaturePartBox.cpp:30:27: fatal error: OccSolidMaker.h src/Mod/Part/App/PropertyTopoShape.h:34:27: fatal error: ISolidManager.h
Re: Topological Naming (another take)
This branch.ezzieyguywuf wrote: ↑Mon Mar 19, 2018 11:42 pm I have a TopoManager branch of FreeCAD that shows these managers in action (I have not rebased against master in a week or two, please excuse my excitement to post this as soon as possible.)
-
- Posts: 656
- Joined: Tue May 19, 2015 1:11 am
Re: Topological Naming (another take)
Ah, that’s because you need to download and compile OccWrapper and TopoManagers libraries, and then update CmakeLosts.txt to point to the right location. I can write a step by step when I’m back at my comp, sorry for the confusion.
-
- Posts: 656
- Joined: Tue May 19, 2015 1:11 am
Re: Topological Naming (another take)
triplus wrote: ↑Wed Mar 28, 2018 2:37 pmThis branch.ezzieyguywuf wrote: ↑Mon Mar 19, 2018 11:42 pm I have a TopoManager branch of FreeCAD that shows these managers in action (I have not rebased against master in a week or two, please excuse my excitement to post this as soon as possible.)
I've updated the second post on this thread that gives a step-by-step on how to compile my TopoManagers branch of FreeCAD. I realize it may seem a bit convoluted, but I wanted to keep OccWrapper and TopoManagers as separate, distinct libraries from FreeCAD in order to allow me to more easily (and quickly) develop them.
Re: Topological Naming (another take)
Thanks for the instructions. Will likely give it a try in next days.
P.S. As for the strategy to make others test your work. Likely current strategy isn't optimal.
P.S. As for the strategy to make others test your work. Likely current strategy isn't optimal.
-
- Posts: 656
- Joined: Tue May 19, 2015 1:11 am