Arch OBJ/ru: Difference between revisions
Renatorivo (talk | contribs) (Created page with "Category:Arch/ru") |
(Updating to match new version of source page) |
||
(17 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
⚫ | В дополнение к стандартному экспортировщику файлов [http://en.wikipedia.org/wiki/Wavefront_.obj_file OBJ] FreeCAD, [[ |
||
<div class="mw-translate-fuzzy"> |
|||
{{docnav/ru|[[Arch DAE|DAE]]|[[Arch JSON|JSON]]|[[Arch_Workbench|Arch Module]]}} |
|||
</div> |
|||
{{TOCright}} |
|||
== Description == |
|||
<div class="mw-translate-fuzzy"> |
|||
⚫ | В дополнение к стандартному экспортировщику файлов [http://en.wikipedia.org/wiki/Wavefront_.obj_file OBJ] FreeCAD, [[Arch_Workbench/ru|модуль Arch]] содержит альтернативный экспортёр, который экспортирует сопланарные поверхности как полные поверхности OBJ, вместо триангуляции объектов [[Part_Workbench/ru|Shape]], как делает стандартный экспортёр. |
||
</div> |
|||
== Exporting without GUI == |
|||
Exporting without the graphical interface is possible from the command line, using the [[Mesh_Workbench|Mesh Workbench]] exporter only. |
|||
In this example, a STEP file is imported, the colors of the [[Shape|Shape]] are saved, then a mesh is created from it, the colors of the original object are re-applied to the faces of the new mesh, which is then exported to OBJ format. Since this is done with the Mesh Workbench, the result is a triangulated mesh. |
|||
{{Code|code= |
|||
import Mesh |
|||
import MeshPart |
|||
import Import |
|||
data = Import.open("example.stp") |
|||
shape = data[0][0].Shape |
|||
shape_colors = data[0][1] |
|||
mesh = MeshPart.meshFromShape(Shape=shape, LinearDeflection=0.1, Segments=True) |
|||
face_colors = [(0, 0, 0)] * mesh.CountFacets |
|||
for i in range(mesh.countSegments()): |
|||
color = shape_colors[i] |
|||
segm = mesh.getSegment(i) |
|||
for j in segm: |
|||
face_colors[j] = color |
|||
mesh.write(Filename="new_example.obj", Material=face_colors, Format="obj") |
|||
}} |
|||
== More information == |
|||
* [https://forum.freecadweb.org/viewtopic.php?f=8&t=37452 Convert STEP to Wavefront OBJ with colors of faces] |
|||
==Tutorials== |
|||
<div class="mw-translate-fuzzy"> |
|||
==Учебники== |
==Учебники== |
||
* [[Import_from_STL_or_OBJ/ru|Импорт из STL или OBJ]] |
* [[Import_from_STL_or_OBJ/ru|Импорт из STL или OBJ]] |
||
* [[Export_to_STL_or_OBJ/ru|Экспорт в STL или OBJ]] |
* [[Export_to_STL_or_OBJ/ru|Экспорт в STL или OBJ]] |
||
</div> |
|||
<div class="mw-translate-fuzzy"> |
|||
[[Category:User Documentation/ru]] |
|||
{{docnav/ru|[[Arch DAE|DAE]]|[[Arch JSON|JSON]]|[[Arch_Workbench|Arch Workbench]]}} |
|||
</div> |
|||
{{Arch Tools navi{{#translation:}}}} |
|||
[[Category:Arch/ru]] |
|||
{{Userdocnavi{{#translation:}}}} |
|||
[[Category:File Formats{{#translation:}}]] |
Latest revision as of 12:05, 19 May 2023
Description
В дополнение к стандартному экспортировщику файлов OBJ FreeCAD, модуль Arch содержит альтернативный экспортёр, который экспортирует сопланарные поверхности как полные поверхности OBJ, вместо триангуляции объектов Shape, как делает стандартный экспортёр.
Exporting without GUI
Exporting without the graphical interface is possible from the command line, using the Mesh Workbench exporter only.
In this example, a STEP file is imported, the colors of the Shape are saved, then a mesh is created from it, the colors of the original object are re-applied to the faces of the new mesh, which is then exported to OBJ format. Since this is done with the Mesh Workbench, the result is a triangulated mesh.
import Mesh
import MeshPart
import Import
data = Import.open("example.stp")
shape = data[0][0].Shape
shape_colors = data[0][1]
mesh = MeshPart.meshFromShape(Shape=shape, LinearDeflection=0.1, Segments=True)
face_colors = [(0, 0, 0)] * mesh.CountFacets
for i in range(mesh.countSegments()):
color = shape_colors[i]
segm = mesh.getSegment(i)
for j in segm:
face_colors[j] = color
mesh.write(Filename="new_example.obj", Material=face_colors, Format="obj")
More information
Tutorials
Arch
- Elements: Wall, Structure, Curtain Wall, Window, Roof, Space, Stairs, Equipment, Frame, Fence, Truss, Profile, Pipe, Pipe Connector
- Reinforcements: Straight Rebar, U-Shape Rebar, L-Shape Rebar, Stirrup, Bent-Shape Rebar, Helical Rebar, Column Reinforcement, Beam Reinforcement, Slab Reinforcement, Footing Reinforcement, Custom Rebar
- Panels: Panel, Panel Cut, Panel Sheet, Nest
- Materials: Material, Multi-Material
- Organization: Building Part, Project, Site, Building, Level, External reference, Section Plane, Schedule
- Axes: Axis, Axes system, Grid
- Modification: Cut with plane, Add component, Remove component, Survey
- Utilities: Component, Clone component, Split Mesh, Mesh to Shape, Select non-manifold meshes, Remove Shape from Arch, Close Holes, Merge Walls, Check, Toggle IFC Brep flag, 3 Views from mesh, Create IFC spreadsheet, Toggle Subcomponents
- Additional: Preferences, Import Export Preferences (IFC, DAE, OBJ, JSON, 3DS, SHP), IfcOpenShell, IfcPlusPlus, Arch API
Документация пользователя
- Начинающим
- Установка: Загрузка, 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