Разрезать
Part Slice |
Системное название |
---|
Part Slice |
Расположение в меню |
Деталь → Split → Slice |
Верстаки |
Part |
Быстрые клавиши |
Нет |
Представлено в версии |
0.17.8053 |
См. также |
Part Boolean Fragments, Part XOR, Part Join features, Part Boolean |
Описание
Part Slice, так же известный как "Разделить в компаунд", это инструмент, используемый для разделения фигур через пересечение с другими фигурами. Например, для куба и плоскости создаётся компаунд из двух тел.
Выше: части были впоследствии раздвинуты вручную, чтобы показать разрез
Имеются две команды для разделения фигуры: Slice apart и Slice to compound. Они оба создают параметрический объект «Срез», который объединяет разрезанные части в компаунд. В то же время Slice Apart разбивает полученное соединение на отдельные объекты. «Slice to compound» полностью параметрический, и не имеет проблем при изменении количества частей. «Slice apart» не будет обновлять количество объектов при изменении числа частей.
Итоговая форма занимают то же место, что и оригинал. Но она разделена там, где пересекается с другими формами. Разделенные части складываются в компаунд (или композит), поэтому кажется, что объект остается одним целым. Вам нужно взорвать соединение, чтобы получить отдельные части. Если вы хотите получить доступ к отдельным частям параметрическим способом, вы можете использовать для этой цели Part CompoundFilter. Для быстрого, непараметрического доступа используйте Downgrade.
Инструмент имеет три режима: «Standard», «Split» и «CompSolid». Формы выбора нет, они предопределены, но доступны после операции на уровне результирующих срезов.
«Standard» и «Split» различаются действием инструмента на рёбра, оболочки и составные тела: если «Split», они разделяются; если «Standard», они остаются вместе (получают дополнительные сегменты).
Составная структура в режимах «Standard» и «Split» следует за составной структурой разрезаемой формы.
В режиме «CompSolid» на выходе получается compsolid (или соединение compsolids, если полученные твердые тела образуют более одного острова связности). Compsolid - это набор тел, соединенных гранями; они связаны с твердыми телами, как полилинии связаны с ребрами, а оболочки связаны с гранями; название, вероятно, является сокращённым словосочетанием «композитное твердое тело».
The overall action of the tool is very similar to Boolean Fragments, except only the pieces from the first shape are in the result.
Usage
- Select the object to be sliced, first, and then some objects to slice with.
The order of selection is important. Compounds with self-intersections are not allowed (self-intersections sometimes can be accounted for by passing the compound through BooleanFragments) - Invoke the Part Slice command several ways:
- Press the Part Slice button in the Part toolbar
- Use the Part → Split → Slice entry in the Part menu
- Noteː The Objects to slice with must completely separate the object to be sliced. Thus a cube cannot be sliced by a wire, but by a plane derived from an extruded wire for instance.
A Slice parametric object is created. Original objects are hidden, and the result of intersection is shown in 3D view.
Tree structure of Slice
The Slice command creates a sliced object. In the following example a cube is sliced by a face.
The slice is created and each piece of it is united in a Compound.
Properties
Slice
- ДанныеBase: Object to be sliced.
- ДанныеTools: List of objects to slice with. (as of FreeCAD v0.17.8053, this property is not displayed in property editor, and can only be accessed via Python).
- ДанныеMode: "Standard", "Split", or "CompSolid". "Split" is default. Standard and Split differ by the action of the tool on aggregation type shapes: if Split, those are separated; otherwise they are kept together (get extra segments).
- ДанныеTolerance: "fuzziness" value. This is an extra tolerance to apply when searching for intersections, in addition to tolerances stored in the input shapes.
̈Noteː Properties are accessible on the slices inner object, not on the result level.
Example
Creating a Puzzle
- Switch to Sketcher Workbench
- Switch to Part workbench.
- Switch back to Sketcher Workbench
- Switch back to Part Workbench.
- Select the splitter sketch, and apply Part Boolean Fragments. This will insert vertices where lines of splitter sketch intersect. Having them is essential for the next step to work.
- Select the splitter sketch, and apply Part Boolean Fragments. This will insert vertices where lines of splitter sketch intersect. Having them is essential for the next step to work.
- Select the rectangular face, and the BooleanFragments of splitter sketch, and apply Part Slice.
- Use Part ExplodeCompound on the sliced face, to break apart the compound made by Part Slice into individual pieces.
Note: Steps 5 and 6 can be done in single click using Part SliceApart
Notes
- The tool was introduced in FreeCAD v0.17.8053. FreeCAD needs to be compiled with OCC 6.9.0 or later; otherwise, the tool is unavailable.
- ̈Properties are accessible on the slices inner object, not on the result level.
- The Objects to slice with must completely separate the object to be sliced. Thus a cube cannot be sliced by a wire, but by a plane derived from an extruded wire for instance.
- Slicing object must pass BOP check. See Part CheckGeometry.
Scripting
The tool can by used in macros and from the python console by using the following function:
BOPTools.SplitFeatures.makeSlice(name)
- Creates an empty Slice feature. The 'Base' and 'Tools' properties must be assigned explicitly, afterwards.
- Returns the newly created object.
Slice can also be applied to plain shapes, without the need to have a document object, via:
BOPTools.SplitAPI.slice(base_shape, tool_shapes, mode, tolerance = 0.0)
This can be useful for making custom Python scripted features.
Example:
import BOPTools.SplitFeatures
j = BOPTools.SplitFeatures.makeSlice(name= 'Slice')
j.Base = FreeCADGui.Selection.getSelection()[0]
j.Tools = FreeCADGui.Selection.getSelection()[1:]
The tool itself is implemented in Python, see /Mod/Part/BOPTools/SplitFeatures.py (GitHub link) within the FreeCAD installation directory.
Tutorials
- FreeCad 0.18 Part WB using Slice and Slice Apart (English language), author: Ha Gei
- FreeCAD Slice und Slice Apart und andere Tricks (German language), author: Ha Gei
- Примитивы: Куб(Параллелограмм), Конус, Цилиндр, Сфера, Тор, Полый цилиндр,Примитивы, Связующие формы
- Создание и правка: Выдавливание, Построение фигуры вращения, Отражение, Скругление, Фаска, Создать плоскость из граней, Ruled Surface, Профиль, Sweep, Section, Cross sections, 3D Offset, 2D Offset, Создать полый объект, Projection on surface, Прикрепление
- Булевы операции: Соединить, Разорвать связь, Compound Filter, Булевы операции, Cut, Fuse, Common, Connect, Embed, Cutout, Boolean fragments, Slice apart, Slice, XOR
- Измерительные: Measure Linear, Measure Angular, Measure Refresh, Clear All, Toggle All, Toggle 3D, Toggle Delta
- Начинающим
- Установка: Загрузка, Windows, Linux, Mac, Дополнительных компонентов, Docker, AppImage, Ubuntu Snap
- Базовая: О FreeCAD, Интерфейс, Навигация мыши, Методы выделения, Имя объекта, Настройки, Верстаки, Структура документа, Свойства, Помоги FreeCAD, Пожертвования
- Помощь: Учебники, Видео учебники
- Верстаки: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework