CAD Import/Export

Importing from CAD file

The CAD Window

The CAD window displays the selected drawing, command buttons at top and left, and some input fields at the bottom:

 

The window can be maximized or resized. The drawing will then be automatically rescaled to fit the new window size.

The mouse cursor will change shape to indicate the active function. A context menu (right click) is available for the most common functions.

 

Field descriptions

Scale

CAD files has no standard unit, so they can be drawn in meters, centimeters, millimeters, feet and so on. OptiWin always uses meters or feet.

The scale field must contain the conversion factor between the drawing's unit and the unit used in OptiWin.

Example: If the drawing unit is mm, scale should be set to 1:1000. If the drawing unit is meters, scale should be set to 1:1.

The coordinates at the top menu bar is the drawing coordinates, multiplied with the scale. You can use these coordinates to see if the scale factor is set correctly.

Tip: To determine the drawing unit you can use the distance measuring tool located at the top button bar, and possibly a calculator.

This field will default to the users last setting, or - if re-importing - the previous scale used for that import.

Height

Room height in selected OptiWin unit (meter or feet).

Any changes to this field will automatically be written to the user's profile in the ini-file, and will be reloaded next time the window is opened.

If the drawing is opened from the "Open CAD drawing" button in the room window, this field will be set to the current room height.

Floor height

The floor height used when adding room corners.

Rotation

Enter rotation angle of drawing manually. Press Enter or Space to execute rotation.

Quality

This slider determines the overall detail of the drawing. Not all object types are affected by this setting, but in some cases it can drastically reduce the complexity.

Clipping

These fields controls the clipping. First, there is an enable/disable checkbox for each of the ceiling, floor and walls.

The next input field controls the size expansion of the clipped area. As an example, by setting this value to 0.20 the clipped area will be expanded by 0.20 meters upwards and to the sides (walls). This setting can be useful if you are placing the room corners inside the room extents in the drawing, but want to include the drawing walls and ceiling in the import.

Preparing for import

Basic parameters

The first step is to setup the basic drawing parameters. Setting up the scaling first will simplify the rest of the steps.

Next, setup the room and floor height. This step can also be done graphically by manipulating the clipping box.

 

Setup clipping

If you are working with a 3D drawing, it can be helpful to enable clipping for the floor and ceiling while setting up these parameters.

To enable these features, simply check the appropriate checkbox from the bottom menu. The results can be seen when viewed from the side:

No clipping

 

 

When you are done setting up the drawing parameters you can start importing room data.

Setting up the room corners

Choosing the correct room shape

There are three basic room shapes to choose from. These are Rectangular room, P-shaped orthogonal room and P-shaped room.

Instructions for setting up each room type will be shown in the yellow area at the bottom of the window.

Placing the room corners

By following the instructions on the bottom, a room is placed by selecting the bottom left and top right corner point.

 

After setting up the basic shape, the room can be adjusted to the exact location by clicking and dragging the grip points.

 

By enabling clipping and a border area we can see the exact shape which will be imported.

 

Closing a room

If you are using any of the P-shaped placement methods, the room will not be closed (i.e. missing a wall segment) until the close button

is clicked.

Restarting room placement

If you want to start placing the room corners over again, the current shape can be deleted by pressing the

button.

Adding extra corners

If you want to add more corners/walls to a completed room, this can be done by either using the context menu (right mouse button) and choosing Insert room corner, or by pressing and holding the CTRL key, then dragging a wall center point to the desired corner position.

This function can be used for any room shape, but note that the room will not be treated as orthogonal after performing this step.

Import drawing

The import button will only be available when a complete room has been defined in the CAD window.

When you have finished defining the room, click this button and the following window will be displayed:

Save Background

The selected room’s part of the drawing will be saved together with the OptiWin room.

In the luminaire positioning window, you can display the drawing background to ease positioning of objects in the room, and also reposition room corners.

 

Save 3D objects

