KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > 3D Debugger > Modelling Tutorials > Mouse Tutorial
Mouse Tutorial

Mouse Modeling Tutorial

This tutorial will demonstrate creation of  DInsight models representing curved closed surfaces. We will create a simplified model of a mouse. Subfolder Tutorial\Mouse  located in Models folder of the installation (C:\Program Files\DInsight\ by default ) contains models for each step of the tutorial and the final model Mouse.glm. It is helpful to keep the model open in another instance of 3D Debugger and refer to it during the modeling.

Step 1. Creating body of the mouse.

Step 2. Creating head of the mouse.

Step 3. Creating an ear.

Step 4. Assembly of the head.

Step 5. Assembly of the mouse.

 

Step 1. Creating body of the mouse.

  • Create folder called "MyMouse".
  • Restart 3D Debugger. Select the Model > New object command. Select Solid\Rotation symmetric\Sphere node. In Object name edit box type "Body". Press Modify button to change default dimension. Enter 3 into the Radius edit box. Turn "Allow asymmetric modifications" check box on. More options will appear in the edit box. Change "Edge coordinate type" to Cartesian. Press OK twice to close both dialogs. Save the model in the MyMouse folder using File > SaveAs menu command.
  • In Cross-section View (Bottom right pane) select the top point. Coordinates of the selected point  will appear on the Current Object Page of the form. If you do not see the Current Object page scroll to the left most page using buttons on the form. Enter x=0.0 and y=2.0 for the coordinates. You can check "Cross Plane" check box on "3D" page to see the current position of the cross-section plane. This position can be changed either by dragging blue line in profile view with the mouse or by clicking into "z cross-object position" edit box and moving the slider on the form.
  • Right-click in the Cross-section View pane and select "Strip Order" command to see numbering of the cross points. Enter as above coordinates (1.6, 0.0) for the point 0 and coordinates (-1.6, 0.0) for the point 2. As this model does not require precise dimensions you can do it by dragging points with the mouse to approximate positions. Set coordinates of the point number 3 (bottom point) to (0, -0.3)
  • Save the model. It is recommend to do it frequently so that in case of a mistake you can undo the changes by using File > Reload menu command (Ctrl+r shortcut).
  • Zoom in as appropriate using the right mouse button in the Cross-section View.
  • Add a new axial knot. To do that, enter -1.5 into "Cross posn" edit box of the form and press the Tab key to change the current cross-section position. Click new knot command button on the Command page of the form. New red tick mark will appear in the Profile View. You can change position of the knot later by dragging it with the mouse.
  • Switch to the "Wire frame" Render Type on 3D Page of the Form. 
  • Repeat the same procedure to add another knot at position 1.3. All segments in axial z direction in our model will consist now of three segments, which can be modified independently. This way we will have more freedom in approximation of body of the mouse. 
  • Next we will move apart ends of four lines, which converge at point z=3 on z axis (blue). At this side the head of the mouse will be joined to its body. Select point 0 in the Strip Order ( right mouse click > Strip Order )  in Cross-section View. z, x projection of the correspondent 3D line will appear in the Profile View. Select the last point ( at position z = 3.0 ). In the "Cur Elem" page of the form enter 0.6 in the "Cross value" edit box and press Tab Key to enter it. Select the opposite point in Cross-section View (point 2) and enter Cross value -0.6 for the last point in the Profile View to make it symmetric.
  • Select point 1 in Cross-section View. Right click in the Profile View and select "Coordinate y". The view will display z, y projection of the top 3D line. Select the last point in Profile View (at z=3.0) and enter 1.3 for its cross-section value.
  • Now we can adjust shape of the edge of the neck by using Cross-section View. Change the current cross position to the last knot (z=3.0) using spin button control next to "Cross posn" edit box of the form. Select point 0 in the Strip Order and in the "Cur Elem" page of the form enter 0.3 in the Y edit box. 
  • Repeat the same for the point 2. Enter y=0.1 for the point 3.
  • Next, we will adjust surface of the neck to make it more smooth. Select again point 0 in Cross View. Select the last arc (the one on the right) in Profile View and move its middle down to make the curve more smooth. Watch result in 3D View. Switch to Wire Frame mode and back if needed. Repeat the same for point 2.
  • Select point 1 in Cross-section View. Right click in the Profile View and select "Coordinate y". Select the last arc in Profile View and modify its curvature as above to make smooth joint of the body and the neck.
  • Next we will make surface patches more curved. Set current cross position to the last knot, which should be at position 3.0 and change shape of the top arcs in Cross-section View by increasing its curvature. Repeat the same for two knots in the middle. 
  • Using controls next to next to "Cross posn" edit box of the form set cross position to the middle between knots 0 (z=-3.0) and 1 (z=-1.5). Make sure 3D View is in the Solid mode (3D page). Increase curvature of top arcs in Cross-section View. This will make internal surface of patches more curved, although the change appeared 3D View  is minimal. Repeat the same for two other z ranges.
  • Resulting model should look like Step1_Mouse.glm.
  • Save the model.

 

