cambios
This commit is contained in:
@@ -688,6 +688,7 @@ class EarthWorksTaskPanel:
|
|||||||
land.trim(pts, 1)
|
land.trim(pts, 1)
|
||||||
|
|
||||||
tmp = []
|
tmp = []
|
||||||
|
shp = Part.Shape()
|
||||||
for face in sh.Faces:
|
for face in sh.Faces:
|
||||||
wire = face.Wires[0].copy()
|
wire = face.Wires[0].copy()
|
||||||
pl = wire.Placement.Base
|
pl = wire.Placement.Base
|
||||||
@@ -697,8 +698,10 @@ class EarthWorksTaskPanel:
|
|||||||
# Caso simple
|
# Caso simple
|
||||||
wire = wire.makeOffset2D(10000, 0, False, False, True)
|
wire = wire.makeOffset2D(10000, 0, False, False, True)
|
||||||
wire.Placement.Base.z = wire.Placement.Base.z - 10000
|
wire.Placement.Base.z = wire.Placement.Base.z - 10000
|
||||||
wire = wire.makeFillet(1, wire.Edges)
|
top = wire.makeOffset2D(1, 0, False, False, True)
|
||||||
tmp.append(Part.makeLoft([face.Wires[0], wire], True, True, False))
|
loft = Part.makeLoft([top, wire], True, True, False)
|
||||||
|
tmp.append(loft)
|
||||||
|
shp = shp.fuse(loft)
|
||||||
else:
|
else:
|
||||||
# Caso complejo:
|
# Caso complejo:
|
||||||
vertices = face.Vertexes
|
vertices = face.Vertexes
|
||||||
@@ -711,14 +714,16 @@ class EarthWorksTaskPanel:
|
|||||||
for tri in triangles:
|
for tri in triangles:
|
||||||
# Crear wire triangular
|
# Crear wire triangular
|
||||||
wire = Part.makePolygon([v.Point for v in tri] + [tri[0].Point])
|
wire = Part.makePolygon([v.Point for v in tri] + [tri[0].Point])
|
||||||
# Hacer offset (ahora es coplanar por ser triángulo)
|
|
||||||
wire = wire.makeOffset2D(10000, 0, False, False, True)
|
wire = wire.makeOffset2D(10000, 0, False, False, True)
|
||||||
wire.Placement.Base.z = wire.Placement.Base.z - 10000
|
wire.Placement.Base.z = wire.Placement.Base.z - 10000
|
||||||
wire = wire.makeFillet(1, wire.Edges)
|
top = wire.makeOffset2D(1, 0, False, False, True)
|
||||||
tmp.append(Part.makeLoft([face.Wires[0], wire], True, True, False))
|
loft = Part.makeLoft([top, wire], True, True, False)
|
||||||
|
tmp.append(loft)
|
||||||
|
shp = shp.fuse(loft)
|
||||||
|
|
||||||
final_tool = Part.makeCompound(tmp)
|
final_tool = Part.makeCompound(tmp)
|
||||||
Part.show(final_tool, "tool")
|
Part.show(final_tool, "tool")
|
||||||
|
Part.show(shp)
|
||||||
|
|
||||||
FreeCAD.ActiveDocument.commitTransaction()
|
FreeCAD.ActiveDocument.commitTransaction()
|
||||||
self.closeForm()
|
self.closeForm()
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ class OffsetArea(_Area):
|
|||||||
import Utils.PVPlantUtils as utils
|
import Utils.PVPlantUtils as utils
|
||||||
|
|
||||||
base = obj.Base.Shape
|
base = obj.Base.Shape
|
||||||
land = PVPlantSite.get().Terrain.mesh
|
land = PVPlantSite.get().Terrain.Mesh
|
||||||
vec = FreeCAD.Vector(0, 0, 1)
|
vec = FreeCAD.Vector(0, 0, 1)
|
||||||
wire = utils.getProjected(base, vec)
|
wire = utils.getProjected(base, vec)
|
||||||
wire = wire.makeOffset2D(obj.OffsetDistance.Value, 2, False, False, True)
|
wire = wire.makeOffset2D(obj.OffsetDistance.Value, 2, False, False, True)
|
||||||
|
|||||||
Reference in New Issue
Block a user