In addition to the 2D background data, a 3D representation of the room will be saved.

Read more about importing 3D models here.

Info

By pressing the Info button, you can show the advanced options for importing data:

 

In addition to the parameters described earlier (like scale and height) you can modify some additional settings here.

Lower left corner

This is the coordinate of the lower left corner of the room. When importing 3D models, the Z coordinate is important to get the correct model data.

Note. when re-importing data, the lower left corner can be modified directly to achieve greater precision.

Room dimensions

Length, width and height of the room's surrounding cube. The height value can be altered manually.

When all information is found satisfactory, press the OK button. The room information will be updated.

Copying and reimporting data

The CAD reimport function can be used to place predefined rooms directly into a CAD file, performing new 2D/3D model data reimport and assigning the correct coordinates.

Re-importing data

When you have finished a room and possibly exported the data back to the drawing, it can be useful to be able to re-use this for further planning.

 

 

If you have several similar rooms, the import process can be simplified by using the button "Specify room position".

Note: when reimporting 2D background data, all light calculation is preserved for that room.

The copy and reimport function

Press the "Specify room position" button

to activate the copy/reimport functionality.

Then, simply click the location where you want the rooms lower left corner to be at.

  • For rectangular rooms, this is simply the lower left corner.

  • For polygonal rooms, this is the minimum X and Y coordinate, for example:

Copying room data

After specifying a room position the copy window will be shown:

The purpose of this function is to speed up the process of creating many similar rooms.

Press Cancel if you want to adjust the room position and perform a manual import.

Source room

This shows the name and serial number of the room which will be used as the basis for the copy.

New room name

Type the desired name of the new room here.

Save background / Save 3D objects

These options determine the data to import from the CAD drawing (2D and 3D background model).

Hide existing OptiWin-data

If this option is selected, existing OptiWin-data will be excluded from the background model.

Update position labeling

This option determines whether new position labels will be created for the room copy.

The option is only available if a position labeling profile has been selected for the active project.

Export back to drawing

Check this option to automatically export the new room back to the CAD drawing.

Reimporting data

If you cancel the room copy dialogue the room selection area will still be present in the CAD window. You can now reimport data manually.

Remember to make a copy of the active room in the Room dialogue if you don't want to overwrite the existing data.

After canceling the copy dialogue, the room corners will be shown inside the CAD window:

If the placement is a bit off you can hold the ALT key, then drag the entire room to the desired position.

When everything is in order you can proceed to import the room.

3D Model

Prepare 3D model

OptiWin 3D pro can also import 3D-model data from external CAD drawings.

This chapter describes how to prepare and import such background model data.

 

Why should the model be lighter?

Model sizes can vary greatly, and it is normally not necessary to include the full model when exporting.

 

Light calculation is highly dependant on the number of surfaces

Since light reflections are calculated, increasing the number of surfaces will incrementally increase the time taken to perform the calculations.

 

Complex 3D models can easily have more than 800 000 surfaces
For such models, light calculations will take approximately 30 minutes. A simple 3D model with 20.000 surfaces does the calculation in only 30 seconds.

 

Details will not affect the calculation result substantially

It is important to distinguish between details which should be a part of the calculation, and the non-important elements.

Dividing into smaller sections

Before opening drawings in Optiwin 3D Pro it is important to plan in how many areas the full model should be split for light calculations.

Indoor areas can usually be split up into separate sections, thus reducing the calculation time for each room.

Open areas should be calculated as one area to give the correct result from all light fixtures, e.g flood lights.

 

Reducing the model complexity

There are several different ways to simplify the model before using it in OptiWin:

  • Define a limited area for light design, e.g 15x10x5m

  • Filter on object type – do not export certain object types

  • Filter on object size – ignore small objects

  • Manually select/unselect objects to export

  • Manually select all objects needed for light calculation

 

From the CAD window you can also adjust the quality slider to get the desired model complexity.

 

