fc info assembly

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Gandouzi Ghayth
Posts: 41
Joined: Wed May 13, 2020 2:45 am

fc info assembly

Post by Gandouzi Ghayth »

hi
thank you my friends for the information which is very interesting for me
make it what i want to do is add part in your
scrpit fc info for the assembly data
can i do that from your fc info script?
User avatar
fosselius
Posts: 381
Joined: Sat Apr 23, 2016 10:03 am
Contact:

Re: fc info assembly

Post by fosselius »

your message is hard to understand. are you a bot?

what do you mean with "add part"?
can you show us the "fc info script"?
Gandouzi Ghayth
Posts: 41
Joined: Wed May 13, 2020 2:45 am

Re: fc info assembly

Post by Gandouzi Ghayth »

I am new with freecad software
https://wiki.freecadweb.org/Macro_FCInfo
FCInfo is a macro give the total information (it's name, volume, vertex number,..) for 1 object selected.
the file is saved in csv (, asc, txt) you open the file with LibreOffice (certainly also with Excell) it is open in a spreedsheet
i need to a macro that can give me the total information about the assembly (it's name,volume ,type of constraint enter 2 object ,...)
a first attempt was made with solidworks which allows the extraction of data from the assembly
Image
Image
Image
i need to do the same worbench with Freecad
dan-miel
Posts: 391
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: fc info assembly

Post by dan-miel »

Gandouzi Ghayth wrote: Thu Jul 09, 2020 11:52 am i need to a macro that can give me the total information about the assembly (it's name,volume ,type of constraint enter 2 object ,...)
I am not a programmer but for those who are, I think the question is:
Do you pay?

Dan
Gandouzi Ghayth
Posts: 41
Joined: Wed May 13, 2020 2:45 am

Re: fc info assembly

Post by Gandouzi Ghayth »

here have work with colabborative man,
it's nice can give me ideas on the script,
if you are looking for paid work I advise you to consult the freelancer site
User avatar
fosselius
Posts: 381
Joined: Sat Apr 23, 2016 10:03 am
Contact:

Re: fc info assembly

Post by fosselius »

I think the main issue is that there are now 3x different assembly modules available in FreeCAD, none of them "official".

what do you mean with assembly? there is asm2+, asm3 and asm4, do not be fooled by the numbering, its different code bases and workflows.

You could also build a "assembly" with the Body and Part containers...

in any case it should be possible to extract all data easily through the python console as long as you know what you want to extract.

You can start with "List all objects" in this page:
https://wiki.freecadweb.org/Code_snippets

if you want to create a workbench you should look here:
https://wiki.freecadweb.org/Workbench_creation

but quickest way to start is to play around in the console and then create a script:
https://wiki.freecadweb.org/Python_scripting_tutorial
dan-miel
Posts: 391
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: fc info assembly

Post by dan-miel »

dan-miel wrote: Thu Jul 09, 2020 1:04 pmDo you pay?
Gandouzi
First, Sorry for being rude. My thought when I posted was it is a lot of programing to create what you posted.

I had an idea for reducing the number of broken constraints in A2plus. I just posted a program that I think shows that the concept works but it is not a good program and I been working on it for 6 months. To create the dialogs that you show in your request is beyond what I can do. I have only worked with A2plus and as fosselius has pointed out the are several assemblies to work with .
I have worked with the SolidWorks api and MS Visual Studio and both are different than FreeCAD and Python.
I'm not trying to scare you away but I think it will take a lot to teach what you are asking.

When you get started there is also a on this forum "Python Scripting and macros" that can answer questions on coding.

Dan
Gandouzi Ghayth
Posts: 41
Joined: Wed May 13, 2020 2:45 am

Re: fc info assembly

Post by Gandouzi Ghayth »

Good evening,
I have an idea to extract the data found in the combined view (info constraint) and save it as an xml or excel file
I just need this is I want to generate it automatically in a macro
Image
Image




is that doable?
if it is doable can someone help me to create a macro?
User avatar
fosselius
Posts: 381
Joined: Sat Apr 23, 2016 10:03 am
Contact:

Re: fc info assembly

Post by fosselius »

if you share an example FreeCAD file of your part/"assembly", we could show you how to extract the data.
Gandouzi Ghayth
Posts: 41
Joined: Wed May 13, 2020 2:45 am

Re: fc info assembly

Post by Gandouzi Ghayth »

https://drive.google.com/drive/folders/ ... p-l4gQ-yOx
this is an example of a small assembly on A2 +
which contains two parts with a constraint of two parallel planes
Post Reply