Friday, May 30, 2008

Editing Sketches

In the past few posts you have been introduced to 2D sketching in Wildcat CAD, and have learned about some of the basic sketch constraints you can apply to 2D features.  In this post I will briefly discuss how to edit various sketch features.

First of all, you can select any sketch feature by clicking on it.  It should turn red.  You can also click-drag a selection box around features.  Using this method you can select multiple features.  Likewise, by holding down the Command key (OS X) or the Ctrl key (Windows) you can click select multiple feature.  You can only edit one feature at a time.


Points are so simple, just grab the point and drag it to where you want it.


Lines can be edited in two ways.  First, you can grab the end of the line and just move that end around, or second, you can grab the line in the middle and it will move the entire line.  If you are moving the entire line then its orientation (slope) and length will not change just its horizontal and vertical position in the sketch.

Axis lines behave just like regular lines.  They can be adjusted from either end or positioned by grabbing the middle.


Similar to lines, there are two ways to edit circles.  The first way is to grab it anywhere on the circle itself.  This will allow you to change the radius of the circle.  If you grab the center point of the circle you can then edit the horizontal and vertical position.


If you are not familiar, a two-point arc is drawn by first clicking the center-point of the arc, then clicking the start of the arc, finally clicking the end of the arc.  In essence, the first two clicks define the radius, hence two-point.  A three-point arc is drawn by clicking one end point, then clicking the second end point, then finally clicking a third point somewhere else on the arc.  It takes all three clicks to define the radius of the arc.

If you grab any part of an arc itself you can adjust its radius.  The orientation and arc-angle will remain the same.  If you grab the center-point of the arc you can reposition it within the sketch.  As of now, there is no way to adjust the arc-angle or the location of the start or end point.  This is something I want to add down the road.


Ellipses have multiple adjustments that can be made.  First is by grabbing the ellipse anywhere on the boundary, except where you see the point on the semi-major and semi-minor axis, or on the center point.  This will allow you to reposition the ellipse.  If you grab the semi-minor axis point you can adjust the radius of the semi-minor axis.  If you grab the semi-major axis point you can adjust that radius and also change the orientation of the ellipse overall.

There is currently a "bug" that needs to be fixed in ellipse editing.  You have to be sufficiently zoomed in on the ellipse to be able to grab either the semi-major or semi-minor points.  Otherwise you will only be able to adjust the position of the ellipse.  If this is happening to you, just zoom in more on the point you are trying to grab.

Conic Sections

As of now you are not able to edit conic sections.  Down the road I plan on adding this capability.  Sorry!

Well, that's all for today.  There are just a couple more posts left on how to use the Sketcher Workbench in Wildcat CAD.  Keep an eye out on the Wiki for some tutorials.  I will also try to update these posts as I make fixes and enhancements.


Thursday, May 29, 2008

Sketch Constraints

In the last post I discussed some of the initial 2D sketching capabilities of Wildcat CAD. In this post I will expand on that a bit and talk about the dimensional and geometric constraints that can be added to 2D sketches. Here is a quick status on all of the planned constraints:

Dimensional Constraints
  • Length
  • Angle
  • Distance (works for some features but not all)
  • Radius
Geometric Constraints
  • Fix
  • Coincidence (line-line only as of now)
  • Horizontal
  • Vertical
To Be Implemented Constraints
  • Semi-major & semi-minor axis
  • Concentric
  • Tangent
  • Parallel
  • Midpoint
  • Perpendicular
  • Symmetric
  • Equidistant point
In the picture below you can see a selection of these constraints:

Where the lines of the rectangle meet (created using the Rectangle profile tool), you can see small points. These are the coincidence constraints.  Next to mostly horizontal or vertical lines you can see the appropriate constraint.  I created an angle constraint between the two lines in the upper left corner.  Both the arc and the circle have radius constraints.

It is important to note that as of right now these constraints are not being using to properly constrain the sketch.  It is our goal to move in that direction in the near future, but for now the constraints are just visual objects.

If you move the lines or edit the arc and circle, you should see the dimensional constraints change value.  If you change a line from vertical to not vertical, the vertical constraint will not go away.  This concept applies to all geometric constraints for now.

