General grouping

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: General grouping

Post by wmayer »

An easier way would be to write your own DocumentObserver class where you can track if a certain object gets destroyed. This is also possible to do it in python. Here is a test class how it should look like:

Code: Select all

class DocumentObserver:
    def slotCreatedDocument(doc):
        pass
    def slotDeletedDocument(doc):
        pass
    def slotRelabelDocument(doc):
        pass
    def slotActivateDocument(doc):
        pass
    def slotCreatedObject(obj):
        pass
    def slotDeletedObject(obj):
        pass
    def slotChangedObject(obj, prop):
        pass

inst=DocumentObserver()
FreeCAD.addDocumentObserver(inst)
...
FreeCAD.removeDocumentObserver(inst)
Note, all methods are optional and in your case you should implement slotDeletedObject() as you need it. There youe.g. can check for a Proxy property and if it's there check its type for CMesh. With doc.removeObject("internal_object_name") you can delete an object.
pperisin
Posts: 695
Joined: Wed Oct 20, 2010 12:29 pm

Re: General grouping

Post by pperisin »

Hi,

Just wanted to report that when you make chamfer, it does not group with the part chamfer is made from.

Regards
Petar Perisin
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: General grouping

Post by jriegel »

Im not quit sure it shut...
I think the DressUp features shut stay in modeling history line...
Stop whining - start coding!
pperisin
Posts: 695
Joined: Wed Oct 20, 2010 12:29 pm

Re: General grouping

Post by pperisin »

Hi

I probably did not explain good. So I created two boxes and made fillet on one and chamfer on another one. See what I got in Tree view. Fillet box is under fillet, and chamfer box is in the same level with chamfer.

Also, there are two (gui) functions for fillet and chamfer. The ones with sketcher have the sam problem.

Also, I like icon for fillet, shown in tree view. It shows how you got the object. Can same thing be made with chamfer.

Regards
Petar Perisin
Attachments
Screenshot.jpg
Screenshot.jpg (147 KiB) Viewed 1794 times
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: General grouping

Post by wmayer »

The chamfer object is now the right icon.
Post Reply