Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BrickWallCostEstimate] - Cost and quantity estimate of all BIM objects with IFC Type='Wall' #65

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

QuantumNovice
Copy link

@QuantumNovice QuantumNovice commented Jul 26, 2019

** This will later be added to BIM workbench. **
Thank you for creating a pull request to contribute to FreeCAD-macros!
To integrate your macro please make sure the following steps are complete:

  • Please check this box if you're not submitting a new macro.
  • Are you submitting a new macro ?
  • Have you followed the 'How to submit a macro' section of the README.md ?
  • Your macro has a Description in its header.
  • Your macro has a CamelCase name.
  • Your macro is named appropriately.
  • Your macro contains a Metadata section that immediately follows the header description.
  • Your macro is Python3/Qt5 compliant and tested on the latest FreeCAD stable and development releases.
  • You're including documentation on how your macro works (bonus: screenshots and/or video on the Wiki)
  • Commit message is well-written
  • Commit message is titled in the following way [MacroName] - Short description.

And please remember to update the Wiki with the features added or changed once this PR is merged.
Note: If you don't have wiki access, then please mention your contribution on the 0.19 Changelog Forum Thread.


Copy link
Collaborator

@galou galou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution.
Can you please address or comment on my review?
Can you also please change commit names starting with [BrickWallCostEstimate] as stated in the pull-request message?
The png file should be renamed BrickWallCostEstimate.png.

@@ -0,0 +1,144 @@
# -*- coding: utf-8 -*-
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put the macro into the Information folder

@@ -0,0 +1,144 @@
# -*- coding: utf-8 -*-

__Name__ = 'CostEstimate'
Copy link
Collaborator

@galou galou Aug 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__Name__ = 'Brick Wall Cost Estimate'

__Version__ = '0.1'
__Date__ = '2019-6-24'
__License__ = 'LGPL-3.0-or-later'
__Web__ = ''
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a forum link?

__Status__ = 'Alpha'
__Requires__ = 'FreeCAD >= v0.17'
__Communication__ = ''
__Files__ = ''
Copy link
Collaborator

@galou galou Aug 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__Files__ = 'BrickWallCostEstimate.png'

__Communication__ = ''
__Files__ = ''

import FreeCAD, math
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use import FreeCAD as app and use app everywhere instead of FreeCAD.
Also add import FreeCADGui as gui.

Please organize your import (standard lib, then system libs then "project libs"), one per line.

WallEstimator().pretty_all_wall_estimate()

# Use this for cost estimation of a particular wall
#WallEstimator().selected_wall_estimate()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improvement suggestion: make this line available by non-hackers by adding a dialog.

'''
# Make it static
volume_of_wall = obj.Shape.Volume
volume_of_brick = 9.375*4.875*3.375*25.4**3 # in mm
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain these numbers.

volume_of_brick = 9.375*4.875*3.375*25.4**3 # in mm

num_bricks = math.ceil(volume_of_wall/volume_of_brick)
losses = 5/100
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A dialog would render these parameters accessible...

losses = 5/100
brick_cost = (num_bricks + num_bricks*losses)* brick_unit_cost

actual_vol_brick = 9*4.5*3*25.4**3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain these numbers.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nominal dimension of brick in inches.

@galou
Copy link
Collaborator

galou commented Aug 17, 2019

I edited the original post because the answer to some questions were incorrect.

@QuantumNovice QuantumNovice changed the title BrickWallCostEstimate - Cost and quantity estimate of all BIM objects with IFC Type='Wall' [BrickWallCostEstimate] - Cost and quantity estimate of all BIM objects with IFC Type='Wall' Aug 18, 2019
@galou galou force-pushed the master branch 2 times, most recently from f300064 to 579f768 Compare March 10, 2020 17:13
@luzpaz
Copy link
Contributor

luzpaz commented Jan 3, 2021

bump

@luzpaz
Copy link
Contributor

luzpaz commented Feb 23, 2022

bump @QuantumNovice
Lets get this merged, shall we? (we have a release coming up soon 😉

@luzpaz
Copy link
Contributor

luzpaz commented Feb 23, 2022

CC @yorikvanhavre you may be interested in this

@QuantumNovice
Copy link
Author

I am sorry I lost access to this computer for quite a while. This will be resolved asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants