Skip to content

Commit

Permalink
add truss arc example
Browse files Browse the repository at this point in the history
  • Loading branch information
aradermacher committed Aug 30, 2023
1 parent aefa86d commit 6da92cd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 6 additions & 2 deletions amworkflow/src/geometries/composite_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,11 @@ def Shape(self):
face = self.fc_set[0]
for fce in self.fc_set[1:]:
face = fuser(face, fce)
return create_prism(face, [0,0,self.height])
pr = create_prism(face, [0,0,self.height], True)
faces = topo_explorer(pr, "face")
pr_remake = sewer(faces)
opt = solid_maker(pr_remake)
return opt
else:
self.create_sides()
self.create_loop()
Expand Down Expand Up @@ -787,7 +791,7 @@ def find_loop(self, pts: np.ndarray) -> tuple:
return loop_l, peak_p

def visualize(self, plot_type: str) -> None:
if len(self.create_sides) == 0:
if len(self.lft_pts) == 0:
self.Shape()
if plot_type == "polygon":
fig, ax = plt.subplots()
Expand Down
8 changes: 5 additions & 3 deletions usecases/TrussArc/trussarc.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ def geometry_spawn(pm):
# only for outer line
print(pmfo[0:90])
g = aw.geom
wall_maker = g.CreateWallByPoints(pmfo[0:90], pm.thickness, pm.height)
wall_maker.is_close = True
wall_maker.visualize("linear")
# pmfo = pmfo[0:90] # outline
wall_maker = g.CreateWallByPoints(pmfo, pm.thickness, pm.height)
wall_maker.is_close = False
wall_maker.overlap = True
# wall_maker.visualize("linear")
design = wall_maker.Shape()

return design #TopoDS_Shape
Expand Down

0 comments on commit 6da92cd

Please sign in to comment.