Arch OBJ/de: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 2: | Line 2: | ||
{{docnav/de|[[Arch DAE/de|DAE]]|[[Arch JSON/de|JSON]]|[[Arch_Module/de|Arch-Arbeitsbereich]]}} |
{{docnav/de|[[Arch DAE/de|DAE]]|[[Arch JSON/de|JSON]]|[[Arch_Module/de|Arch-Arbeitsbereich]]}} |
||
== Description == |
|||
<div class="mw-translate-fuzzy"> |
|||
Zusätzlich zur Standard-FreeCAD [http://en.wikipedia.org/wiki/Wavefront_.obj_file OBJ]-Exportfunktion hat das [[Arch Module/de|Arch-Modul]] eine alternative Exportfunktion, die nebeneinander liegende Flächen als vollständige (whole) Flächen exportiert, anstatt als dreiecksbasierte [[Part Module/de|Formteil]]-Objekte, wie es die Standard-Exportfunktion tut. |
Zusätzlich zur Standard-FreeCAD [http://en.wikipedia.org/wiki/Wavefront_.obj_file OBJ]-Exportfunktion hat das [[Arch Module/de|Arch-Modul]] eine alternative Exportfunktion, die nebeneinander liegende Flächen als vollständige (whole) Flächen exportiert, anstatt als dreiecksbasierte [[Part Module/de|Formteil]]-Objekte, wie es die Standard-Exportfunktion tut. |
||
</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] |
|||
==Übungen== |
==Übungen== |
||
Line 9: | Line 45: | ||
{{docnav/de|[[Arch DAE/de|DAE]]|[[Arch JSON/de|JSON]]|[[Arch_Module/de|Arch-Arbeitsbereich]]}} |
{{docnav/de|[[Arch DAE/de|DAE]]|[[Arch JSON/de|JSON]]|[[Arch_Module/de|Arch-Arbeitsbereich]]}} |
||
{{Arch Tools navi{{#translation:}}}} |
{{Arch Tools navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
||
[[Category:File Formats{{#translation:}}]] |
[[Category:File Formats{{#translation:}}]] |
Revision as of 18:55, 10 September 2020
Description
Zusätzlich zur Standard-FreeCAD OBJ-Exportfunktion hat das Arch-Modul eine alternative Exportfunktion, die nebeneinander liegende Flächen als vollständige (whole) Flächen exportiert, anstatt als dreiecksbasierte Formteil-Objekte, wie es die Standard-Exportfunktion tut.
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
Übungen
Arch
- Elemente: Wand, Struktur, Dach, Fenster, Tür, Treppe, Raum, Rahmen, Ausstattung; Pipe, Pipe Connector; Schedule
- Bewehrung: Bewehrungsstab; Straight Rebar, UShape Rebar, LShape Rebar, Bent Shape Rebar, Stirrup Rebar, Helical Rebar
- Paneele: Panel, Panel Cut, Panel Sheet, Nest
- Material: Material, Multi-Material
- Organisation: Baugrund, Referenz,Gebäude, Geschoss, Gebäudeteil, Schnittebene
- Achsen: Achse, Achsensystem, Raster
- Änderungen: Schneiden in einer Ebene, Komponente hinzufügen, Teil entfernen, Survey
- Dienstprogramme: Komponente, Komponente klonen, Netz zerlegen, Netz in Form umwandeln, Wähle nicht-mehrfache Polygonnetze, Entferne Form, Schließt Löcher, Wände zusammenfügen, Check, Ifc Explorer, Toggle IFC Brep flag, 3 Ansichten aus Netz, Erstelle IFC Kalkulationstabelle..., Toggle Subcomponents
- Additional: Einstellungen, Import-Export Preferences (IFC, DAE, OBJ, JSON, 3DS); Arch API
Anwenderdokumentation
- Erste Schritte
- Installation: Herunterladen, Windows, Linux, Mac, Zusätzlicher Komponenten, Docker, AppImage, Ubuntu Snap
- Grundlagen: Über FreeCAD, Graphische Oberfläche, Mausbedienung, Auswahlmethoden, Objektname, Programmeinstellungen, Arbeitsbereiche, Dokumentstruktur, Objekteigenschaften, Hilf FreeCAD, Spende
- Hilfe: Tutorien, Video Tutorien
- Arbeitsbereiche: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework