Assembly3 preview

Discussion about the development of the Assembly workbench.
realthunder
Posts: 948
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Tue Feb 19, 2019 11:50 pm

Zolko wrote:
Tue Feb 19, 2019 11:03 pm
What I understand from this is that this dragger temporarily disables the App::Placement of any object, and replaces it with its own Placement. And when it's done, it stores the value in the App::Placement of the object ... except that the Expression Engine doesn't allow the overwrite.
There is some confusion here. Most of the object in FC has a 'Placement' property. Its value type in Python is 'App.Placement' (note the dot instead of double colon). The dragger manipulates the Placement property without recomputing, so you see the movement in realtime. But once you click OK, it will trigger a recompute, which is when the expression engine kicks in and overrides the placement.

Now, rather confusingly, there is an object with type 'App::Placement'. And last time you said you want to add custom property to it, I provided the 'App::PlacementPython'. Is this the object you are using for your constraint? This object also has a property 'Placement', and it supports the dragger as well. So if I understand correctly, your problem can be solved by NOT moving your part object with the dragger, but the 'App::Placement' constraint object directly, with the right click and transform action.

If there is any other confusion, it would be better for you to provide a file and tell me exactly which object you want to move.
Try Assembly3 (latest version 0.10) 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
Zolko
Posts: 223
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly3 preview

Postby Zolko » Wed Feb 20, 2019 11:46 am

realthunder wrote:
Tue Feb 19, 2019 11:50 pm
Now, rather confusingly, there is an object with type 'App::Placement'. And last time you said you want to add custom property to it, I provided the 'App::PlacementPython'. Is this the object you are using for your constraint? This object also has a property 'Placement', and it supports the dragger as well. So if I understand correctly, your problem can be solved by NOT moving your part object with the dragger, but the 'App::Placement' constraint object directly, with the right click and transform action.
OK ... so ... the constraint I use is now of type App::FeaturePython, to which I add an App::PropertyPlacement (called AttachmentOffset):

Code: Select all

constrFeature = self.activeDoc.getObject('Constraints').newObject( 'App::FeaturePython', constrName )
...
constrFeature.addProperty( 'App::PropertyPlacement', 'AttachmentOffset', 'Attachment' )

The App::PropertyPlacement "AttachmentOffset" is used in the ExpressionEngine as offset between the attachment LCS in the assembly and the attached LCS in the part:

Code: Select all

expr = '<<'+attLCS+'>>.Placement.multiply( <<'+constrName+'>>.AttachmentOffset ).multiply( .<<'+linkLCS+'.>>.Placement.inverse() )'

Do you think the dragger could be used for this entity ? Would it help to rename it to something else ?

(the App::FeaturePython was used so that later it could be used as basis / container for other types of constraints with regular solver. But since I don't know how other assemblies represent their constraints, I don't know whether such an App::FeaturePython can be used for that)
realthunder
Posts: 948
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Wed Feb 20, 2019 10:52 pm

Zolko wrote:
Wed Feb 20, 2019 11:46 am
OK ... so ... the constraint I use is now of type App::FeaturePython, to which I add an App::PropertyPlacement (called AttachmentOffset):
I see. If the sole purpose of this constraint object is to provide an offset, then it makes more sense to change it to App::PlacementPython, simply like this.

Code: Select all

constrFeature = self.activeDoc.getObject('Constraints').newObject( 'App::PlacementPython', constrName )
My latest AppImage already has this. With the above Python code, the newly created App::Placement cannot be made visible, so you won't see the axis cross. This maybe what you want actually. You can still right click and transform, or simply double click. To show it, you need to run the following code once.

Code: Select all

constrFeature.ViewObject.Proxy = 1
This is just a trick to get a Python extension object showing, which seems to be all your need at the moment. The proper way of deriving your own object is to write your Python class, and create an object of your class and assign it to constrFeature.Proxy, and constrFeature.ViewObject.Proxy.
Try Assembly3 (latest version 0.10) 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
freecad-heini-1
Posts: 5399
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Assembly3 preview

Postby freecad-heini-1 » Thu Feb 21, 2019 9:31 am

