Assembly3 preview

Discussion about the development of the Assembly workbench.
triplus
Posts: 8677
Joined: Mon Dec 12, 2011 4:45 pm

Re: Assembly3 preview

Postby triplus » Wed Jan 10, 2018 5:51 pm

realthunder wrote:
Wed Jan 10, 2018 6:51 am
Here is how ArcLineTangent works. This constraint has a property called AtEnd, if sets to True, then the tangent happens at the end point of the arc. If False, then the other point. So it is better to company the ArcLineTangent constraint with either PointConicidence or PointOnLine constraint. Please see the attached file for an example.
Thanks for the info.

Yes i was able to figure something like that out in my tests. But it felt like there is an additional step missing somewhere. Looking at the DOF and by adding additional Perpendicular/Angle constraint. That brings the final result closer to my initial expectations.

Nice!
realthunder
Posts: 1166
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Fri Jan 12, 2018 3:06 am

nadrimajstor wrote:
Wed Jan 10, 2018 12:47 pm
Having said that, is there some asm3 docs/tutorials/videos that would bring me to speed (i.e. how-to from the user perspective)?
I think creating simple assembly with asm3 is quite intuitive. Just simple select in 3D view and click some toolbar button, or some drag and drop. You can follow a simply tutorial in the asm3 Readme. The tutorial uses the Link array function to duplicate a simple sub-assembly,
Screenshot from 2018-01-12 10-55-29.png
Screenshot from 2018-01-12 10-55-29.png (2.68 KiB) Viewed 794 times

and creates a multi-joint assembly
Screenshot from 2018-01-12 10-55-21.png
Screenshot from 2018-01-12 10-55-21.png (5.95 KiB) Viewed 794 times

Every time you select some geometry element and creates some constraint, asm3 will automatically create intermediate Element object and store them inside Elements group. You can consider this group holding the interface/protocol of the owner assembly. Now, suppose you want to replace the sub assembly with the following one,
Screenshot from 2018-01-12 10-55-46.png
Screenshot from 2018-01-12 10-55-46.png (3.77 KiB) Viewed 794 times

This is how you do it in asm3. Note that I did not rename the first two Elements in the following screencast, because those Elements are used internally by the original sub-assembly. They are not involved in part replacement. But when you modifies the geometry model of part, you may want to check those internal elements, too.
Image
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
fosselius
Posts: 344
Joined: Sat Apr 23, 2016 10:03 am

Re: Assembly3 preview

Postby fosselius » Fri Jan 12, 2018 8:18 am

realthunder wrote:
Fri Jan 12, 2018 3:06 am
Image
Love.. Pure Love! <3 do you have a donation button available?

Part Design Next + Asm3 have finally made FreeCAD into a viable alternative to commercial CAD applications.
I have been eagerly been awaiting FreeCAD to reach this state since 2012.. back then i thought it would be only a few months away as assembly was seriously discussed and on the road map.
User avatar
dulouie
Posts: 71
Joined: Tue Oct 03, 2017 4:14 pm

Re: Assembly3 preview

Postby dulouie » Fri Jan 12, 2018 9:59 am

Hi realthunder, i can't complie your LinkStage3 branch with gcc 7.2.0.

Code: Select all

[ 12%] Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/ViewProviderLink.cpp.o
/home/user/src/FreeCADLinkStage3/src/Gui/ViewProviderLink.cpp: In member function 'Base::Placement Gui::ViewProviderLink::currentDraggingPlacement() const':
/home/user/src/FreeCADLinkStage3/src/Gui/ViewProviderLink.cpp:2147:75: error: no match for 'operator[]' (operand types are 'SbRotation' and 'int')
     return Base::Placement(Base::Vector3d(v[0],v[1],v[2]),Base::Rotation(r[0],r[1],r[2],r[3]));
                                                                           ^
/home/user/src/FreeCADLinkStage3/src/Gui/ViewProviderLink.cpp:2147:80: error: no match for 'operator[]' (operand types are 'SbRotation' and 'int')
     return Base::Placement(Base::Vector3d(v[0],v[1],v[2]),Base::Rotation(r[0],r[1],r[2],r[3]));
                                                                                ^
/home/user/src/FreeCADLinkStage3/src/Gui/ViewProviderLink.cpp:2147:85: error: no match for 'operator[]' (operand types are 'SbRotation' and 'int')
     return Base::Placement(Base::Vector3d(v[0],v[1],v[2]),Base::Rotation(r[0],r[1],r[2],r[3]));
                                                                                     ^
/home/user/src/FreeCADLinkStage3/src/Gui/ViewProviderLink.cpp:2147:90: error: no match for 'operator[]' (operand types are 'SbRotation' and 'int')
     return Base::Placement(Base::Vector3d(v[0],v[1],v[2]),Base::Rotation(r[0],r[1],r[2],r[3]));
                                                                                          ^
