StCAD
3D CAD Framework for Smalltalk
Open Source MIT License

by
A-S Koh
curriculum vitae (resume)
askoh@askoh.com

Page updated: 2018/06/09

What is 'StCAD'?
What are the features of 'StCAD'?
What is new in this release?
How to download, install, patch and quick test 'StCAD'?
Are there documentation, tutorials or examples?
What are the known problems?
Where can I get help with 'StCAD'?
How can I help?
Disclaimer

What is 'StCAD'?

'StCAD' is a basic 3D CAD framework in Smalltalk (VisualWorks 8.x). It extends the GF/ST 2D drawing framework into 3D. It also include 'StCAD-Geo' which is the 3D geometric domain, 'StCAD-Math' which provides the mathematical support for 3D CAD and motion simulation computations, and 'StCAD-Doc' which is a simple word processor. 'StCAD-Math' is also suitable for engineering, scientific and business computing. The parcels are open source using MIT License. Users can use these parcels with other private software to create 3D applications like motion simulation, finite element analysis, CAD, scientific visualization, etc.

'StCAD' allows users to create and manipulate assemblies, which are collections of 3D parts. The parts are 3D solids, which can be connected by joints, constraints, contacts, actuators, springs, dampers or forces. The parts and connections define the structure or mechanism that the assembly is meant to represent. Animation is possible, if the user can provide time series of position and orientation data for the parts.

Users can also obtain output data in the form of plots and tables. XY plots can be zoomed and set to equal scales. Data series available include linear and angular displacements, velocities, accelerations and other user generated data.

'StCAD' has been used to create a freeware called 'freeCAD' which is a 3D CAD with Motion Simulation. For more information visit:
http://www.askoh.com
 

What are the features of 'StCAD'?

'StCAD' is capable of full 3D pan, zoom, tilt and rotate. Available solids are extrusions of rectangles, circles, ellipses and polygons. The solids can be positioned and oriented exactly in space, as are markers on the solids. Exact specification of linear and angular velocities of solids in space are also possible. Mass and inertia properties can be user specified or automatically computed based on uniform density. Available joints are spherical (ball), revolute (pin), translational (slider), cylindrical, planar, fixed, universal, point in line, point in plane, parallel, perpendicular, no rotation, constant velocity, rack pinion, screw. The curve-curve contact allows liftoffs and collisions based on coefficient of restitution. Available actuators are rotary and translational. Their motions are user prescribed functions of time. Forces and torques are user prescribed functions of time, displacements and velocities in all three components or along connecting markers. Example formulas for spring, damper, bushing, beam, aerodynamic, inverse square law and other forces and torques are given. Available functions are sqrt, exp, ln, lg, sin, cos, tan, arctan, arctan2, spline, spectral density. Users can specify constant gravity of arbitrary magnitude and direction. Spline function of user data. Random vibration function of given spectral densities. Fast Fourier Transform of any times series.

Users need to provide the domain to simulate the behavior of the system. Simulation progress can be animated and stopped any time. After simulation, the computed solution can be used for animation or frame by frame analysis. Full 3D pan, zoom, tilt and rotate is available during simulation and animation. Users can also obtain output data in the form of plots and tables. XY plots can be zoomed and set to equal scales. Individual parts can be saved into files and reinserted into any assembly repeatedly. Assemblies can be saved in binary or tab delimited text format with textual notes and simulation data for later reload. The text format allows pre and post processing of assemblies by other programs, especially spreadsheet programs. 'StCAD' runs on Windows, Macintosh, Linux PC. Assembly data are unchanged across platforms.
 

What is new in this release?

Multibody dynamics code are open sourced.
 

How to download, install, patch and quick test 'StCAD'?

For Windows
Download Personal User License Version from
    http://www.cincomsmalltalk.com/main/
    You should have version vwX.Y.Z or vwX.Y.Zpul.
        Example: vw8.3.1.
    Install in folder like c:\askoh\visualworks\vwX.Y.Z
Download StCAD open source from
    http://askoh.com/stcad/StCADforVW8.3.zip
    http://askoh.com/stcad/StCADforVW8.3.1.zip
Unzip StCADforVWX.Y.Z.zip into a folder like c:\askoh\StCAD\vwX.Y.Z\current.
In Windows Explorer, double click on
    c:\askoh\visualworks\vwX.Y.Z\image\visual64.im
