Creating a new workbench for photovoltaic
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Creating a new workbench for photovoltaic
Thanks. Also can you send some example files and a guide about how to use your wb?
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
-
- Posts: 31
- Joined: Thu Sep 06, 2018 5:43 pm
Re: Creating a new workbench for photovoltaic
Hi. I will send you a example soon. I have to make a simple one because I am working with big ones and they are very heavy to send.HakanSeven12 wrote: ↑Wed Jul 14, 2021 7:42 am Thanks. Also can you send some example files and a guide about how to use your wb?
Anyway, first you have to create a "SITE" and later a "TERRAIN" object. You have to link this terrain with the property "terrain" of Site . From the begining I was working with mesh and right now some tools are working with mesh and other with shapes.
Pads, and roads need shapes.
How they work??
Pads: I have updated it this week. You press the button and latter you click on the shape (terrain) and automatically the tool calculates the cut and the fill. This weeken I will update this tool to calculate more than one solid.
Roads: the same than pads. You can draw a 3d wire (at the moment it is only this, wire. In the future I have to search the way to edit it and make a polyline with arcs and lines). Automatically it crates a PART whith the cuts and fills. Still studing how is the best way to do this. I think I will separate them because they are difirent objects.
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Creating a new workbench for photovoltaic
Thanks again waiting for it. Also Im planning to apply some of the features in your wb to Trails.
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Creating a new workbench for photovoltaic
Maybe you want to see this: https://forum.freecadweb.org/viewtopic. ... 20#p520156
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
-
- Posts: 31
- Joined: Thu Sep 06, 2018 5:43 pm
Re: Creating a new workbench for photovoltaic
Are you using mesh?? how can you paint it??HakanSeven12 wrote: ↑Wed Jul 28, 2021 6:17 am Maybe you want to see this: https://forum.freecadweb.org/viewtopic. ... 20#p520156
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Creating a new workbench for photovoltaic
Yes I'm using a feature python object that have a mesh property. I wrote my own view provider. So I can manipulate the 3d model.
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Creating a new workbench for photovoltaic
Here is my view provider. Take a look: https://github.com/joelgraff/freecad.tr ... ce.py#L149
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Creating a new workbench for photovoltaic
Can you add a license to your repo? I recommend lgpl-2.1
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
-
- Posts: 31
- Joined: Thu Sep 06, 2018 5:43 pm
Re: Creating a new workbench for photovoltaic
Check terrain analisys, there you can find my code to set-up color. It is made with a table and buttons to select color and ranges of angles or heightsHakanSeven12 wrote: ↑Wed Jul 28, 2021 7:32 am Yes I'm using a feature python object that have a mesh property. I wrote my own view provider. So I can manipulate the 3d model.
Later I will check how to save this set up to, later, print it on a draw. I mean how to draw a color bar or something like this to put it on a Techdraw or similar.
- HakanSeven12
- Veteran
- Posts: 1481
- Joined: Wed Feb 06, 2019 10:30 pm
Re: Creating a new workbench for photovoltaic
Still you didn't send me a test file if you want to save them to object you need to add a string property to object. Then you can create a dictionary to save your settings and convert it to string and add it to your new property. When you want to set this color again use 'eval' to convert it to dictionary.
Support me: Hakan Seven on Patreon
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum
Modern UI: Modern UI on FreeCAD Forum
Trails Workbench: Trails Workbench on FreeCAD Forum