Step 2. Creating head of the mouse.

  • It is convenient to create the head in a separate file and than import it into the Mouse model. Create a new model by using File > New menu command. In New Object dialog (Model > New Object ) select Surface>Surface Of Revolution>Sphere node. In the object name type "Head". Press Modify button. Change Radius to 1.35. Check "Allow asymmetric modifications"  and change Edge coordinates type to Cartesian. Pres OK two times. Save the model under name Head.glm.
  • Switch to "Wire frame" Render Type on 3D page. 
  • Clear Global Axes check box on 3D Page.
  • Look at strip order in cross-section view using correspondent command from context menu and enter coordinates (1.2, 0), (0, 0.9) and (-1.2, 0) by selecting points 0, 1, 2 in cross-section view in this order without changing current cross position.
  • Zoom in as necessary in Cross-section and 3D view.
  • Add a new axial knot at position -0.55 by entering this number in "Cross posn" edit box on the form and clicking new knot command button on the Command page.
  • Set cross-section position at the new knot. Select point 3 in Cross-section View (point 3 in strip order) and set its coordinates to (0, -1.1) using Current Element page of the form. Without changing selection in Cross-section View adjust curvature of the second arc (in the left to right order) in the Profile View to make the 3D curve smooth at the middle knot.
  • Select point 0 in Strip Order. In Profile View select the right hand arc Reduce its curvature to make the nose of the mouse more narrow. Repeat the same for the point 2. 
  • Select point 1 in Cross-section View. In Profile View switch to "Coordinate y" and reduce in the same way curvature of the top line. Repeat the same for the bottom point 3.
  • Switch to "Solid" Render Mode, using radio buttons on 3D Page.
  • Set Cross position to the middle of the second segment. and adjust arcs in Cross-section View to make head more curved.
  • Save the model.

 

Step 3. Creating an ear.

  • Create new box with dimensions 0.52  0.05 and 0.7 (X, Y and Z) and save it under name Ear.glm.
  • The object will be symmetric, so it is useful to position it symmetrically from the beginning in the local frame. Select "Current Object">Modify>"Translate Object" menu command. In the opened dialog enter x=0.26 and pres OK. The flat box will move to the left and local axes will be located in the middle.
  • Let us make all edges converge at the top of the ear. Move cross position to the first knot z=0. In Cross-section view select a point and enter 0 for its x coordinate (using Current Element page of the form). Leave y unchanged. Repeat the same for all other tree points. The object will become a solid triangle with thickness 0.05. 
  • Move cross position to the middle of the range. Right click in the Cross-section View to check the strip order and select point 0. Select the line which appeared in the Profile View and change it to arc ( "Change class" command from context menu). Modify the arc up to make this edge curved. Repeat this operation for other three points in Cross-section View.
  • To create cavity in the ear select the bottom line in Cross-section View and change it to arc. Set cross position to the last knot (z=0.7) and modify new arc by dragging a middle point down. Repeat the same for the top line.
  • Look at the back side of the ear. The surface is nearly flat close to the tip of the ear. To make the surface more curved we need to increase curvature of the patch in this area. To have more freedom for that we will add a new knot.
  • Add a new knot at z=0.15. Set Cross position to the new knot. 
  • Select bottom arc in Cross-section View. In the Profile View select the first point ( at z=0 ) and in the Current Element page of the form enter 4 for its value. Select the second line in Profile View ( between knots 0.15 and 0.7) and change it to arc. Modify position of the middle point and curvature of the new arc in the Profile View to adjust shape of the back of the ear as you dim appropriate. If you run out of room for mouse movements switch to View mode in context menu (right mouse) and use pan and zoom operations to move the model.
  • Select the top arc in Cross-section View. Select the first point in Profile View and enter -4 for its value. Notice the difference in sign. Change the second line to arc and modify its curvature and position of the middle point as above for the internal surface of the ear.
  • Select point 0 in Cross-section View. In the Current Element page check "Smooth surf joint" check box. This will remove sharp edge at the back of the ear. Slight black spots which can appear around the edge can be removed by increasing geometrical resolution (Current Object>Options, "Simplex per dim" edit box). It is preferable to do it in the end of the model design to avoid early computational load.
  • To make it more convenient for movements in the next step, it is better to move the local frame to the bottom end of the ear. Select "Current Object">Modify>"Translate Frame" menu command. Enter 0.7 in the Z edit box. Press Tab key. 3D View will show new position of the local frame. Press OK to accept.

 