make[2]: *** [src/Gui/CMakeFiles/FreeCADGui.dir/build.make:7392: src/Gui/CMakeFiles/FreeCADGui.dir/ViewProviderLink.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5326: src/Gui/CMakeFiles/FreeCADGui.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
To get it working i hacked your code like:

Code: Select all

Base::Placement ViewProviderLink::currentDraggingPlacement() const{
    assert(pcDragger);
    SbVec3f v;
    SbRotation r;
    float q1, q2, q3, q4;
    if(useCenterballDragger) {
        SoCenterballDragger *dragger = static_cast<SoCenterballDragger*>(pcDragger.get());
        v = dragger->center.getValue();
        r = dragger->rotation.getValue();
        r.getValue(q1,q2,q3,q4);
    }else{
        SoFCCSysDragger *dragger = static_cast<SoFCCSysDragger*>(pcDragger.get());
        v = dragger->translation.getValue();
        r = dragger->rotation.getValue();
        r.getValue(q1,q2,q3,q4);
    }
    return Base::Placement(Base::Vector3d(v[0],v[1],v[2]),Base::Rotation(q1,q2,q3,q4));
}
But i think there is a more elegant way to do this properly?

Btw very nice work! I can't wait for the final release.
Last edited by dulouie on Fri Jan 12, 2018 1:13 pm, edited 1 time in total.
realthunder
Posts: 1166
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Fri Jan 12, 2018 10:22 am

dulouie wrote:
Fri Jan 12, 2018 9:59 am
Hi realthunder, i can't complie your LinkStage3 branch with gcc 7.2.0.
Thanks for the report. I'll use your patch, but I doubt it is relevant to gcc version, more likely related to your version of libcoin. What platform are you on?
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
dulouie
Posts: 71
Joined: Tue Oct 03, 2017 4:14 pm

Re: Assembly3 preview

Postby dulouie » Fri Jan 12, 2018 10:43 am

I'm on Arch Linux. The installed coin package is -> https://www.archlinux.org/packages/comm ... 6_64/coin/
Last edited by dulouie on Sun Jan 21, 2018 7:34 pm, edited 1 time in total.
User avatar
f3nix
Posts: 299
Joined: Sat May 30, 2015 11:58 am

Re: Assembly3 preview

Postby f3nix » Fri Jan 12, 2018 9:21 pm

Hi!
I have just finished compiling the Assembly3 branch.

I get a strange error after few steps of "Super Assembly" tutorial.

Code: Select all

Coin error in SoSeparator::GLRenderBelowPath(): GL error: 'GL_OUT_OF_MEMORY', nodetype: SoBrepFaceSet
Coin error in SoSeparator::GLRenderBelowPath(): GL error: 'GL_OUT_OF_MEMORY', nodetype: SoBrepFaceSet
Coin error in SoSeparator::
And the screen looks like this:
assembly3-bug.png
assembly3-bug.png (164.44 KiB) Viewed 674 times
This is with:

Code: Select all

OS: Debian GNU/Linux unstable (sid)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12937 (Git)
Build type: Debug
Branch: LinkStage3
Hash: 9328f33d6a353828312d7ace4993e1a1e74508f3
Python version: 2.7.14+
Qt version: 5.9.2
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Polish/Poland (pl_PL)
Any idea what is going on? This only happens with documents which contain assemblies in it.

Thanks.

Cheers,
Mateusz
realthunder
Posts: 1166
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Fri Jan 12, 2018 11:10 pm

f3nix wrote:
Fri Jan 12, 2018 9:21 pm
Hi!
I have just finished compiling the Assembly3 branch.

I get a strange error after few steps of "Super Assembly" tutorial.
Hi, could you please try LinkDev branch and see if the problem is resolved? And also, please attach your model file here. I'll take a look
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
f3nix
Posts: 299
Joined: Sat May 30, 2015 11:58 am

Re: Assembly3 preview

Postby f3nix » Sat Jan 13, 2018 7:08 am

realthunder wrote:
Fri Jan 12, 2018 11:10 pm
Hi, could you please try LinkDev branch and see if the problem is resolved? And also, please attach your model file here. I'll take a look
Hi!
I get the same errors with the LinkDev branch. Compiled against Qt4 and Qt5. The error message goes away when I put "Link_Assembly" into a new "Assembly".

I'm attaching the files.

Thanks.

Cheers,
Mateusz
Attachments
file2.FCStd
(3.32 KiB) Downloaded 15 times
object1.FCStd
(7.51 KiB) Downloaded 12 times
realthunder
Posts: 1166
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Sat Jan 13, 2018 9:30 am

f3nix wrote:
Sat Jan 13, 2018 7:08 am
Hi!
I get the same errors with the LinkDev branch. Compiled against Qt4 and Qt5. The error message goes away when I put "Link_Assembly" into a new "Assembly".
Hmm...I think this is going to be a tough one to track down. Your file works fine on my build. I can track down the error reporting code in libcoin. Are you doing some development work with libcoin? Because the error is only reported if you have set an environment variable COIN_GLERROR_DEBUGGING=1.

Can you please try to turn off/on VBO in Preference->Display and see if there is any difference? Finally, can you please download the AppImage here. Just download it, chmod +x, and run it. If it works fine, then it most likely be the version of libcoin on your system is causing the problem. Please send me your full package version string so that I can download and compare the source code with mine. If the AppImage has the same error, then maybe your graphics driver is the problem, or more specifically, the way libcoin uses OpenGL cause problem with your graphics driver?
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal