FreeCAD Logo FreeCAD 1.0
  • 英語 アフリカーンス語 アラビア語 ベラルーシ語 カタロニア語 チェコ語 ドイツ語 ギリシャ語 スペイン語 スペイン語 バスク語 フィンランド語 フィリピン語 フランス語 ガリシア語 クロアチア語 ハンガリー語 インドネシア語 イタリア語 日本語 カビル語 韓国語 リトアニア語 オランダ語 ブークモール・ノルウェー語 ポーランド語 ポルトガル語 ポルトガル語 ルーマニア語 ロシア語 スロバキア語 スロベニア語 セルビア語 スウェーデン語 トルコ語 ウクライナ語 バレンシア語 ベトナム語 中国語 中国語
  • 特徴
  • ダウンロード
  • ブログ
  • ドキュメント
    ドキュメントの目次 初めての方へ ユーザー ドキュメント FreeCAD マニュアル ワークベンチのドキュメント Python コーディングドキュメント C++ コーディングドキュメント チュートリアル よくある質問 プライバシーポリシー FreeCADについて
  • 協力する
    協力するには Sponsor バグを報告 プルリクエストを作成 雇用と資金援助 コントリビューション ガイドライン 開発者ハンドブック 翻訳
  • コミュニティ
    行動規範 フォーラム The FPA GitHub GitLab Codeberg Mastodon Matrix IRC IRC via Webchat Gitter Discord Reddit Twitter Facebook LinkedIn カレンダー
  • ♥ Donate

Donate

$
SEPA 情報
SEPA 銀行振込を設定してください。:
Beneficiary: The FreeCAD project association
IBAN: BE04 0019 2896 4531
BIC/SWIFT: GEBABEBBXXX
銀行振込サービス: BNP Paribas Fortis
アドレス: Rue de la Station 64, 1360 Perwez, Belgium

While Stripe doesn't support monthly donations, you can still become a sponsor! Simply make a one-time donation equivalent to 12 months of support, and you'll gain access to the corresponding sponsoring tier. It's an easy and flexible way to contribute.

If you are not sure or not able to commit to a regular donation, but still want to help the project, you can do a one-time donation, of any amount.

Choose freely the amount you wish to donate one time only.

You can support FreeCAD by sponsoring it as an individual or organization through various platforms. Sponsorship provides a steady income for developers, allowing the FPA to plan ahead and enabling greater investment in FreeCAD. To encourage sponsorship, we offer different tiers, and unless you choose to remain anonymous, your name or company logo will be featured on our website accordingly.

from 1 USD / 1 EUR per month. You will not have your name displayed here, but you will have helped the project a lot anyway. Together, normal sponsors maintain the project on its feet as much as the bigger sponsors.

from 25 USD / 25 EUR per month. Your name or company name is displayed on this page.

from 100 USD / 100 EUR per month. Your name or company name is displayed on this page, with a link to your website, and a one-line description text.

from 200 USD / 200 EUR per month. Your name or company name and logo displayed on this page, with a link to your website and a custom description text. Companies that have helped FreeCAD early on also appear under Gold sponsors.

Instead of donating each month, you might find it more comfortable to make a one-time donation that, when divided by twelve, would give you right to enter a sponsoring tier. Don't hesitate to do so!

Choose freely the amount you wish to donate each month.

Please inform your forum name or twitter handle as a notein your transfer, or reach to us, so we can give you proper credits!

Inspectionワークベンチ
Meshワークベンチ
インデックス
Material workbench icon

概要

introduced in 1.0

The Materialワークベンチ FreeCADのmaterialシステムを操作します。

ツール

  • Materials編集: マテリアル・エディターを開く。

Related tools

While not provided by the Material workbench, these Material-related tools are included in FreeCAD's core and can be used without loading the workbench:

  • Material: Assigns a material to selected objects.
  • Appearance: Sets the display properties of selected objects. Often used after applying a material, when a given material does not define appearance properties.

設定

  • Preferences: Preferences for the Material Workbench.

Working with materials

This guide explains the core concepts and workflows for using the material system in FreeCAD. It covers the different tools, properties, and key technical details for both interactive and scripted use.

Material tools

Material Editor

  • Usage: Click the Edit button in the Material Workbench.
  • Purpose: The Material Editor is a tool for defining and managing materials. Its sole function is to create new materials, edit the properties of existing ones, and organize them.
  • Behavior:
    • It is disconnected from your 3D model; selecting an object in your document has no effect on the editor.
    • You cannot assign a material to an object from this window. Clicking OK simply closes the editor.

