Skip to content

Commit

Permalink
Merge pull request #401 from howetuft/master
Browse files Browse the repository at this point in the history
Fix skip meshing
  • Loading branch information
howetuft committed May 8, 2024
2 parents 04c7dfb + 8ca5611 commit 97e8b09
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
1 change: 1 addition & 0 deletions Render/groundplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def __init__(self, project):
self.Mesh = Mesh.Mesh()
bbox = project.get_bounding_box()
self.Document = project.fpo.Document
self.Placement = App.Placement()

if bbox.isValid():
zpos = project.fpo.GroundPlaneZ
Expand Down
5 changes: 3 additions & 2 deletions Render/rdrhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,9 @@ def mesher(
rends = renderables.check_renderables(rends)

# Rescale to meters
for rend in rends:
rend.mesh.convert_distances(SCALE)
if not self.skip_meshing:
for rend in rends:
rend.mesh.convert_distances(SCALE)

# Call renderer on renderables, concatenate and return
write_mesh = functools.partial(
Expand Down
31 changes: 15 additions & 16 deletions Render/renderables.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,22 +270,21 @@ def check_renderables(renderables):
result = []
for renderable in renderables:
mesh = renderable.mesh
if mesh.skip_meshing:
continue
if not mesh:
warn(
"Export",
renderable.name,
translate("Render", "Cannot find mesh data"),
)
continue
if not mesh.count_points or not mesh.count_facets:
warn(
"Export",
renderable.name,
translate("Render", "Mesh topology is empty"),
)
continue
if not mesh.skip_meshing:
if not mesh:
warn(
"Export",
renderable.name,
translate("Render", "Cannot find mesh data"),
)
continue
if not mesh.count_points or not mesh.count_facets:
warn(
"Export",
renderable.name,
translate("Render", "Mesh topology is empty"),
)
continue
result.append(renderable)
return result

Expand Down

0 comments on commit 97e8b09

Please sign in to comment.