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!

Introduction

A Part Part2DObject, or formally a Part::Part2DObject, is a simple element with a topological shape that can be displayed in the 3D View.

The Part::Part2DObject is derived from the Part Feature, but is specialized for 2D geometry, given that its shape will lie on a plane. This plane is defined by its ДанныеPlacement property (position, normal, and rotation). However, the plane can also be defined by supporting geometrical elements, such as the plane created by three arbitrary vertices, or a face of a solid body.

Simplified diagram of the relationships between the core objects in FreeCAD

Usage

The Part Part2DObject is an internal object, so it cannot be created from the graphical interface, only from the Python Console as described in the Scripting section.

The Part::Part2DObject is defined in the Part Workbench but can be used as the base class for scripted objects in all workbenches that produce 2D geometrical shapes. For example, it is the base object for sketches (Sketcher SketchObject), and for most objects created with the Draft Workbench.

Workbenches can add more properties to this basic element to produce an object with complex behavior.

Properties

See Property for all property types that scripted objects can have.

The Part Part2DObject (Part::Part2DObject class) is derived from the Part Feature (Part::Feature class) and inherits all its properties.

The Part Part2DObject also has the following additional properties in the Property View. Hidden properties can be shown by using the Show hidden command in the context menu of the Property View.

Data

Attachment

  • Данные (Hidden, ReadOnly)Attacher Type (String): class name of the attach engine object driving the attachment.
  • ДанныеAttacher Engine (Enumeration): attach engine object driving the attachment.
  • ДанныеAttachment Support (LinkSubList): the other (sub)objects supporting this object. It defaults to an empty list [].
  • ДанныеMap Mode (Enumeration): mode of attachment to the other (sub)objects. See Part EditAttachment.
  • ДанныеMap Reversed (Bool): if true the Z-direction will be reversed. For example, a sketch will be flipped upside down. Hidden if ДанныеMap Mode is Deactivated.
  • ДанныеMap Path Parameter (Float): sets the point of curve to map this object to. It goes from 0 to 1, which corresponds to the start and end. It defaults to 0. Hidden if not applicable.
  • ДанныеAttachment Offset (Placement): extra placement to apply in addition to attachment (in local coordinates). Hidden if ДанныеMap Mode is Deactivated.

View

Display Options

  • ВидShow Plane (Bool): if true a plane indicating the XY-plane of the ДанныеPlacement of the object is shown. introduced in 1.1

Scripting

See also: FreeCAD Scripting Basics and scripted objects.

See Part Feature for the general information on adding objects to the document.

A Part2DObject is created with the addObject() method of the document.

import FreeCAD as App

doc = App.newDocument()
obj = App.ActiveDocument.addObject("Part::Part2DObject", "Name")
obj.Label = "Custom label"

For Python subclassing you should create a Part::Part2DObjectPython object.

import FreeCAD as App

doc = App.newDocument()
obj = App.ActiveDocument.addObject("Part::Part2DObjectPython", "Name")
obj.Label = "Custom label"


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

Свяжитесь с нами!
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