realthunder wrote: Defining Geometry, trim
Hi Realthunder,
thank you so much for your great work.
I explored your new Defining Geoemtry tool. It's so great. I asked for such a tool many times, and now it's there.
But please can you check why it's impossible to use the trim tool to trim edges?
defining_geoemtry_trim.gif
defining_geoemtry_trim.gif (592.27 KiB) Viewed 608 times
Thank you so much and best regards from Germany
Wilfried

In Pro-Engineer a similar tool is working like to see in my animgif:
Image
realthunder
Posts: 948
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Thu Feb 21, 2019 10:59 am

freecad-heini-1 wrote:
Thu Feb 21, 2019 9:31 am
But please can you check why it's impossible to use the trim tool to trim edges?
Currently, the attached geometry is just a faithful projection of the external edge. There is no way to make any change on that. I'll see if I can extend it to support trimming.

BTW, I saw somewhere else that you are also asking for multi-solid support in PartDesign. I have implemented it and will be available in next release.
Try Assembly3 (latest version 0.10) 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
freecad-heini-1
Posts: 5399
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Assembly3 preview

Postby freecad-heini-1 » Thu Feb 21, 2019 11:06 am

realthunder wrote:
Thu Feb 21, 2019 10:59 am
BTW, I saw somewhere else that you are also asking for multi-solid support in PartDesign. I have implemented it and will be available in next release.
https://forum.freecadweb.org/viewtopic. ... 66#p288266
Very good!!! Great news.

The Define Edge Tool in combination with a offset Tool would also be very helpful:
Image
m.cavallerin
Posts: 77
Joined: Wed May 30, 2018 6:59 pm

Re: Assembly3 preview

Postby m.cavallerin » Fri Feb 22, 2019 9:12 pm

Hi realthunder,

just a request, maybe already in development: is it possible to implement a sort of copy&paste aux function to replace two elements on a constrain?

The reason is: as the tree structure after a bit of elements have been added it becomes too long, If you fail to add an element reference on a constrain, it would be of great help if:

1 - select the new element
2 - copy the reference
3 - go to the constrain to be edited
4 - paste the reference.

I know that is already possible to drag over an element the new reference, but when the feature tree is long, it becomes more difficult to make this kind of action.

Regards

Michele
realthunder
Posts: 948
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Fri Feb 22, 2019 11:01 pm

m.cavallerin wrote:
Fri Feb 22, 2019 9:12 pm
Hi realthunder,

just a request, maybe already in development: is it possible to implement a sort of copy&paste aux function to replace two elements on a constrain?
If you are using Linux, there is already a keyboard shortcut to help with this process, it works like this
  • Select a geometry element in 3D view
  • Scroll/expand/collapse the tree view to find the constraint element you want to modify. Do not select anything in this step. You can rely on mouse over highlight to help finding the item.
  • Press keyboard shortcut 'T + D', and you will find the drag and drop is activated
  • Drag the item over to the constrain element, and click the mouse button to complete the drop.
For Mac platform, after you press the shortcut 'T+D', you need to quickly click and hold your mouse button to activate the drag. For Windows, unfortunately it does not work at all.

I plan to implement dragging from 3D view to tree view to better support all three platforms.
Try Assembly3 (latest version 0.10) 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
Zolko
Posts: 223
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly3 preview

Postby Zolko » Sun Feb 24, 2019 3:50 pm

realthunder wrote:
Fri Feb 22, 2019 11:01 pm
I plan to implement dragging from 3D view to tree view to better support all three platforms.
Are you sure this is the most urgent of the needs ? I'm really concerned that your branch is getting ever further away from the "official" codebase, and that merging the really important stuff is going to be more-and-more difficult.

I have the feeling FreeCAD is going nowhere currently (duplication of functionalities in App::Part and App::PartDesign, active ignorance of known issues, UI mess, bikeshedding with endless discussions about new logo, web browser WB, new name...). Look at the header of this section: since 2-1/2 years it says that nothing is happening on the assembly front in FreeCAD: there are 3 new WBs for assembly, what do they need ?

ickby wrote: It depends, do you have some code for us to review?
"us" ... who are these "us" ?
chrisb
Posts: 15618
Joined: Tue Mar 17, 2015 9:14 am

Re: Assembly3 preview

Postby chrisb » Sun Feb 24, 2019 6:52 pm

Zolko wrote:
Sun Feb 24, 2019 3:50 pm
there are 3 new WBs for assembly
I know of Assembly3 and A2Plus. Which is the third one?