When prompted, associate *.im with
    c:\askoh\visualworks\vwX.Y.Z\bin\win64\VisualWorks.exe
    If VisualWorks does not start, edit c:\askoh\visualworks\vwX.Y.Z\bin\win64\VisualWorks.ini
        Make sure the first few lines have the correct paths to the executables. Like
            83 01 c:\askoh\visualworks\vw8.3.1\bin\win\vwnt.exe
            83 129 c:\askoh\visualworks\vw8.3.1\bin\win64\vwnt.exe
            83 00 c:\askoh\visualworks\vw8.3\bin\win\vwnt.exe
            83 128 c:\askoh\visualworks\vw8.3\bin\win64\vwnt.exe
In VisualWorks Launcher,
    Click/File/Set VisualWorks Home/
    Enter     c:\askoh\visualworks\vwX.Y.Z
    Click/OK
    This needs to be done only once for each new version of VisualWorks.
Click/File/Save as/
    StCAD.im inside the folder c:\askoh\StCAD\vwX.Y.Z
Click/File/Exit VisualWorks/
    Click/Exit without saving/
DoubleClick/c:\askoh\StCAD\vwX.Y.Z\StCAD.im.
    VisualWorks should launch automatically.
Click/Tools/Parcel Manager
In Parcel Manager
    Click/Directories tab/
    Select/.
    RightClick over Jun[X.Y.Z] in right pane/Load
        Jun parcel should be loaded.
    RightClick over StCAD[X.Y.Z] in right pane/Load
        StCAD parcel should be loaded.
        StCAD.UI.CADSMEditor should be open.

In VisualWorks Launcher,
    Click/File/Open File/
        Select StCAD.ws
    Click/File/Save/
   
To learn more, Click/Explain and submenus.
You must do the exercises described in Click/Explain etc.

To learn VisualWorks Smalltalk, study
    C:\askoh\visualworks\vwX.Y.Z\doc\AppDevGuide.pdf
    http://www.cincomsmalltalk.com/main/community/resources/tutorials/

Quick test 'freeCAD':
Make sure that the example assemblies (*.asm) are in the directory of the image.
Click File/Open/Assembly/ to get list of example assemblies.
Choose one, say, fourbar.asm
Click View/Tilt Rotate/ to center the model.  Drag the handles to tilt and rotate the 3D assembly.
Click Simulation/Animation/ to get the animation dialog. Click Play to start animation.
You can click any View menu item and drag handles, even during animation.
Please report any problems to
A-S Koh
askoh@askoh.com

Quick start:
Click Explain/Quick Start/ to learn how to build a model from scratch. Together, the tutorials demonstrate the available features in 'freeCAD'.
 

Are there documentation, tutorials or examples?

'StCAD' is an extension of GF/ST, so its documentation ("C:\askoh\visualworks\vw8.3.1\contributed\GFST\gfstvw.hlp") is relevant. Class StCAD.UI.CADApp has some documentation in class methods. Class StCAD.Math.Help has examples of use for StCAD.Math.

Inside 'freeCAD', documentation are collected in a series of menu items labeled 'Explain'. Click on them anytime. But you MUST run the tutorials to learn 'freeCAD'. Click Explain/Quick Start/ for a list of examples on projectiles, circular motion, relative motion, pendulums, spring-masses, four bar linkages, piston crank, gyro, cam follower.

Quick Start Tutorial video with sound.

The following videos with sound record the creation of a robot.
peg3a.html
peg3b.html
peg3c.html
peg3d.html
peg3e.html
peg3f.html
peg3g.html
peg3h.html
peg3i.html
peg3j.html
peg3k.html
peg3l.html

The following videos with sound record the simulation of shimmy and Ordinary Differential Equations.
shimmy1b.html
nosegear.html

The motion simulation theory is in the journal paper:
Koh, A-S., and Park, J-P. "Object Oriented Dynamics Simulator," Computational Mechanics, Jun 1994, 14(3) 277287.

Raw implementation notes are in StCAD_MbD_Theory.zip

Example Assemblies
 

What are the known problems?

Please report problems to
A-S Koh
askoh@askoh.com
 

Where can I get help with 'StCAD'?

For the latest information, free downloads, patches and examples for 'StCAD', visit:
http://www.askoh.com

To pose a question, submit it to the mailling list vwnc AT lists.cs.illinois.edu . Prefix the question with [StCAD] to distinguish it from other questions in the newsgroup.

Finally, you can email:
A-S Koh
askoh@askoh.com 

How can I help?

Your bug reports and suggestions are most valuable for improvements in 'StCAD'. If you have code to share so that others can benefit from your work, please let me and others know about them. I can include them on this site if you want. Finally, but not least, please tell your friends and colleagues about 'StCAD'. Thank you very much for your contributions.
 

Disclaimer

Copyright 2018 Aik-Siong Koh

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.

Copyright (C) 2000-2018, A-S Koh, All Rights Reserved.