OCCT DRAW and DE Commands Guide (ika authored) #352
dpasukhi
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
OCCT DRAW Commands Guide
How to Find a Necessary Command?
If you know a part of the name, you can use
help
and a wildcard*
. For example, if you are looking for a command related to faces, use:This will return several command names, including
mkface
.Note: DRAW commands and searches are case-sensitive.
How to Import and Export Files?
The easiest way to import a file is to call the DE Wrapper command, which imports the file into an XCAF model:
Each format also has its own commands. Uppercase commands work with XCAF, while lowercase commands operate on shapes. Examples:
Exceptions: Importing XBF and BREP uses:
To export a file, use:
Other writing commands:
How to Check Import and Shape Statistics?
Key commands:
Shape or document info:
How to Look into an XCAF Document?
Options for inspecting an XCAF document:
DFBrowse
- Opens the document in a new window.inspector.bat
.How to Visualize a Shape?
Several options are available:
Basic Viewer:
small
/axo
- Opens a simple viewer.isos
normals
l
,d
,r
,u
(rotation),fit
,wzoom
3D Viewer:
vinit
- General 3D viewerXShow
- XCAF-specific 3D viewervdisplay
,vdonly
,verase
,vclear
vsetdispmode
2D Viewer:
av2d
- Opens a 2D viewer for pcurvespcurve
Multi-View:
mu4
- Splits into 4 views (3 projections + axo)How to Work with XCAF Document Data?
XCAF tool methods exposed in DRAW start with
X
. Use:Useful commands:
How to Localize a Problem in a Large Shape?
If a geometric issue exists in a large shape, it needs to be isolated. The most useful format for debugging is STEP.
Read the file:
Find problematic shape:
Find the original entity:
Partial Import for Faster Debugging:
This imports only the problematic entity as a new shape.
How to Automate Work?
To execute TCL scripts from DRAW, use:
This allows for automation of common tasks in OCCT.
How to Modify and Analyze Shapes?
Constructing and Modifying Shapes
You can create and modify geometry directly in DRAW.
Analyzing Shape Properties
Guide to Data Exchange (DE) in OCCT
What is Data Exchange (DE)?
Data Exchange in Open CASCADE Technology (OCCT) refers to reading data from external files into OCCT's internal model and writing data back to files. This involves handling various file formats and transforming data between different representations.
Building
General Building Tips
Debugging
Different formats have unique implementations. Mastering one format does not necessarily imply familiarity with others. Below are some general debugging strategies.
Documentation
While most issues can be solved without documentation, there are cases where consulting resources is necessary.
Reading Process
Reading consists of multiple steps:
help *stl*
to findreadstl
). Or use common DE Wrapper (readfile
andwritefile
for shapes,ReadFile
,WriteFile
for documents)getsource readstl
).Parsing Files
Parsing converts file to internal representation, needed only to transfer.
Common parsing issues:
Translation
Translation converts parsed data into OCCT structures:
TopoDS_Shape
, losing metadata.Shape Healing
Shape healing adapts imported shapes for compatibility with OCCT algorithms. It involves processes like:
Writing Process
Writing involves:
Testing
OCCT uses structured test grids (e.g.,
de
,de_mesh
). Standard workflows involve reading, writing, and comparing data integrity.Author:
@ikochetkova
Beta Was this translation helpful? Give feedback.
All reactions