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!

Tutorial
Topic
Using Configuration Tables
Level
Beginner
Time to complete
30 minutes
Authors
Gbroques
FreeCAD version
0.20
Example files
ConfigurationTableExample.FCStd
See also
None

Введение

With the release of FreeCAD V0.20 two powerful new features have been introduced: Variant Links and Configuration Tables. Configuration tables are a special type of variant link. They allow to vary sets of predefined parameters for a given object.

Prior to this, you could parameterize objects with techniques such as spreadsheets, but multiple varied instances of that object couldn't exist at the same time unless you resorted to techniques like copying files or objects which creates maintenance issues. Configuration tables make the maintenance of such variants, and the ability to toggle between them easy.

This tutorial assumes that you have some familiarity with the PartDesign Workbench and the Sketcher Workbench. You should also be familiar with the Tree View and the Property View.

There is also a video version of this tutorial.

Example

To gain a better idea of configuration tables consider the following example.

Imagine a simple hexagonal nut with a "major" diameter of 10mm (M10).

We can reuse the same design, create a link, and then vary certain parameters to create an M12 hexagonal nut.

For our example, we will describe the differences between these two variants with 3 parameters:

  1. diameter of the center hole
  2. width across the corners
  3. and thickness.

The particular parameter values for our variants are described in this table:

Variant Diameter WidthAcrossCorners Thickness
M10 10 18.48 8.4
M12 12 20.78 10.8

Instructions

  1. Create a new spreadsheet with a heading row. Leave the second row empty. That row will hold the current configuration and will automatically be filled later. Add parameters for M10 and M12 in rows 3 and 4:

  2. Use the PartDesign Workbench to create a Body and Sketch for the hex nut. Dimensional constraint will be added in a later step.

  3. Pad the Sketch. Accept the default Length value.
  4. Right-click cell A2 in the spreadsheet and select Configuration Table from the context menu.
  5. The Setup Configuration Table dialog opens.
  6. Enter the following:

    This fills out the second row in the table, adds a new ДанныеConfiguration property to the Body and binds the configuration table to it.
  7. Press the OK button.
  8. If cell A2 shows #PENDING, you can right-click the spreadsheet in the Tree View and choose Recompute object to show the correct value.
  9. Set an alias for the 3 cells in row 2 underneath Diameter, WidthAcrossCorners, and Thickness. Each alias should match the cell's column heading.

  10. Constrain the Sketch with two constraints and bind the expressions Spreadsheet.Diameter and Spreadsheet.WidthAcrossCorners to them:

  11. Bind Spreadsheet.Thickness to the ДанныеLength property of the pad.
  12. Create a PartDesign SubShapeBinder.
  13. In the Tree View, drag the Binder out of the Body and drop it on the Document node.
  14. Drop the Body on the Binder to set its ДанныеSupport property to the Body. Dropping is required as this property is Read Only by default.
  15. Set the ДанныеBind Copy on Change property to Enabled on the Binder.
  16. Select M12 for the ДанныеConfiguration property of the Binder.
  17. Set the ВидUse Binder Style property to false on the Binder.
  18. Change the ДанныеPlacement property of the Binder so that it's away from the Body.
  19. Once finished, you should have something like the following:

Use Std Link instead of PartDesign SubShapeBinder

For the variant link you can also use a Std Link instead of a PartDesign SubShapeBinder:

  1. The preparatory steps 1-10 mentioned above are the same.
  2. Create a Link to the Body.
  3. Set the ДанныеLink Copy On Change to Enabled on the Link.
  4. Follow steps 16, 18 and 19 mentioned above.

Key considerations

  • As mentioned, a variant link can be made using a Std Link or a PartDesign SubShapeBinder. Realthunder explains the difference here:

    Instead of duplicating the linked object with all its hierarchy, the SubShapeBinder will make a flattened copy of the mutated object. Another difference to Link is that the SubShapeBinder will sync any changes of the original object back to the copy even if the configurations are different, while for Link, once copied, the two objects become independent.

  • Although built upon links, variant links are not "cheap" like normal links, as they create copies of the original object. Guidance is provided by Realthunder here and here:

    [When] using Link for alternative configurations, you'll need to realize that it makes a copy of the original object... it would be better to create a single 'variant' link for each [variant] to avoid unnecessary duplicates. Or better, use SubShapeBinder... And again, create one SubShapeBinder for each configuration.


Эта страница получена от https://wiki.freecad.org/Configuration_Tables

Свяжитесь с нами!
Forum GitHub Mastodon Matrix IRC Gitter.im Discord Reddit Twitter Facebook LinkedIn

©Команда FreeCAD. Авторы изображений (сверху вниз): ppemawm, r-frank, epileftric, regis, regis, rider_mortagnais, bejant.

Этот проект поддерживается: , KiCad Services Corp. и другие спонсоры

GitHubУлучшить эту страницу на GitHub