-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Assembly] Solve the assembly (Card 9). #10764
Conversation
I can't give a qualified answer about whether these classes are needed or not as I don't know much about assemblies and their requirements. But for the new code you should use the new copyright header and also listen to the warnings reported by Lint. |
Assembly are very similar to sketches actually. You have elements and constraints and you need to solve. Yes for copyrights and warning, it was just an early draft to open discussion. |
I know what the assembly is good for but not much beyond that. |
a7831f5
to
2853484
Compare
So my next step is to be able to create an AssemblyObject in python : |
f61d242
to
d5024f0
Compare
@wwmayer any idea what is wrong with the namespace ? I can't understand what is happening. In visual studio when I follow the error to the generated AssemblyObjectPy.cpp file, the namespace is error-highlighted, then after 2 seconds it becomes ok as if the error is resolved. I tried to follow PartPy example and can't find any difference. The namespace is declared in AssemblyObject.h. |
Another way could be to delegate the solve to a App::Part child (a solver object) who get the joints by parsing it's parent. The FEM solver is working as this. |
|
d5024f0
to
3126520
Compare
FYI, the workaround with clang-format off/on is not needed any more because the sorting of header file has been disabled: b65ae56 |
3126520
to
a255ea2
Compare
Ah thanks ! |
I am still unable to create the object in python. Any idea what is missing here ? |
What are you trying to do? |
So I want to make a subclass of App::Part called Assembly::AssemblyObject. So now my goal is to already make a dummy subclass of App::Part and be able to create this object from python : |
You have to register the class AssemblyObject to FreeCAD's type system. Now in your case you have created a Python extension module To fix this issue you should:
|
Thanks for your feedback! I did those steps, though it still doesn't work. Perhaps I am not using the name AssemblyApp at the correct places ?
Does it implies something besides the steps you gave before ? |
The AssemblyObject is created now but what's missing is the creation of its view provider. Currently AssemblyGui is a normal shared library and in order to make it a Python extension module it must define the entry point PyInit_AssemblyGui. And the type ViewProviderAssembly must be registered. |
b38e5cb
to
5b31a98
Compare
Thanks very much, this is working properly now. To get them :
However I am not sure how I can test to make sure its a Joint and not another random object that ended up in the joints group. Any recommandation about the best way to handle things here ? Thanks |
|
@chennes What is the standard procedure to add a library to freecad ? I am now looking into how to include the OndselSolver and I'm not sure how to proceed. |
OndselSolver is GPLv2 only [1]. [1] https://github.com/Ondsel-Development/OndselSolver/blob/main/LICENSE |
I think we will find a solution to this @sliptonic ? |
Should be LGPL. I'll investigate and revise |
Oops, it is LGPL. I missed the word "Library" in the license terms. Sorry for the noise! |
What about adding it as git sub-module? |
…ther than to the doc origin. This enable 'detaching' them, so that they are not recomputed
…...) and various fixes
…ogonal solutions from solver.
Remove exportASMT from toolbar. Fix Fixedjoint name and tooltip Fix various bugs Introduce solver drag functions.
534871d
to
ead9f41
Compare
@chennes rebased & conflcit fixed |
Exemple of Gear Assembly Watch this video from minute 24 - This is a Great Example how easy is one assebmly in other software. Freecad need This. |
Adds AssemblyObject and viewer in cpp that handle the solving by connecting to ondsel solver.
Fixes #10753
Fixes #10749
Fixes #10754
Fixes #10479
Fixes #11311
Fixes #10751
Fixes #11397
Fixes #10815
Fixes #11606
Fixes #10752