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!
-
- Posts: 31
- Joined: Thu Sep 06, 2018 5:43 pm
Re: Creating a new workbech for photovoltaic
Maybe it is very difficult to do this in 3D and maybe the best option is go to the 2D:
I used Energy 3d several times to test it. If you read its code you can check that they use the collision between two polygons. But once again I cannot find information about this matter.
About the idea of Kunda1 of using pysolar, well this is the 3th work I want to do but in the future, with simulation and visual irradiation analysis and shadow analysis.
I used Energy 3d several times to test it. If you read its code you can check that they use the collision between two polygons. But once again I cannot find information about this matter.
About the idea of Kunda1 of using pysolar, well this is the 3th work I want to do but in the future, with simulation and visual irradiation analysis and shadow analysis.
Re: Creating a new workbech for photovoltaic
Just a note that I've moved this from Developer's Corner, as I think it'll get a bit more traction here.
Re: Creating a new workbech for photovoltaic
Can you elaborate a little bit more what you are trying to achieve here ?JavierBrana wrote: ↑Thu Sep 06, 2018 6:15 pm 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?
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
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
-
- Posts: 31
- Joined: Thu Sep 06, 2018 5:43 pm
Re: Creating a new workbech for photovoltaic
I´m only requesting info about how to place a rectangle inside a polygon. If Freecad has this function or I have to use my own functions. If I can do it in 3D or 2D and if I can do it in 3D, what funcions?
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Creating a new workbech for photovoltaic
The points data can be used to calculate a BSpline surface for the terrain. Withg this face you can calculate a face normal vector or the tangent pair for each point and map a square to this point.JavierBrana wrote: ↑Thu Sep 06, 2018 6:15 pm 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?
the imported points from geodata workbench define a quad mesh structure in most cases and the interpolation of such points to curves/faces should work.
-
- Posts: 31
- Joined: Thu Sep 06, 2018 5:43 pm
Re: Creating a new workbech for photovoltaic
Hi.
To make the contours I use the function "slice" but it is very slow and I can not get a polyline:
some idea about how I can do it faster?
.
To make the contours I use the function "slice" but it is very slow and I can not get a polyline:
Code: Select all
def Contours(obj, minor = 1000, mayor = 5000):
import Part
from FreeCAD import Base
if obj is not None:
ZMin = obj.Shape.BoundBox.ZMin // 10000
ZMin *= 10000
ZMax = obj.Shape.BoundBox.ZMax
inc = ZMin
count = 0
while inc < ZMax:
wires = list()
shape = obj.Shape
for i in shape.slice(Base.Vector(0, 0, 1), inc):
wires.append(i)
comp = Part.Compound(wires)
slice = FreeCAD.activeDocument().addObject("Part::Feature", str(inc/1000))
slice.Label = str(inc/1000)
slice.Shape = comp
slice.purgeTouched()
del slice, comp, wires, shape
inc += 10000
count += 1
print ("Total de curvas de nivel: " + str(count))
.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Creating a new workbech for photovoltaic
To get a polyline you can discretize the slice segments: There is a method discretize for Edges.
but I have no idea what is better than slice to get the contours.
You can look for algorithms in image processing
http://scikit-image.org/docs/dev/auto_e ... tours.html
http://www.scipy-lectures.org/intro/mat ... ur_ex.html
or in open cv
you have to calculate a elevation grid from your face and use it as an image with the height as color.
but I have no idea what is better than slice to get the contours.
You can look for algorithms in image processing
http://scikit-image.org/docs/dev/auto_e ... tours.html
http://www.scipy-lectures.org/intro/mat ... ur_ex.html
or in open cv
you have to calculate a elevation grid from your face and use it as an image with the height as color.
Re: Creating a new workbech for photovoltaic
Any luck following microelly2's advice ?
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
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
Re: Creating a new workbech for photovoltaic
@microelly2 check this out: http://rdcu.be/vRj5 (it can be used as an addon in Blender)microelly2 wrote: ↑Tue Sep 18, 2018 11:52 amThe points data can be used to calculate a BSpline surface for the terrain. Withg this face you can calculate a face normal vector or the tangent pair for each point and map a square to this point.JavierBrana wrote: ↑Thu Sep 06, 2018 6:15 pm 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?
the imported points from geodata workbench define a quad mesh structure in most cases and the interpolation of such points to curves/faces should work.
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
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
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Creating a new workbech for photovoltaic
Interesting project,Kunda1 wrote: ↑Sat Oct 06, 2018 2:33 pm @microelly2 check this out: http://rdcu.be/vRj5 (it can be used as an addon in Blender)
the question is how to connect it with FreeCAD.
Use a data exchange module between FreeCAD and Blender
or rewrite the interface from Blender to FreeCAD
VI-suite has 16 kloc, this is nearly the complexity of geodat wb or the curves wb.
we should ask the developer Ryan Southall about the complexity to write a FreeCAD interface.