Arch Fence
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Arch Fence
Can a sketch profile be used for the fence post? Maybe this could become a drywall/light steel frame panel constructor:
https://cursospro.info/wp-content/uploa ... -Revit.jpg
https://cursospro.info/wp-content/uploa ... -Revit.jpg
Re: Documenting Arch Fence
Two things.
I think ArchFence.py should import Part explicitly at the beginning. Otherwise you get an undefined Part error.
Code: Select all
Traceback (most recent call last):
File "/home/ecc/.FreeCAD/Mod/Arch/ArchFence.py", line 101, in execute
obj, postPlacements, postLength, sectionLength)
File "/home/ecc/.FreeCAD/Mod/Arch/ArchFence.py", line 173, in calculateSections
sectionCopy, sectionLength, sectionLine.length() - postLength)
File "/home/ecc/.FreeCAD/Mod/Arch/ArchFence.py", line 188, in clipSection
leftBox = Part.makeBox(halfLengthToCut, boundBox.YMax + 1, boundBox.ZMax + 1,
<class 'NameError'>: name 'Part' is not defined
Also, personally, I would add default values like
Code: Select all
def makeFence(section="simple_bars", post="rectangular", path="straight"):
At the end of that command, it should return the object, so the user can manipulate it further.
Code: Select all
return obj
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Re: Documenting Arch Fence
@vocx thanks a lot for your suggestions.
I created a pull request for the two fixes. https://github.com/FreeCAD/FreeCAD/pull/2173
I fixed the missing Part Import now in the clipping method. I did not Import the Part module at the beginning, because other Arch commands do not do this either. I think this is because otherwise the Part module would be imported right when the Arch Workbench gets started, even when you do not use any of the tools inside.
That is 100 percent correct. I changed the name of it.
I think this can be done when a preset functionality is added to the fence. Right now there is nothing that can handle the default values.
Shame on me that I missed that. Added the return statement now.
I created a pull request for the two fixes. https://github.com/FreeCAD/FreeCAD/pull/2173
Re: Documenting Arch Fence
Although I know other Arch commands import the Part module in the functions, I think this is in fact terrible. Imports in Python should be done at the top of the file. It is basically impossible to build any geometry without importing it first, so the import should happen at the top anyway.furti wrote: ↑Tue May 14, 2019 3:58 pm I fixed the missing Part Import now in the clipping method. I did not Import the Part module at the beginning, because other Arch commands do not do this either. I think this is because otherwise the Part module would be imported right when the Arch Workbench gets started, even when you do not use any of the tools inside.
Just like the Arch Window, you could define a makeFencePreset() function that creates a standard fence from a couple of hard coded presets.
https://github.com/FreeCAD/FreeCAD/blob ... ow.py#L120
A simple preset could be the one that you put in your example, under if __name__.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Re: Arch Fence
Added an option to use the Colors of the original section and fence post.
When Setting the shape Color of the fence, the whole fence is colored with the same Color
The Pull Request adds the "UseOriginalColors" Option to the Fence ViewObject. When set to "true", the fence will inherit the Colors of the original section and post You can simply set a Shape Color for the post and section or you can even colorize all faces of the post and section individually.
I created a Pull Request for this: https://github.com/FreeCAD/FreeCAD/pull/2263
When Setting the shape Color of the fence, the whole fence is colored with the same Color
The Pull Request adds the "UseOriginalColors" Option to the Fence ViewObject. When set to "true", the fence will inherit the Colors of the original section and post You can simply set a Shape Color for the post and section or you can even colorize all faces of the post and section individually.
I created a Pull Request for this: https://github.com/FreeCAD/FreeCAD/pull/2263
Re: Arch Fence
Created another pull request that fixes some Problems with the colorization Option for the fence. https://github.com/FreeCAD/FreeCAD/pull/2270
Also uploaded some Images here of a Fence I made with the tool (https://forum.freecadweb.org/viewtopic.php?f=24&t=37121)
Also uploaded some Images here of a Fence I made with the tool (https://forum.freecadweb.org/viewtopic.php?f=24&t=37121)
Re: Arch Fence
Would this tool allow to build something like this?
I'm thinking about an industrial plant building, with lots of handrails.
I'm thinking about an industrial plant building, with lots of handrails.
Re: Arch Fence
I think it should be possible to do.
I think we have to put some effort in the details like the corners and smaller sections.
Until now the sections are simply clipped when they need to be smaller than the original one.
But maybe you can give it a try and we can figure out what needs to be improved to handle this workflow.
I think we have to put some effort in the details like the corners and smaller sections.
Until now the sections are simply clipped when they need to be smaller than the original one.
But maybe you can give it a try and we can figure out what needs to be improved to handle this workflow.