Changes

Building Geometrical Constructions in CubeCAD

256 bytes removed, 22:52, 6 September 2016
/* Importing & Exporting CAD Models */
* Python File (*.PY)
To import an external file of one of the above formats, select '''Menu > File > Import...''' Once the standard [[Windows]] Open Dialog pops up, select the desired file extension from the dropdown list labeled "Files of type:". Then, select the desired file and click the '''Open''' button of the dialog. This opens another dialog that shows the progress of loading the imported file. You can abort the import process by clicking the '''Abort Translation''' button. You can also view a report of the process. All imported objects are listed under Color_1. From this group you can move them to other groups. In some cases, the imported object might already be organized in different colors or groups. In all file formats except for STL, [[Solid Objects|solid objects]] are imported as [[EM.Cube]]'s generic solids and [[Surface Objects|surface objects]] are imported as [[EM.Cube]]'s generic surfaces. From STL files, objects are imported as [[EM.Cube]]'s native polymesh objects.
{{Note|You can import external CAD files only into [[CubeCAD]]. From here you can move objects to [[EM.Cube]]'s other modules.}}
* Python File (*.PY)
To export the project structure to an external file of one of the above formats, select '''Menu > File > Export...''' Once the standard [[Windows]] Save As Dialog pops up, select the desired file extension from the dropdown list labeled "Save as type:". Then, type in a name for the file and click the '''Save''' button of the dialog. This opens another dialog that shows the progress of writing the exported file. You can abort the export process at any time by clicking the '''Abort Process''' button.
Note that in the case of DXF export, all the surface CAD objects lying in the XY Plane or in any horizontal plane and only rectangular objects lying in the YZ or ZX planes or in any vertical plane parallel to these planes are exported. Curve and solid CAD objects are ignored during the export process.
===Working with STL Models===
Stereolithography files contain a tessellated (triangulated) representation of a structure. [[EM.Cube|EM.CUBE]] treats STL files in a special way. You can export the project structure into a STL file in the form of a polymesh object. This is similar to writing the structure mesh data into a mesh data file of ".msh" extension. The project structure is tessellated using [[CubeCAD|CUBECAD]]'s triangular surface mesher of the '''Structured Type'''. [[EM.Cube|EM.CUBE]] gives you two options for STL export: '''Binary STL''' and '''ASCII STL'''. The latter file is bigger in size. You can import STL files of both binary and STL types into [[EM.Cube|EM.CUBE]]. STL models are imported as native polymesh objects. As a result, you can edit the imported objects and modify their various [[parameters]] arbitrarily. This is in contrast to importing files of other formats, which create solid and [[Surface Objects|surface objects]] of the generic type. Once you import a STL file, you can change the mesh type of the imported object to the '''Regular Type'''. You can also decrease the '''Edge Length''' to obtain a higher resolution. Just like other polymesh objects, you can insert nodes on the faces and edges or delete nodes from the imported object.
=== CubeCAD's Surface Mesh ===
# Using the keyboard shortcut '''Ctrl+M'''.
When the mesh is displayed in the Project Workspace, [[EM.Cube|EM.CUBE]]'s mesh view mode is enabled. In this mode, all the objects are discretized using the selected mesh generation algorithm and the meshes of all objects are displayed. In mesh view, you cannot mouse-over, select or edit any objects. The mesh view is for viewing purpose only. You can perform most of view operations such as zooming in and out using the mouse scroll wheel, rotating the view using the right mouse button '''RMB''' and panning the view using '''Shift+RMB'''. When [[EM.Cube|EM.CUBE]] is in mesh view mode, the '''Show Mesh'''[[File:mesh_tool_tn.png]] button of '''Compute Simulate Toolbar''' remains depressed. To hide the mesh, exit the mesh view mode and return to the normal view mode, simply click the '''Show Mesh'''[[File:mesh_tool_tn.png]] button one more time to toggle its state, or press the keyboard's '''Esc Key''' (Escape), or select the menu item '''Menu [[File:larrow_tn.png]] Compute [[File:larrow_tn.png]] Simulate → Discretization [[File:larrow_tn.png]] → Show Mesh''' and remove the check mark in front of it.
You can change the mesh type and the mesh resolution from the CAD Mesh Settings Dialog. Click the '''Mesh Settings'''[[File:mesh_settings_tn.png]] button of '''Compute Simulate Toolbar''' or select the menu item '''Menu [[File:larrow_tn.png]] Compute [[File:larrow_tn.png]] Simulate → Discretization [[File:larrow_tn.png]] → Mesh Settings...'''In the dropdown drop-down list labeled '''Mesh Type''' you can select one of the three options: '''Regular Surface''', '''Structured Surface''' or '''Tetrahedral'''. The mesh resolution is controlled by '''Edge Length''' which is expressed in project units. The default value of edge length is 10 units. This means that the default mesh features cells with a size of about 10 units. When you change the mesh type or resolution, you can see the effect using the '''Apply''' button if [[EM.Cube|EM.CUBE]] is already in mesh view mode. After [[EM.Cube|EM.CUBE]] generates a mesh, it saves its and uses it the next time you want to see the mesh. The mesh stays the same until you change its [[parameters]]. Sometimes, you may want to regenerate the mesh with the same current [[parameters]]. To do so, select the menu item '''Menu [[File:larrow_tn.png]] Compute [[File:larrow_tn.png]] Simulate → Discretization [[File:larrow_tn.png]] → Regenerate Mesh'''.
===Saving Mesh Data to a File===
28,333
edits