Search found 184 matches

Go to advanced search

by project4
Mon Sep 28, 2020 9:16 am
Forum: Developers corner
Topic: Identify a visible part
Replies: 7
Views: 218

Re: Identify a visible part

Found a case.
Reported to realthunder:
https://github.com/realthunder/FreeCAD/issues/47
by project4
Mon Sep 28, 2020 8:40 am
Forum: Developers corner
Topic: Identify a visible part
Replies: 7
Views: 218

Re: Identify a visible part

It would be better if you provide an example file; often the model has modelling problems and that causes invalid shapes. Hmm... I'm trying to find the file where I saw the problem, but can't reproduce it. I've used many old tutorial files, which probably were created with some old or custom build ...
by project4
Sun Sep 27, 2020 5:17 pm
Forum: Developers corner
Topic: Identify a visible part
Replies: 7
Views: 218

Re: Identify a visible part

for obj in App.ActiveDocument.Objects: if obj.isDerivedFrom("PartDesign::Feature"): print("It's a feature") Thanks, I will try that. Looks like that's exactly what I need. However, I'm not sure what you want to do. For an exploding assembly you would need to move entire Bodies, not the individual f...
by project4
Sun Sep 27, 2020 4:05 pm
Forum: Developers corner
Topic: Identify a visible part
Replies: 7
Views: 218

Identify a visible part

Hello All, Is there an easy way to identify a visible part of an object in python? I'm trying to implement explode feature for Assembly4 and need a way to traverse other sub-objects and find a visible part/face. I thought to filter the objects using their TypeId, but now I realize that I have to tak...
by project4
Sun Sep 27, 2020 3:46 pm
Forum: Assembly
Topic: Exploding with Assembly4
Replies: 8
Views: 704

Re: Exploding with Assembly4

Teaser for work in progress feature...
Original part:
Screenshot from 2020-09-27 18-42-27.png
Screenshot from 2020-09-27 18-42-27.png (17.12 KiB) Viewed 137 times
Exploded:
Screenshot from 2020-09-27 18-42-15.png
Screenshot from 2020-09-27 18-42-15.png (27.02 KiB) Viewed 137 times
by project4
Mon Sep 21, 2020 10:38 am
Forum: Developers corner
Topic: Object.Visibility is extremely slow
Replies: 4
Views: 213

Re: Object.Visibility is extremely slow

Open a test assembly4 project (I used example2 with crankshaft). https://github.com/Zolko-123/FreeCAD_Examples Right click on any linked object in the tree view. Select "Send to Python Console" from the context menu. Python console will execute a command that will assign the selected object into "ob...
by project4
Sun Sep 20, 2020 3:26 pm
Forum: Developers corner
Topic: Object.Visibility is extremely slow
Replies: 4
Views: 213

Re: Object.Visibility is extremely slow

A bit more data: Commenting out the following code block from the ViewProviderDocumentObject::show() function cuts the execution to 0.02-0.03 seconds every time, while the functionality still works fine (at least the 3D view gets updated). // use this bit to check whether 'Visibility' must be adjust...
by project4
Sun Sep 20, 2020 2:53 pm
Forum: Developers corner
Topic: Object.Visibility is extremely slow
Replies: 4
Views: 213

Object.Visibility is extremely slow

Hello All, I've implemented a feature of show/hide some objects for Assembly4 in Python. The implementation requires to traverse over all the objects in the document tree and show/hide the needed ones (LCSs). I have a model with few hundreds of such LCSs, while traversing over the objects I set Visi...
by project4
Thu Sep 17, 2020 1:24 pm
Forum: Developers corner
Topic: Get number of available rows from spreadsheet
Replies: 2
Views: 135

Re: Get number of available rows from spreadsheet

Looping on all the rows is a workaround, it's not a spreadsheet API...
by project4
Wed Sep 16, 2020 1:13 pm
Forum: Developers corner
Topic: Get number of available rows from spreadsheet
Replies: 2
Views: 135

Get number of available rows from spreadsheet

Hi, I might be missing something, or there is no such API? Here's my situation: I add some rows to the spreadsheet in python with set function. All works great, the alias helps to find the data I need in the document. The problem starts when I need to add more rows to the document... Can't find any ...

Go to advanced search