Workspace Dimensions

Post Reply
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Workspace Dimensions

Post by clintonman »

DimensionCaptured.jpg
I've been doing some experiments to try to get dimensions into workspace. First success shown above.
The white dimension in the picture is really a capture of the marker mesh that is used to create the distance feedback. It shows 17.3855. The log view shows the length of one side of the first triangle in the captured mesh 17.38548 etc.

Each of the lines in the dimension is really a 2 point polygon or a triangle with one edge of zero length so it looks like a line. The zero length edge uses the same point twice. I didn't even know that was possible in trueSpace. Each part of the numbers also use the same 2 point polygon structure.

So far the way to get the measurement is while creating a plane or using edge draw in point edit mode with distance feedback and point edit snapping. While running either tool I have a script setup through a button shortcut to capture the marker mesh that contains the dimension mesh. Then just read the points on the first triangle of the mesh to calculate the distance value.
DimensionCaptured2.jpg
During plane creation and after capture script is run.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Workspace Dimensions

Post by clintonman »

WorkspaceDimensions.jpg
A new approach.

There were problems capturing the markers. It works, just not very well. The new way is to use the point selection widgets to define the end points and then move a plane mesh that looks like arrows into place. The text is a tS text object. Both the arrows and the number text are invisible parented to the object, so they move and scale with the object.

The things I want to add are:

different units - inches, mm, ft...
button to update dimension value when scaling the object or maybe some automatic adjustment
scale object based on change dimension value
dimension between 2 objects - scene dimensions
button to delete a dimension
maybe some color controls
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Workspace Dimensions

Post by clintonman »

Added units control "m, cm, mm, in, ft and ft in", might add ' and " for ft and in
Added delete button to remove the selected dimension

Might skip all the scaling dimensions stuff until I can use the tool and see if it's worth the trouble.

Next up is dimensions between objects and making it more user friendly.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Workspace Dimensions

Post by clintonman »

WorkspaceDimensions2.jpg
Did the scaling stuff after all. Choose the dimension and change it's value to uniformly scale the object or only in the direction of the dimension if it points in an axis direction.

3 things on the TODO list
  • rounding/precision values like 600.003 should be something like 600
  • scene dimensions between objects
  • make it not awkward to use
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Workspace Dimensions

Post by clintonman »

WorkspaceDimensions3.jpg
Added dimensions between objects
Added a control for precision - the number of decimal places in the number
Added Color control for the arrow and the text

Started making it less awkward to use.

The dimensions are anchored to the object vertices, so if any geometry is added or removed the dimensions may need to be recreated.

Next is continue making it less awkward, add a select previous button to match the select next button and organize the controls and settings into separate panels.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Workspace Dimensions

Post by trueBlue »

Looking good!
Are these dimensions, widgets?
How do you add a Start & End dimension?
PE mode?
Does it support Snapping?
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Workspace Dimensions

Post by clintonman »

trueBlue wrote: 04 Oct 2022, 06:21 Looking good!
Are these dimensions, widgets?
How do you add a Start & End dimension?
PE mode?
Does it support Snapping?
The dimensions are text and mesh objects in the scene. The start and end points are defined by using the GetPointsWidget so it's from one point or collection of points to another. No snapping support.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Workspace Dimensions

Post by clintonman »

WorkspaceDimensions4.jpg
I was reviewing my notes and remembered that I had angle dimension planned. This is the start. As of now it only works for angles that face in the Z direction. I have an idea on how to fix it (fingers crossed).
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Workspace Dimensions

Post by clintonman »

AngledAngleDimension.jpg
Cylinder was rotated in x, y and z axes.

It worked! Angle dimensions can be applied at any orientation. That's the last mathematical piece of the puzzle to finish this thing up.
Clinton Reese

http://clintons3d.com
User avatar
the_ant
Chief Petty Officer
Posts: 149
Joined: 02 Jun 2009, 09:26
Type the number ten into the box: 0
Location: Perugia - Italy

Re: Workspace Dimensions

Post by the_ant »

:o :o :bananacheers: :worship: :worship:
Post Reply