As with all other sketch features, constraints created in a sketch are show in the specification tree when in 3D mode.

Tomorrow I will add some more detail about editing sketches.

P.S.  In addition to adding comments to this blog, you can also visit the Wildcat CAD discussion group. 

Tuesday, May 27, 2008

Initial Capabilities - Sketcher Basics

In the first post I provided some of the background on why I have started Wildcat CAD.  In this post I want to outline what capabilities are currently available in Wildcat and what are the highest priority planned improvements.

2D sketching is pretty well supported at this point.  I have implemented the following 2D primitives:
  • Conic Arc (both 2-point and 3-point)
  • Circle (center-radius)
  • Axis of revolution
  • Conic section
  • Ellipse
  • Line
  • Point
  • Rectangle (resolves to 4 lines)
With these primitives I have been able to draft a wi
de variety of 2D sketch profiles.  Once you have drawn a sketch and exit back to 3D design (called Part Design Workbench) the sketch is automatically analyzed and Sketch Profiles are generated.  Below are two quick sample sketches I drew:

A Sketch Profile is an ordered series of 2D primitives that are connected by their end points.  Profiles can also be linear - no more than two primitives ever connect at a single end point.  They can also be open or closed - closed will separate the sketch into two portions, inside and out.  For doing something like a 3D extrude (called a Pad), a profile must be connected, linear, and closed.

Pretty much all of the 2D primitives are editable.  Just grab them and they can be moved around.  They will not stay connected to other primitives though.  That is a function of sketch constraints.  Constraints are not yet working, but a lot of the infrastructure is in place so hopefully they won't take took much longer.

If you want to try out making your own sketch, try following the Sketcher Tutorial.


Welcome to Wildcat CAD


This is the first post as I begin to make Wildcat CAD more public.  Today I am going to give you a bit of background on why I created Wildcat and where I want it to head.  In the future I will try to limit myself to more technical aspects of the app.  All code can be downloaded from here.

From as young as I can remember I have loved to design and build things.  Cars, boats, robots, and especially airplanes have always been active in my imagination.  For various reasons I decided to pursue computer science related fields and wound up in graduate school slows gaining ground on a Ph.D.  This was three years ago.

After I graduated from college (about 9 years ago), I went began to look seriously into buying a CAD package to begin designing all that stuff in my head.  I was shocked to learn that the packages were massively expensive ($6k for a "cheap" one and $20k+ for the top-of-the-line).  Plus they all seemed very difficult to use and placed way too much emphasis on buying education from a reseller and too little on just helping the user.

Over the last nine years I have seem the open source software movement gain traction and always hoped that a good quality CAD package would make its way onto the scene.  Needless to say, after all these years there just were not any good choices.  OpenCascade, BRL, and AvocadoCAD all missed the mark as far as I was concerned.  In future posts I will go into more detail on each of these packages and what they lack in my opinion.

Around a year ago I made the decision to try developing my own CAD framework.  I have spent a great deal of the last year working through the basics and am ready to show the world what I have been working on.  I can not stress enough that Wildcat CAD is just at the beginning of its path.  Over the next few years I hope to bring it to where I need it to be.  And I hope that some of you will join me.

Here are some details about the initial release:
  1. C/C++ based
  2. B-Rep 3D solid modeling kernel
  3. 64-bit precision NURBS-based curves and surfaces
  4. Developed on OS X, ported to Windows (really want to do linux also at some point)
  5. External dependencies: xerces, OpenGL, STL (freetype, libtiff, and pthreads on Windows)
  6. Minimal GUI as of now, mostly mouse and keyboard shortcuts
  7. File-based persistence using XML-based structure
  8. No import/export capabilities yet
This is really just the technical aspects of Wildcat.  In the next post or so I will go into detail about what user capabilities are/are not present.  I will also start to talk about what functionality I am working on and where I could use the most help from anyone willing to lend a hand.

The tag line for the Wildcat CAD website is "Open Source CAD - finally" because I believe the time has come to have a good open source alternative to the closed legacy CAD vendor applications.  I think that many of you agree with this feeling.