Creating a new workbench for photovoltaic

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Creating a new workbench for photovoltaic

Post by HakanSeven12 »

Thanks. Also can you send some example files and a guide about how to use your wb?
JavierBrana
Posts: 31
Joined: Thu Sep 06, 2018 5:43 pm

Re: Creating a new workbench for photovoltaic

Post by JavierBrana »

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?
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.

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.
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Creating a new workbench for photovoltaic

Post by HakanSeven12 »

Thanks again ;) waiting for it. Also Im planning to apply some of the features in your wb to Trails.
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Creating a new workbench for photovoltaic

Post by HakanSeven12 »

JavierBrana
Posts: 31
Joined: Thu Sep 06, 2018 5:43 pm

Re: Creating a new workbench for photovoltaic

Post by JavierBrana »

HakanSeven12 wrote: Wed Jul 28, 2021 6:17 am Maybe you want to see this: https://forum.freecadweb.org/viewtopic. ... 20#p520156
Are you using mesh?? how can you paint it??
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Creating a new workbench for photovoltaic

Post by HakanSeven12 »

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.
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Creating a new workbench for photovoltaic

Post by HakanSeven12 »

JavierBrana wrote: Wed Jul 28, 2021 7:16 am Are you using mesh?? how can you paint it??
Here is my view provider. Take a look: https://github.com/joelgraff/freecad.tr ... ce.py#L149
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Creating a new workbench for photovoltaic

Post by HakanSeven12 »

Can you add a license to your repo? I recommend lgpl-2.1
JavierBrana
Posts: 31
Joined: Thu Sep 06, 2018 5:43 pm

Re: Creating a new workbench for photovoltaic

Post by JavierBrana »

HakanSeven12 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.
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 heights
Sin título.jpg
Sin título.jpg (44.16 KiB) Viewed 2775 times
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.
User avatar
HakanSeven12
Veteran
Posts: 1481
Joined: Wed Feb 06, 2019 10:30 pm

Re: Creating a new workbench for photovoltaic

Post by HakanSeven12 »

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.
Post Reply