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!
Post Reply
JavierBrana
Posts: 31
Joined: Thu Sep 06, 2018 5:43 pm

Creating a new workbench for photovoltaic

Post by JavierBrana »

Hello everybody.

I am new using Freecad and even python but I am trying to create a new workbench for solar. The idea would be something like this:

https://www.youtube.com/watch?v=Xw8jmcDnF2w&t=234s
or
https://www.youtube.com/watch?v=JQW4ypzhQWY&t=38s

The first problem was to get the land that thanks to geo data and modifying its code I got what I wanted.

The real problem is that I do not find necessary information to be able to repeatedly place an object inside an area and detect that it is inside.

Another thing that I have searched and I have not found is that from the geo date I get a loft with many faces and I want to make a slope analisys of each one. The problem is that to do this I need to paint each face separately. I have managed to detect each face but I can not paint them separately.

Can someone help me?
Last edited by JavierBrana on Mon Sep 10, 2018 10:17 am, edited 1 time in total.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Requesting help

Post by Kunda1 »

I suggest renaming this thread to something more descriptive.
Please post what version of FreeCAD you are using (Help > About FreeCAD > Copy to clipboard) + also attach a file showing what you are trying to accomplish.

Edit:
Related Solar threads on the forum
https://forum.freecadweb.org/viewtopic.php?f=8&t=22943 - Solar Plants - Thread started by a solar PV installer/planner
https://github.com/osefrance/SolarConcentrator - Solar Concentrators
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
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Requesting help

Post by Kunda1 »

JavierBrana wrote: Thu Sep 06, 2018 6:15 pm Another thing that I have searched and I have not found is that from the geo date I get a loft with many faces and I want to make a slope analisys of each one. The problem is that to do this I need to paint each face separately. I have managed to detect each face but I can not paint them separately.
Some geodata development is going on right now at https://forum.freecadweb.org/viewtopic.php?f=3&t=27803
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
JavierBrana
Posts: 31
Joined: Thu Sep 06, 2018 5:43 pm

Re: Requesting help

Post by JavierBrana »

Kunda1 wrote: Fri Sep 07, 2018 3:45 pm I suggest renaming this thread to something more descriptive.
Please post what version of FreeCAD you are using (Help > About FreeCAD > Copy to clipboard) + also attach a file showing what you are trying to accomplish.
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13528 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 5c3f7bf8ec51e2c7187789f7edba71a7aa82a88b
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Spanish/Spain (es_ES)

Kunda1 wrote: Fri Sep 07, 2018 3:45 pm Edit:
Related Solar threads on the forum
https://forum.freecadweb.org/viewtopic.php?f=8&t=22943 - Solar Plants - Thread started by a solar PV installer/planner
https://github.com/osefrance/SolarConcentrator - Solar Concentrators
I had seen them but they are not useful for what I want to do.
JavierBrana
Posts: 31
Joined: Thu Sep 06, 2018 5:43 pm

Re: Creating a new workbech for photovoltaic

Post by JavierBrana »

The idea is:

First step: get the mesh of the land to work on an approximation of the ground.
Second step: using a kmz or directly drawing a 2d plane and making a projection on the terrain mesh to get the boundaries of the plot.

After this: position the Racjs or Trackers inside the boundary distributed in rows and columns. for the moment I create a tracker by default but in the future it will have a window to configure it:
https://www.dropbox.com/s/mkk0lht79tbfw ... a.PNG?dl=0
As you can see, I am using Part as container for all the components because it has Origin and it is easy align with any face.

Get contours from terrain mesh.
The slope analisys is easy. I have to get the angles of the normal and paint the faces depending on them. Here you can find a example used in Revit:
http://dynamobim.com/wp-content/uploads ... 0619-2.jpg
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Creating a new workbech for photovoltaic

Post by microelly2 »

maybe this can be useful
phpBB [video]
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Creating a new workbech for photovoltaic

Post by Kunda1 »

WOW, that is SO cool!
I distilled @microelly2's above clip down in to a gif:
Image
Last edited by Kunda1 on Thu Sep 13, 2018 3:33 pm, edited 1 time in total.
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
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Creating a new workbech for photovoltaic

Post by Kunda1 »

Joel_graff wrote:ping
@Joel_graff I think you'd appreciate this as well.
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
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Creating a new workbech for photovoltaic

Post by Kunda1 »

microelly2 wrote: Thu Sep 13, 2018 5:47 am maybe this can be useful
phpBB [video]
Hey @microelly2
Just wondering, would it be possible to integrate pysolar in to this type of demonstration ? (https://forum.freecadweb.org/viewtopic.php?t=18587)
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
JavierBrana
Posts: 31
Joined: Thu Sep 06, 2018 5:43 pm

Re: Creating a new workbech for photovoltaic

Post by JavierBrana »

microelly2 wrote: Thu Sep 13, 2018 5:47 am maybe this can be useful
phpBB [video]
Hello microelly2. I'm watching your work since I started to get interested in this project. I had seen that video but I did not find your code.

It can work, yes.
Last edited by JavierBrana on Thu Sep 13, 2018 10:44 pm, edited 1 time in total.
Post Reply