Material Selector

  • Usage: Select one or more objects in the 3D View or Tree View, then select the Material option from the context menu.
  • Purpose: This tool is used to assign a material to objects.
  • Behavior:
    • It opens a task panel containing a material browser tree.
    • The Launch Editor button launches the Material Editor to edit or create a material.
    • Selecting a material in the material browser tree immediately applies its properties to the selected objects. This is the required step to link a material's physical data to a part.

Physical vs. appearance properties

A material in FreeCAD is defined by two distinct sets of properties:

  • Physical properties: These define the engineering characteristics of a material, which are used for calculations and simulations (e.g., in the FEM Workbench). Examples include Density, YoungsModulus, and PoissonRatio.
  • Appearance properties: These define the visual look of a material for rendering purposes. Examples include DiffuseColor, Shininess, and Transparency.

A material is not required to have both. Some materials might be defined only for analysis (with only physical properties), while others might be defined only for visualization (with only appearance properties).

Override material appearance

An object's final appearance is determined by a hierarchy. The visual properties set in a material can be overridden by local settings on the object itself.

  • How to override: Select the Appearance option from the object's Tree View or 3D View context menu. Any changes you make here will take precedence over the appearance properties of the assigned material.
    • Caveats: This can be a source of confusion. If you have assigned a material to an object but its color doesn't change, it is likely because the object has a local appearance override. There is no clear visual indicator in the UI to show that an override is active.
  • How to revert an override: To restore the material's appearance, you can use the Appearance tool again and re-select the material to have its appearance properties applied.

Properties

When you assign a material, FreeCAD links the data to the object and its view provider using two properties.

  • データShape Material: This is the most important property. It is added to the Document Object. It holds a link to a full Materials::Material object, giving access to all its physical and appearance data for calculations and scripting. This is a hidden property.
  • ビューShape Appearance: This property exists on the object's View Provider. It is a list that controls the final rendering of the object in the 3D View and is what gets modified when you use the Appearance task panel.

Expressions

You can access material property values using expressions, which is particularly powerful in the Spreadsheet Workbench. To ensure you get a usable numerical quantity instead of a text string, you must use the PropertyObjects dictionary.

  • ❌ Incorrect method (returns text): Using the PhysicalProperties dictionary returns a string with units, which cannot be used in subsequent formulas.
=<<MyBody>>.ShapeMaterial.PhysicalProperties[<<Density>>]
→ Returns "7850 kg/m^3"
  • ✅ Correct method (returns a Quantity): Using the PropertyObjects dictionary and accessing its Value attribute returns a full Quantity object that can be used directly in calculations.
=<<MyBody>>.ShapeMaterial.PropertyObjects[<<Density>>].Value
→ Returns a Quantity object that the spreadsheet can use numerically.
If this value is in cell A1 of your spreadsheet, you can then write a formula in cell A2 like = A1 * 10, and it will work correctly.

Scripting

You can get and set material properties using Python scripting. The primary methods are .getPhysicalValue() and .setPhysicalValue().

import FreeCAD
import FreeCADGui

# Get a reference to your object (e.g., a PartDesign Body)
obj = App.ActiveDocument.getObject("Body")

# --- Check for and get a property ---
if obj.ShapeMaterial.hasPhysicalProperty("Density"):
    
    # Get the value. This returns a FreeCAD.Quantity object.
    density_quantity = obj.ShapeMaterial.getPhysicalValue("Density")
    
    print(f"The material is: {obj.ShapeMaterial.Name}")
    print(f"The density is: {density_quantity}")
    print(f"Numerical value: {density_quantity.Value}")

else:
    print("The selected material does not have a 'Density' property.")


# --- Set a property ---
# The value can be a string with units or a FreeCAD.Quantity object.
try:
    obj.ShapeMaterial.setPhysicalValue("Density", "8000 kg/m^3")
    App.ActiveDocument.recompute()
    print("Density successfully updated.")

except Exception as e:
    print(f"Failed to set property: {e}")


Inspectionワークベンチ
Meshワークベンチ
インデックス

このページは以下から取得されています https://wiki.freecad.org/Material_Workbench

お問い合わせ
Forum GitHub Mastodon Matrix IRC Gitter.im Discord Reddit Twitter Facebook LinkedIn

© The FreeCAD チーム. ホームページの画像クレジット(上から下へ): ppemawm, r-frank, epileftric, regis, rider_mortagnais, bejant.

このプロジェクトは次の人によってサポートされています: , KiCad Services Corp. および その他のスポンサー

GitHubGitHub でこのページを改善する