Step 4. Assembly of the head.

  • Load Head.glm model. Switch to wire frame mode on 3D page of the form.
  • Import Ear.glm using Model > "Import Sections". The ear will appear at the origin of the global frame.
  • Open Current Object page and make sure that "Show local frame" check box is on.
  • Select "y" axis on the same page. Click into "Translate by" edit box. It should change its color to green. Move the slider down. The ear object will move up in 3D. Release the slider and move it again if you reached the limit of the slider range.
  • Select "x" axis radio button. Click into "Rotate by" edit box and move the slider down. The ear will rotate around its local x axis. Continuing in the same manner by switching between axis and translation or rotation, position the ear in a proper place on the right hand side of the head.
  • To add the left ear we will use symmetries. Open Symmetry Collection Editor ("Current Object">Symmetries). Select Mirror option. Press Add button. Open Properties dialog. Check "Show" box at the bottom to see the mirror plane. You still can manipulate 3D View with the Symmetry Editor open. Check "Global axes"  box. Enter all zeros in the location boxes. In the direction group enter X=1, Y=1 and Z=0 and press Apply button. The mirror plane should become aligned with y, z plane of the global frame and the second ear should be positioned symmetrically on the other side of the head. Clear Show check box and close the dialog. This is useful modeling technique because if we decided to modify shape of the ear the change will be reflected automatically in the other copy.
  • To attach the Ear to the head, open the Model Explorer. Make sure that Ear is the current object in the model. Select Head node in the tree. Select Action>Joint command from menu of the Explorer. Leave the Explorer open for a second.
  • Select Ear node in the Explorer. Clear "Show local frame" check box on the right. We will need to hide both Head and Ear to see the new object which will be created in the next operation at the origin of the global frame. Clear Visible check box on the right in the Explorer. Repeat the same for the Head node. Close Explorer.
  • To create an eye, in New Object dialog select Solid>Rotation Symmetric>Sphere node. Enter "Eye" in the Object Name edit box. Press Modify button and enter radius 0.1. Press OK in both dialogs to create the sphere.  
  • Change the color of the eye to black using "Surface color" controls on the Color page of Options dialog ("Current Object">Options).
  • Make visible the rest of the model by using Objects>"Show not current" menu command.
  • Position the eye similar to ear on the right hand side of the front of the head. Add a symmetrical copy to create the left eye. Join the eye to the head. Clear "Show local frame" check box.
  • To see the model in the natural color select the eye in the Model Explorer and press "Make Not Current" button on the right.
  • Save the model. The result should look like Step4 Head Assembly.glm

Step 5. Assembly of the mouse.

  • Open Mouse.glm model. On Current Object Page check Hide check box.
  • Import Head.glm.
  • On the Current Object page enter 6 for z coordinate for the Local Frame Origin.
  • Select "Show not current" option in Sections submenu. Body of the mouse will appear again. 
  • Turn on Show Local Frame check box on the Current Object page.
  • Using y and z radio buttons and "Translate by" edit box on the Current Object page move the head up and back to align with the body.
  • Select x axis. Activate "Rotate By" Edit box by clicking into it and rotate the head down by approximately 15 degrees.
  • Clear the "Show Local Frame" check box. On 3D page clear the "Global axes" check box.
  • Join the head to the body.
  • Increase geometrical resolution of the Body object. To do that, make Body the current object in the Model Explorer. In Options dialog  ("Current Object">Options ) increase "Simplex per dim" number to 15 - 25 depending on how fast you would like the model to load. Quality of the surface will improve. 
  • Repeat the same for the Ear object.
  • Deselect the current object using the Model Explorer.
  • Save the model.