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