[SOLVED]Core Freecad developer- Do you know this api used by Nurbs?

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
mariwan
Posts: 469
Joined: Wed Jan 06, 2021 2:00 pm

[SOLVED]Core Freecad developer- Do you know this api used by Nurbs?

Post by mariwan »

HI,
I am trying to convert Microllys code. I see an API he uses that is not familiar for me and I googled .. I cannot find it.

Code: Select all

    if App.ActiveDocument.MAP.faceObject == None:
        App.ActiveDocument.MAP.faceObject=App.ActiveDocument.tmp_multiFace
        App.activeDocument().recompute()

  • MAP
  • faceObject
  • tmp_multiFace
These are weird api .. Does he implemented in cpp these API? I see faceObject everywhere
If the anwer is YES .. at that time it is waste of time to try to convert his code.
Thousands and thousands of lines will be just rubbish.
How sad it will be if some one wasted his time to produce a code that no one could use.. I hope it is not the case.
Last edited by mariwan on Thu Apr 29, 2021 3:05 pm, edited 3 times in total.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Core Freecad developer- Do you know this api used by Microelly2? URGENT PLEASE!!

Post by ickby »

MAP is not part of the default document object API. But all document objects are added as attributes to the document they belong to. So MAP most likely is a custom document object he added to the document, and faceObject a property of that document object.
User avatar
mariwan
Posts: 469
Joined: Wed Jan 06, 2021 2:00 pm

Re: Core Freecad developer- Do you know this api used by Microelly2? URGENT PLEASE!!

Post by mariwan »

Thanks for the reply.
I think I found it.
He has a class with ( In the file isodraw.py)

Code: Select all

class Map(PartFeature):
    def __init__(self, obj, mode=''):
        PartFeature.__init__(self, obj)
        obj.addProperty("App::PropertyVector", "Size","Base").Size = App.Vector(300, -100, 200)
which should create the MAP property.
Last edited by mariwan on Thu Apr 29, 2021 3:08 pm, edited 1 time in total.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Core Freecad developer- Do you know this api used by Microelly2? URGENT PLEASE!!

Post by Kunda1 »

microelly2 is an amazing coder but he more an explorer than a maintainer (at least in the context of FreeCAD). AFAICT from most of his projects, he didn't make them future-friendly or collaboration-friendly. He's was more a proof-of-concept kind of coder.

Edit: coders can do whatever they want to do. We can only encourage and captivate them to collaborate.

Edit2: Please relax your rhetoric. We understand that you're frustrated/sad about this but we can't force people to code a certain way (unless they want to get code merged in to the main freeCAD branch.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
mariwan
Posts: 469
Joined: Wed Jan 06, 2021 2:00 pm

Re: Core Freecad developer- Do you know this api used by Microelly2? URGENT PLEASE!!

Post by mariwan »

All what I said was about making Freecad rich, people who spend their time to code something, they think from the beginning to make it useful for others.
About documentations: As I mentioned in several post, it is kind the culture of some opensource projects. I wish and hope those who wants to make FreeCAD better, think to help other developers to come to the project. By making their code understandable, examples rich, and good API architecture.

For many years ago, I was working on a project, My boss asked me to document what I do, I said I will do it later.. He told me " Later will never comes".
It is true. Either you make it will you code or .. it will not happen.
Thanks anyway.
I am on adding them to my workbench .. And I have a good progress. They might need more developments but I will put them in my WB and later we can work on them to make them better.
thanks again
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Core Freecad developer- Do you know this api used by Microelly2? URGENT PLEASE!!

Post by Kunda1 »

marja1 wrote: Sat Apr 10, 2021 4:36 pm For many years ago, I was working on a project, My boss asked me to document what I do, I said I will do it later.. He told me " Later will never comes".
It is true. Either you make it will you code or .. it will not happen.
Thanks anyway.
I'm in agreement, and this is definitely an issue with opensource in general. Documentation usually gets neglected. Devs want to code but then neglect to document their process. And sometimes code goes to waste, which is sad. I'm glad that you're inspired by microelly2's work and that you're finding use of it. I certainly tried, during the time he was active in the community, to encourage him to port his work to py3 and qt5 (you can see my issues open in his github repos) but he chose not to (he mentioned it was his availability/time + complexity). This is besides the point of documentation and more about maintenance but nevertheless they are related since they both help make code manageable and future-friendly.

Take a look at all the amazing work he did on NURBS in the Shoelast thread. It's amazing! But what will happen to that code now? At least it's on github and available for people to fork, like you are doing with his code elsewhere.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply