Commit f2b0d261 authored by Teodor Gelu Chiciudean's avatar Teodor Gelu Chiciudean
Browse files

in work

parent d4e64495
This diff is collapsed.
@subsubsection Angular-dimension
@b{Description}
This dimensional object produces a clear and concise arc dimensional annotation.
@noindent @b{Required-input-slots}
@b{:arc-object}
@itemize {}
@item GDL object. The arc being measured.
@end itemize
@noindent @b{Optional-input-slots}
@b{:center-point}
@itemize {}
@item 3D Point. The center of the arc being measured.
@end itemize
@b{:dim-text-start}
@itemize {}
@item 3D Point. Determines where the text will start. Defaults to halfway along the arc, just beyond the radius.
@end itemize
@b{:end-point}
@itemize {}
@item 3D Point. The end point of the arc being measured.
@end itemize
@b{:leader-radius}
@itemize {}
@item Number. The radius for the leader-arc.
@end itemize
@b{:start-point}
@itemize {}
@item 3D Point. The start point of the arc being measured.
@end itemize
@b{:text-along-leader-padding-factor}
@itemize {}
@item Number. Amount of padding above leader for text-along-leader? t. This is multiplied by the
character-size to get the actual padding amount. Defaults to 1/3.
@end itemize
@b{:witness-1-to-center?}
@itemize {}
@item Boolean. Determines whether a witness line extends all the way from the start-point to the center.
Defaults to nil.
@end itemize
@b{:witness-2-to-center?}
@itemize {}
@item Boolean. Determines whether a witness line extends all the way from the end-point to the center.
Defaults to nil.
@end itemize
@noindent @b{Computed-slots}
@b{:dim-value}
@itemize {}
@item Number. 2D distance relative to the base-plane-normal. Can be over-ridden in the subclass
@end itemize
@noindent @b{Examples}
@smallexample
@cartouche
(in-package :gdl-user)
(define-object angular-dimension-test (base-object)
:objects
((arc :type 'arc
:display-controls (list :color :green )
:radius 30
:end-angle (degrees-to-radians 90))
(dimension :type 'angular-dimension
:display-controls (list :color :blue )
:leader-radius (+ (* 0.1 (the arc radius))(the arc radius))
:arc-object (the arc))
(explicit-dimension :type 'angular-dimension
:center-point (the arc center)
:start-point (the arc (point-on-arc (degrees-to-radians 10)))
:end-point (the arc (point-on-arc (degrees-to-radians 60))))))
(generate-sample-drawing
:objects (list
(the-object (make-object 'angular-dimension-test) arc)
(the-object (make-object 'angular-dimension-test) dimension)
(the-object (make-object 'angular-dimension-test) explicit-dimension))
:projection-direction (getf *standard-views* :top))
@end cartouche
@end smallexample
@center @image{/media/sf_C_DRIVE/Users/teodor/Dropbox/teodor-gelu/gdl-build/teodor-gelu/genworks-gdl/documentation/unified-doc/yadd/geom-base/image/angular-dimension,,4.2in}
@subsubsection Arc
@b{Description}
A segment of a circle.
The start point is at the 3 o'clock position, and positive
angles are measured anti-clockwise.
@noindent @b{Required-input-slots}
@b{:radius}
@itemize {}
@item Number. Distance from center to any point on the arc.
@end itemize
@noindent @b{Optional-input-slots}
@b{:center}
@itemize {}
@item 3D Point. Indicates in global coordinates where the center of the arc should be located.
Defaults to #(0.0 0.0 0.0).
@end itemize
@b{:end-angle}
@itemize {}
@item Angle in radians. End angle of the arc. Defaults to twice pi.
@end itemize
@b{:start-angle}
@itemize {}
@item Angle in radians. Start angle of the arc. Defaults to zero.
@end itemize
@noindent @b{Computed-slots}
@b{:end}
@itemize {}
@item 3D Point. The end point of the arc.
@end itemize
@b{:height}
@itemize {}
@item Number. Z-axis dimension of the reference box. Defaults to zero.
@end itemize
@b{:length}
@itemize {}
@item Number. Y-axis dimension of the reference box. Defaults to zero.
@end itemize
@b{:start}
@itemize {}
@item 3D Point. The start point of the arc.
@end itemize
@b{:width}
@itemize {}
@item Number. X-axis dimension of the reference box. Defaults to zero.
@end itemize
@noindent @b{Functions}
@b{:equi-spaced-points}
@itemize {}
@item List of points. Returns a list of points equally spaced around the arc, including
the start and end point of the arc.
:&optional ((number-of-points 4) "Number. How many points to return.")
@end itemize
@b{:point-on-arc}
@itemize {}
@item 3D Point. The point on the arc at a certain angle from the start.
:arguments (angle "Number in Radians")
@end itemize
@noindent @b{Examples}
@smallexample
@cartouche
(in-package :gdl-user)
(define-object arc-sample (arc)
:computed-slots ((radius 30) (end-angle (half pi/2))))
(generate-sample-drawing :objects (make-object 'arc-sample))
@end cartouche
@end smallexample
@center @image{/media/sf_C_DRIVE/Users/teodor/Dropbox/teodor-gelu/gdl-build/teodor-gelu/genworks-gdl/documentation/unified-doc/yadd/geom-base/image/arc,,4.2in}
@subsubsection Base-drawing
@b{Description}
Generic container object for displaying one or more scaled
transformed views of geometric or text-based entities. The contained views are generally
of type @i{base-view}. In a GWL application-mixin, you can include one
object of this type in the ui-display-list-leaves.
For the PDF output-format, you can also use the cad-output output-function to write the
drawing as a PDF document.
Since base-drawing is inherently a 2D object, only the top view (getf *standard-views* :top)
makes sense for viewing it.
@noindent @b{Optional-input-slots}
@b{:height}
@itemize {}
@item Number. Z-axis dimension of the reference box. Defaults to zero.
@end itemize
@b{:length}
@itemize {}
@item Number. Y-axis dimension of the reference box. Defaults to zero.
@end itemize
@b{:page-length}
@itemize {}
@item Number in PDF Points. Front-to-back (or top-to-bottom) length of the paper being represented
by this drawing. The default is (* 11 72) points, or 11 inches, corresponding to US standard
letter-size paper.
@end itemize
@b{:page-width}
@itemize {}
@item Number in PDF Points. Left-to-right width of the paper being represented by this drawing.
The default is (* 8.5 72) points, or 8.5 inches, corresponding to US standard letter-size paper.
@end itemize
@b{:width}
@itemize {}
@item Number. X-axis dimension of the reference box. Defaults to zero.
@end itemize
@noindent @b{Examples}
@smallexample
@cartouche
(in-package :gdl-user)
(define-object base-drawing-sample (base-drawing)
:objects
((main-view :type 'base-view
:projection-vector (getf *standard-views* :trimetric)
:object-roots (list (the surf)))
(surf :type 'surf::test-b-spline-surface
:hidden? t)))
(generate-sample-drawing :objects (make-object 'base-drawing-sample))
@end cartouche
@end smallexample
@center @image{/media/sf_C_DRIVE/Users/teodor/Dropbox/teodor-gelu/gdl-build/teodor-gelu/genworks-gdl/documentation/unified-doc/yadd/geom-base/image/base-drawing,,4.2in}
@subsubsection Base-object
@b{Description}
Base-Object is a superclass of most of GDL's geometric primitives. It
provides an imaginary geometric reference box with a length, width, height, center,
and orientation.
@noindent @b{Optional-input-slots}
@b{:bounding-box}
@itemize {}
@item List of two 3D points. The left front bottom and right rear top corners, in global coordinates,
of the rectangular volume bounding the tree of geometric objects rooted at this object.
@end itemize
@b{:image-file}
@itemize {}
@item Pathname or string. Points to a pre-existing image file to be displayed instead of actual geometry for this object. Defaults to nil
@end itemize
@b{:local-box}
@itemize {}
@item List of two 3D points. The left front bottom and right rear top corners, in global coordinates,
of the rectangular volume bounding this geometric object.
@end itemize
@b{:obliqueness}
@itemize {}
@item 3x3 Orthonormal Matrix of Double-Float Numbers. This is synonymous with the orientation.
@end itemize
@noindent @b{Defaulted-input-slots}
@b{:center}
@itemize {}
@item 3D Point. Indicates in global coordinates where the center of the reference
box of this object should be located.
@end itemize
@b{:display-controls}
@itemize {}
@item Plist. May contain keywords and values indicating display characteristics for
this object. The following keywords are recognized currently:
@itemize {}
@item :color
@itemize @minus color keyword from the *color-table* parameter, or an HTML-style hexidecimal
RGB string value, e.g. "#FFFFFF" for pure white. Defaults to :black.
@end itemize
@item :line-thickness
@itemize @minus an integer, defaulting to 1, indicating relative line thickness for wireframe
representations of this object.
@end itemize
@item :dash-pattern
@itemize @minus (currently PDF/PNG/JPEG only). This is a list of two or three numbers which indicate the length,
in pixels, of the dashes and blank spaces in a dashed line. The optional third number
indicates how far into the line or curve to start the dash pattern.
@end itemize
@end itemize
@end itemize
@b{:height}
@itemize {}
@item Number. Z-axis dimension of the reference box. Defaults to zero.
@end itemize
@b{:length}
@itemize {}
@item Number. Y-axis dimension of the reference box. Defaults to zero.
@end itemize
@b{:orientation}
@itemize {}
@item 3x3 Matrix of Double-Float Numbers. Indicates the absolute Rotation Matrix used to create
the coordinate system of this object. This matrix is given in absolute terms (i.e. with
respect to the root's orientation), and is generally created with the alignment function.
It should be an @i{orthonormal} matrix, meaning each row is a vector with a magnitude
of one (1.0).
@end itemize
@b{:width}
@itemize {}
@item Number. X-axis dimension of the reference box. Defaults to zero.
@end itemize
@noindent @b{Computed-slots}
@b{:color-decimal}
@itemize {}
@item Vector of three real numbers. The RBG color of this object specified in :display-controls.
Defaults to the foreground color specified in *colors-default*. This message should not normally be overridden in user application code.
@end itemize
@b{:local-center}
@itemize {}
@item 3D Point. The center of this object, from the perspective of the parent. Starting
from the parent's center and using the parent's orientation, this is the relative center
of this object.
@end itemize
@b{:local-orientation}
@itemize {}
@item 3x3 Matrix of Double-Float Numbers. Indicates the local Rotation Matrix used
to create the coordinate system of this object. This is the ``local''
orientation with respect to the parent. Multiplying the parent's orientation
with this matrix will always result in the absolute orientation for this part.
:note An orientation of NIL indicates the 3x3 identity matrix.
@end itemize
@noindent @b{Hidden-objects}
@b{:bounding-bbox}
@itemize {}
@item GDL object of type Box. A box representing the bounding-box.
@end itemize
@b{:local-bbox}
@itemize {}
@item GDL object of type Box. A box representing the local-box.
@end itemize
@noindent @b{Functions}
@b{:axis-vector}
@itemize {}
@item 3D Vector. Returns the vector pointing in the positive direction of the specified axis of this object's reference box.
:arguments (axis "Keyword. One of the standard axis keywords: :lateral, :longitudinal, :vertical.")
@end itemize
@b{:edge-center}
@itemize {}
@item 3D Point. Returns the center of the requested edge of this object's reference box.
:arguments (direction-1 "Keyword. One of the standard direction keywords: :right, :left, :rear, :front, :top, :bottom."
direction-2 "Keyword. A standard direction keyword orthogonal to direction-1.")
@end itemize
@b{:face-center}
@itemize {}
@item 3D Point. Returns the center of the requested face of this object's reference box.
:arguments (direction "Keyword. One of the standard direction keywords: :right, :left, :rear, :front, :top, :bottom.")
@end itemize
@b{:face-normal-vector}
@itemize {}
@item 3D Vector. Returns the vector pointing from this object's reference box center to its requested face-center.
:arguments (axis "Keyword. One of the standard direction keywords: :right, :left, :rear, :front, :top, :bottom.")
@end itemize
@b{:face-vertices}
@itemize {}
@item List of four 3D points. Returns the vertices of the indicated face.
:arguments (direction "Direction keyword, e.g. :top, :bottom etc. Indicates for which face to return the vertices.")
@end itemize
@b{:global-to-local}
@itemize {}
@item
3D-point. This function returns the point given in global coordinates, into relative local coordinates,
based on the orientation and center of the object to which the global-to-local message is sent.
:arguments (point "3D-point. The point to be converted to local coordinates")
:examples Please see the examples area.
@end itemize
@b{:in-face?}
@itemize {}
@item Boolean. Returns non-nil if the given point is in halfspace defined by the plane given a point and direction.
:arguments (point "3D point. a point in the plane"
direction "3D vector. The normal of the plane")
@end itemize
@b{:line-intersection-points}
@itemize {}
@item List of 3D points. Returns the points of intersection between given line and the reference box of this object.
:arguments (p-line "3D point. A point in the line"
u-line "3D vector. The direction vector of the line")
@end itemize
@b{:local-to-global}
@itemize {}
@item 3D-point. This function returns the point given in relative local coordinates, converted into global coordinates,
based on the orientation and center of the object to which the local-to-global message is sent.
:arguments (point "3D-point. The local point to be converted to global coordinates")