From Wikipedia:
MPEG-4 contains patented technologies, the use of which requires licensing in countries that acknowledge software algorithm patents...
But I don't want to steer the discussion to mp4:
From Wikipedia:
Ok @yorik I want to try and do this, but Can you please explain me the process, I have never done something like that before. Like where to put the icons, where the python files and where the user interface file, etc... Where can I look at an example of the simple classes I need to write.yorik wrote: ↑Fri May 10, 2019 2:46 pm This is AMAZING work Humberto! One of the most professional Arch/BIM tools we have in FreeCAD, certainly!
I would love to have this incorporated in Arch! It would be pretty easy I guess, basically placing your macros in the Arch folder, then create a FreeCAD Command for each of them (that can be in the same file), which is basically a class that contains a couple of infos such as tool name, icon... and an Activated() function that is executed when the button is pressed.
A couple of improvements that could be interesting too, in a next move...
- That the frame object would inherit ArchComponent.Component, so it gains all the IFC capabilities
- That the panels appear "swallowed" by the frame object in the tree. For that, a view provider must be created, and its claimChildren() implemented
hhassey wrote: ↑Fri May 10, 2019 6:50 pm @paullee I believe the reason you can't play the video is because you must be using MacOS and they deliberately cut your freedom by not allowing you to play webm format, the reason, because it is a free format. I am aware of the issue, but all my videos are webm and not mp4 because that is another way to support freedom. So sorry for the inconvenience that apple has created on you.
Can you please try to play it with something outside the apple's i-cage ecosystem and report if there is still a problem?
P.S. I play it with GNU/Linux in firefox without any issues.
Humberto.
How exactly do you run the tool currently?hhassey wrote: ↑Sun May 12, 2019 2:48 am Ok @yorik I want to try and do this, but Can you please explain me the process, I have never done something like that before. Like where to put the icons, where the python files and where the user interface file, etc... Where can I look at an example of the simple classes I need to write.
Code: Select all
# A high level command to create the object programmatically,
# that is, without the interface buttons.
# For example, it would be used like
# Arch.makeSteelFrame(length=1000, width=200, panels=6, ...)
def makeRebar():
# A class that defines the command used by the interface.
# It contains standard functions that define what happens when you click on the button.
# If you see the main tree of Arch, there is "Resources/Icons"
# and "Resources/ui" folders to put the icons and user interfaces that you are using;
# these will be found automatically
class _CommandRebar:
def GetResources(self):
def IsActive(self):
def Activated(self):
# A class with the internal code of your tool, again with some standard functions.
class _Rebar(ArchComponent.Component):
def __init__(self,obj):
def setProperties(self,obj):
def onDocumentRestored(self,obj):
def onChanged(self,obj,prop):
def execute(self,obj):
# This sets the graphical properties of your object.
# Every object in FreeCAD has "base properties" and "view properties";
# the first ones can be used without a graphical interface, that is,
# when creating the objects from a script; the latter only make sense
# when you have the interface loaded, for example, things like color,
# rendering mode, line thickness, etc.
# You can copy and paste the code and make simple adjustments.
class _ViewProviderRebar(ArchComponent.ViewProviderComponent):
def __init__(self,vobj):
def setProperties(self,vobj):
def onDocumentRestored(self,vobj):
def getIcon(self):
def setEdit(self, vobj, mode):
def onChanged(self,vobj,prop):
# All the following definitions are auxiliary functions
# that are used everywhere else by your object, you can define as many
# as you need, and should be used in the real creation of your object
# under _SteelFrame(ArchComponent.Component), and in the other classes.
# Your main code will probably be a bunch of definitions here.
def CalculatePlacement(baramount, barnumber, size, axis, ...):
def CustomSpacingPlacement(spacinglist, barnumber, axis, ..):
def strprocessOfCustomSpacing(span_string):
# Finally, this instruction tests whether the graphical interface
# of FreeCAD is active. If it exists, then it registers the graphical command,
# together with its button icon and everything.
if FreeCAD.GuiUp:
FreeCADGui.addCommand('Arch_Rebar', _CommandRebar())
Code: Select all
import FreeCAD
if FreeCAD.GuiUp:
import FreeCADGui
FreeCADGui.updateLocale()
from ArchWall import *
from ArchFloor import *
from ArchFence import *
from ArchSite import *
#for example
from ArchSteelFrame import *
THIS IS SPECTACULAR!!! Well done!!hhassey wrote: ↑Fri May 10, 2019 10:44 pm The Penalization algorithm is really fast, and seeks for an "optimal" solution with the pieces it is allowed to play, it works in such a way that every piece it places, it goes back and checks if the solution can be further optimized using any of the pieces on the list and so on. The algorithm cuts pieces to adjust sizes and if told so, tries to re-use the wasted cut pieces in the process. Notice how it decides that some pieces are better off horizontal and others vertical.
This is a really Hard NP Hard mathematical problem, not to mention how much more complex it makes it by adding windows and doors as well as custom minimum piece sizes.
Here is what it does on a bigger assembly. Notice that on the "Report View" the total waste is reported both as an Area or %.
Screenshot from 2019-05-10 13-56-49.png
See Licence.
So, FreeCAD tries to coexist in this world with other tools, both proprietary and free. It does not go deep into ideological positions about freedom; use what is best for you.jrigel wrote: I know that the discussion on the right licence for open source occupied a significant portion of internet bandwidth and so is here the reason why, in my opinion, FreeCAD should have this one.
I chose the LGPL for the project and I know the pro and cons about the LGPL and will give you some reasons for that decision.
FreeCAD is a mixture of a library and an application, so the GPL would be a little bit strong for that. It would prevent writing commercial modules for FreeCAD because it would prevent linking with the FreeCAD base libs. You may ask why commercial modules at all? Therefore Linux is good example. Would Linux be so successful when the GNU C Library would be GPL and therefore prevent linking against non-GPL applications? And although I love the freedom of Linux, I also want to be able to use the very good NVIDIA 3D graphic driver. I understand and accept the reason NVIDIA does not wish to give away driver code. We all work for companies and need payment or at least food. So for me, a coexistence of open source and closed source software is not a bad thing, when it obeys the rules of the LGPL. I would like to see someone writing a Catia import/export processor for FreeCAD and distribute it for free or for some money. I don't like to force him to give away more than he wants to. That wouldn't be good neither for him nor for FreeCAD.
Nevertheless this decision is made only for the core system of FreeCAD. Every writer of an application module may make his own decision.
Jürgen Riegel, 15 October 2006