www.schorsch.com

Free Downloads

Contact | Sitemap | Search

Dxf2rad 1.1.0
User Manual

Dxf2rad - Geometry converter from DXF to Radiance.

Contents

Synopsys

dxf2rad [options] dxffile [radfile]

Where options may include:
  -h        help (show this text and exit)
  -H        display copyright and license and exit
  +g/-g     do/don't export geometry data (default +g)
  -G prefix geometry modifier prefix (default "l_")
  -a atol   angle tolerance for arc subdivision (default 15.0°)
  -d dtol   distance tolerance for arc subdivision (default 0.1)
  +v/-v     do/don't export views (default -v)
  -V prefix view file prefix (default "<radfile>_")
  -r        report progress (repeat for verbosity)
  -s scale  multiply all dimensions with scale
  -ennn     exclude entity types
  +ennn     include entity types
            Where each 'n' is one out of (with defaults):
            a  + 3D FACEs
            b  + Extruded and Flat 2D SOLIDs
            c  + Extruded and Flat TRACEs
            d  + Extruded 2D PLINEs
            e  + Wide 2D PLINEs
            f  - Closed 2D PLINEs as Polygons
            g  + 3D MESHes
            h  + POLYFACEs
            i  + Extruded LINEs
            j  + Extruded ARCs
            k  + Extruded and Flat CIRCLEs
            l  - POINTs as Spheres

If <radfile> is omitted or is the single character '-',
then the geometry output will go to stdout, in which case
progress reporting is suppressed.

Description

Dxf2rad is a command line utility for translating geometry data from the DXF file format into the format understood by the Radiance lighting simulation package.

DXF entities can be filtered by command line options.

Output primitives will have modifiers based on the layer of each entity in the form "l_<layer>". Floating layers within blocks are fully supported. "Funny characters" in the layer name will replaced by an underscore each.

Installation

Dxf2rad is a standalone application that doesn't require any special installation procedures. If the binary is somewhere on your $PATH, then you can call it anywhere without restriction.

Options

-h
Print a short usage description to the console and exit.

-H
Print the copyright and free license statements and exit.

-v
Verbose: Report progress on standard error (repeating this option increases verbosity).

-s scale
All output will be scaled by the scale factor.

-d dtol
Distance Tolerance for arc approximation. Arc entities and arc segments of polylines have to be meshed for the use in Radiance. This value specifies how smooth these meshes will appear in the final image. Higher values will make smoother surfaces. The default of 0.1. It is recommended to test for optimised settings, balancing file size and visual accuracy, since the optimal setting depends on the size and scale of your model.

-a atol
Angle Tolerance for arc approximation. The surface normal of neighbouring mesh elements will not differ by more than this amount in degrees. The default is 15.0 degrees, which usually gives reasonable results. The effect of this setting is independent of model size and complexity. Please note that very low values (eg. below 2.0 degrees) can lead to unreasonably big output files and may even crash dxf2rad when running out of memory.

-s scale
Output scaling factor. Output geometry will be scaled according to this factor. Radiance preferrably uses international (SI) units, ie. meters.

+e str
Include entities
-e str
Exclude entities

"str" is a string of characters out of the following, specifying which entity types are to be included or excluded. By default all entities that define a surface in Autocad (opaque for the hide and shade/render commands) are included. All polygons keep their orientation as created in Autocad determined by the right hand rule as explained in the Radiance tutorial. Entities extruded by thickness will be inverted if their thickness value (or "PDSIZE" for point entities) is negative. 2d-polilines and lightweight polylines are treated the same.

a - 3D FACEs
3dfaces will be split to two triangular polygons if not planar.

b - Extruded and flat 2D SOLIDs
Solids will appear as a single polygon or as a box if the thickness is non-zero.

c - Extruded TRACEs
Traces will appear as a single polygon or as a box if the thickness is non-zero.

d - Extruded 2D PLINEs
2d-polylines with a non-zero thickness will appear as a set of polygons.

e - Wide 2D PLINEs
2d-polylines with a non-zero starting width set in their header entity (not the vertexes!) will appear as a polygon following the trace of the polyline with a constant width. This option will override the polygon option for polylines that match both categories. Together with a thickness and the respective option set this will will result in a kind of a quadrilateral worm.

f - Closed 2d PLINES as polygons
2d-polylines with the closed flag set in their header entity will appear as a polygon of the shape of the polyline. polylines with a width will not follow this rule if wide 2D-PLINEs are selected as well. Together with a thickness and the respective option set this will result in a prismatic volume of the shape of the polyline. This option is off by default.

g - 3D MESHes
The Faces of 3d-polygon meshes will appear as a set of polygons ignoring spline fits of any kind. Nonplanar faces will be split into two triangles.

h - POLYFACEs
The faces of polyface meshes will appear as a set of polygons. Nonplanar faces will be split into two triangles.

i - Extruded LINEs
Lines with a non-zero thickness will appear as a single polygon each.

j - Extruded ARCs
Arcs with a non-zero thickness will be segmented according to the given arc tolerance values.

k - Extruded and flat CIRCLEs
Circles will appear as a ring with a inner radius of zero or as a cylinder/tube with a ring at either end if their thickness is non-zero.

l - POINTs as Spheres
Point entities will appear as spheres or bubbles depending on either their thickness (if any) or else on the value of the Autocad system variable "PDSIZE". if the result is zero, then the entity is ignored. This option is off by default.

Examples

To convert an existing DXF file to a Radiance rad file:
    dxf2rad input.dxf output.rad
To convert an existing DXF file to a Radiance rad file, while including polygons and points/spheres as well as scaling the output by 2.0:
    dxf2rad -s 2 +e fl input.dxf output.rad
To convert an existing DXF file to standard output, while only including ARCs and excluding everything else, requiring that the arcs are subdivided with an angle difference of 5 degrees or less:
    dxf2rad -a 5 -e abcdeghik input.dxf -

Files

dxf2rad[.exe]
Program file

dxf2rad-manual.html
This file

dxf2rad-readme.html
General info

Caveats

Please note that the AME solid modelling package by Autodesk as included in Autocad R10-R12 generates surfaces with surface normals pointing to the inside of the created volumes (at least most of the times...).

Models created with the AME Solid modelling package must have surfaces defined with the command "SOLMESH". Otherwise they consist of only wireframe information wich cannot be extracted by Radout.

The "SOLID" entities in Autocad, which can be extracted with the "Extruded and flat Solids" option, have nothing to do with solid modelling, AME or ACIS. These are a feature out of the 2D days of Autocad and are just flat quadrilateral faces which appear solidly filled when viewed from top. They form quadrilateral prisms if extruded, which can only be done in a right angle to their ground plane.

Entities created with the ACIS solid modeller or custom entity types defined by any other 3rd party application ("proxies", previously "zombies") are ignored.

Bugs

For multiple inserts, only one item is exported.

Author

Georg Mischler

See Also

Autocad DXF Reference and format specification.

Tutorial and manual pages of Radiance 3.1, Synthetic Imaging System. Gregory Ward Larson, Lawrence Berkeley Laboratory, Berkeley, CA.

License

The MIT License (MIT)

Copyright © 2000-2016 Georg Mischler, Munich, Germany.
 
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
http://www.schorsch.com/en/download/dxf2rad/manual.html
Copyright © 2004-2020 schorsch.com