As you will see in the following example, model complexity certainly reduces calculation time, but does not necessarily affect the calculation result too much.

Example: Normal calculation with high and low import quality

High Quality 3D model import

This model was imported with the highest import quality setting.

A standard calculation was performed, with the following results:

  • Time taken for full calculation: 1 minute, 19 seconds

  • Resulting EMid value: 110 Lux

 

 

 

Low Quality 3D model import

This model was imported with the lowest import quality setting.

A standard calculation was performed, with the following results:

  • Time taken for full calculation: 22 seconds

  • Resulting EMid value: 110 Lux

Importing 3D model

Determining origin and height

When working with a 3D model the height and origin must be specified correctly to get the desired data.

 

Switching to side view

Using the view menu to the left, switch to one of the side views view, e.g "Show frontside" [2]. The model will be shown from the side.

(If the side view menu is disabled, you must first switch to a view adjustment mode, e.g Orbit [1])

 

If the model seems small, click "Zoom Extents" [3] to get a closer and more detailed view:

 

 

Determining the Z origin

Now you can simply place the cursor in the lower section of the model [4], and read out the coordinate on the top menu [5].

Remember the Z-coordinate value, as you will need this later.

 

Determining the height

The next step is to get the model height. Switch to the Measure distance tool [6], then draw a line from the lower Z origin to the top of the model [A]:

 

 

Now you can read the delta Z value from the top menu bar [B]. This is the room height, and you can type it directly into the Height field at the bottom:

 

Import 3D drawing

The next step is to switch to an overhead view again. Choose "Show from top" from the left menu bar. The room shape buttons should be activated again.

Now you can activate one of the room definition buttons and describe the room as in 2D. Next, click the Import button as usual:

When you have finished selecting room corners, click this button, and the following window will be displayed:

Type in the height readout from earlier into the field "Height - Floor".

Remember to check the option "Save 3D objects".

Now that you have all the 3D model settings correct, press the OK button to complete the import.

 

Measure scale

(TODO)

Recover CAD Drawing

CAD recovery window

The CAD recovery window can be accessed by pressing the

button on the main menu:

 

Check file

The function "Check file" can be used to perform error checking without modifying the file.

If the option "Modify drawing for correct viewing" is checked, various calculations will be performed on the drawing:

  • For very large/small drawings, the "Scale drawing" option will be enabled and a scaling factor suggested.

  • If the drawing extents has extremely large coordinates, the "Center drawing" option will be enabled.

 

Recover and save file

Scale drawing

With this option enabled the resulting drawing will be scaled by the factor shown to the right of the option.

When using the "Check file" function a scale factor will be suggested automatically.

 

Center drawing

Enable this option to move the drawing extents to coordinates which work better in OptiWin.

 

Save changes to copy

If this option is enabled the modified drawing will be saved to a copy, and the original drawing will remain untouched.

The drawing copy will be named "<original file name>_n.<extension>".

This option is enabled by default.

 

Save as external reference

If this option is enabled the copy will be saved as an XRef, which means that the original drawing will need to be

present in the same folder when accessing the drawing at a later time.

The drawing copy will be named "<original file name>_m.<extension>".

 

When to use the recover function

Broken drawing

If the drawing is physically unreadable you will be unable to open it inside the CAD window.

This could for example be caused by an incomplete save or an error during a file transfer operation.

Use the "Recover and save file" option to correct this. The changes will be saved to the original file.

Note: Unfortunately, not all drawings can be recovered. Some drawings might be damaged beyond repair.

 

Jagged drawing

Some drawings can be visually unreadable in the OptiWin CAD window:

This drawing error is caused by a limitation of the rendering system which results in rounding errors (external link).

 

By enabling the "Modify drawing" option, additional tests will be performed on the drawing:

 

To accept the suggested changes, select the "Recover and save file" option and press "Start". Here is the drawing after the changes:

 

Â