Attachment Synopsis 3

This commit is contained in:
Richard Milewski 2023-03-25 11:00:17 -07:00
parent 1c85cced68
commit c92d18bbda

View file

@ -429,7 +429,7 @@ module position(from)
// Module: orient() // Module: orient()
// Synopsis: Orients children's tops in the directon of the speccified anchor. // Synopsis: Orients children's tops in the directon of the specified anchor.
// Topics: Attachments // Topics: Attachments
// See Also: attachable(), attach(), orient() // See Also: attachable(), attach(), orient()
@ -1660,6 +1660,9 @@ module corner_profile(corners=CORNERS_ALL, except=[], r, d, convexity=10) {
// Module: attachable() // Module: attachable()
// Synopsis: Manages the anchoring, spin, orientation, and attachments for an object.
// Topics: Attachments
// See Also: reorient()
// //
// Usage: Square/Trapezoid Geometry // Usage: Square/Trapezoid Geometry
// attachable(anchor, spin, two_d=true, size=, [size2=], [shift=], [override=], ...) {OBJECT; children();} // attachable(anchor, spin, two_d=true, size=, [size2=], [shift=], [override=], ...) {OBJECT; children();}
@ -1686,9 +1689,6 @@ module corner_profile(corners=CORNERS_ALL, except=[], r, d, convexity=10) {
// Usage: Pre-Specified Geometry // Usage: Pre-Specified Geometry
// attachable(anchor, spin, [orient], geom=) {OBJECT; children();} // attachable(anchor, spin, [orient], geom=) {OBJECT; children();}
// //
// Topics: Attachments
// See Also: reorient()
//
// Description: // Description:
// Manages the anchoring, spin, orientation, and attachments for OBJECT, located in a 3D volume or 2D area. // Manages the anchoring, spin, orientation, and attachments for OBJECT, located in a 3D volume or 2D area.
// A managed 3D volume is assumed to be vertically (Z-axis) oriented, and centered. // A managed 3D volume is assumed to be vertically (Z-axis) oriented, and centered.
@ -1970,6 +1970,9 @@ module attachable(
} }
// Function: reorient() // Function: reorient()
// Synopsis: Calculates the transformation matrix needed to reorient an object.
// Topics: Attachments
// See Also: reorient(), attachable()
// //
// Usage: Square/Trapezoid Geometry // Usage: Square/Trapezoid Geometry
// mat = reorient(anchor, spin, [orient], two_d=true, size=, [size2=], [shift=], ...); // mat = reorient(anchor, spin, [orient], two_d=true, size=, [size2=], [shift=], ...);
@ -2005,9 +2008,6 @@ module attachable(
// mat = reorient(anchor, spin, [orient], vnf, [extent], ...); // mat = reorient(anchor, spin, [orient], vnf, [extent], ...);
// pts = reorient(anchor, spin, [orient], vnf, [extent], p=, ...); // pts = reorient(anchor, spin, [orient], vnf, [extent], p=, ...);
// //
// Topics: Attachments
// See Also: reorient(), attachable()
//
// Description: // Description:
// Given anchor, spin, orient, and general geometry info for a managed volume, this calculates // Given anchor, spin, orient, and general geometry info for a managed volume, this calculates
// the transformation matrix needed to be applied to the contents of that volume. A managed 3D // the transformation matrix needed to be applied to the contents of that volume. A managed 3D
@ -2098,10 +2098,12 @@ function reorient(
// Function: named_anchor() // Function: named_anchor()
// Usage: // Synopsis: Creates an anchro data structure.
// a = named_anchor(name, pos, [orient], [spin]);
// Topics: Attachments // Topics: Attachments
// See Also: reorient(), attachable() // See Also: reorient(), attachable()
//
// Usage:
// a = named_anchor(name, pos, [orient], [spin]);
// Description: // Description:
// Creates an anchor data structure. For a step-by-step explanation of attachments, // Creates an anchor data structure. For a step-by-step explanation of attachments,
// see the [[Attachments Tutorial|Tutorial-Attachments]]. // see the [[Attachments Tutorial|Tutorial-Attachments]].
@ -2114,6 +2116,9 @@ function named_anchor(name, pos, orient=UP, spin=0) = [name, pos, orient, spin];
// Function: attach_geom() // Function: attach_geom()
// Synopsis: Returns the internal geometry description of an attachable object.
// Topics: Attachments
// See Also: reorient(), attachable()
// //
// Usage: Null/Point Geometry // Usage: Null/Point Geometry
// geom = attach_geom(...); // geom = attach_geom(...);
@ -2136,9 +2141,6 @@ function named_anchor(name, pos, orient=UP, spin=0) = [name, pos, orient, spin];
// Usage: VNF Geometry // Usage: VNF Geometry
// geom = attach_geom(vnf=, [extent=], ...); // geom = attach_geom(vnf=, [extent=], ...);
// //
// Topics: Attachments
// See Also: reorient(), attachable()
//
// Description: // Description:
// Given arguments that describe the geometry of an attachable object, returns the internal geometry description. // Given arguments that describe the geometry of an attachable object, returns the internal geometry description.
// This will probably not not ever need to be called by the end user. // This will probably not not ever need to be called by the end user.
@ -2345,10 +2347,11 @@ function attach_geom(
/// Internal Function: _attach_geom_2d() /// Internal Function: _attach_geom_2d()
// Usage:
// bool = _attach_geom_2d(geom);
/// Topics: Attachments /// Topics: Attachments
/// See Also: reorient(), attachable() /// See Also: reorient(), attachable()
//
f// Usage:
// bool = _attach_geom_2d(geom);
// Description: // Description:
// Returns true if the given attachment geometry description is for a 2D shape. // Returns true if the given attachment geometry description is for a 2D shape.
function _attach_geom_2d(geom) = function _attach_geom_2d(geom) =
@ -2844,6 +2847,10 @@ function _standard_anchors(two_d=false) = [
// Module: show_anchors() // Module: show_anchors()
// Synopsis: Shows anchors for the parent object.
// Topics: Attachments
// See Also: expose_anchors(), anchor_arrow(), anchor_arrow2d(), frame_ref()
//
// Usage: // Usage:
// PARENT() show_anchors([s], [std=], [custom=]); // PARENT() show_anchors([s], [std=], [custom=]);
// Description: // Description:
@ -2904,6 +2911,10 @@ module show_anchors(s=10, std=true, custom=true) {
// Module: anchor_arrow() // Module: anchor_arrow()
// Synopsis: Shows a 3d anchor orientation arrow.
// Topics: Attachments
// See Also: anchor_arrow2d(), show_anchors(), expose_anchors(), frame_ref()
//
// Usage: // Usage:
// anchor_arrow([s], [color], [flag], [anchor=], [orient=], [spin=]) [ATTACHMENTS]; // anchor_arrow([s], [color], [flag], [anchor=], [orient=], [spin=]) [ATTACHMENTS];
// Description: // Description:
@ -2939,6 +2950,10 @@ module anchor_arrow(s=10, color=[0.333,0.333,1], flag=true, $tag="anchor-arrow",
// Module: anchor_arrow2d() // Module: anchor_arrow2d()
// Synopsis: Shows a 2d anchor orientation arrow.
// Topics: Attachments
// See Also: anchor_arrow3d(), show_anchors(), expose_anchors(), frame_ref()
//
// Usage: // Usage:
// anchor_arrow2d([s], [color], [flag]); // anchor_arrow2d([s], [color], [flag]);
// Description: // Description:
@ -2955,6 +2970,9 @@ module anchor_arrow2d(s=15, color=[0.333,0.333,1], $tag="anchor-arrow") {
// Module: expose_anchors() // Module: expose_anchors()
// Synopsis: Used to show a transparent object with solid color anchor arrows.
// Topics: Attachments
// See Also: anchor_arrow2d(), show_anchors(), show_anchors(), frame_ref()
// Usage: // Usage:
// expose_anchors(opacity) {child1() show_anchors(); child2() show_anchors(); ...} // expose_anchors(opacity) {child1() show_anchors(); child2() show_anchors(); ...}
// Description: // Description:
@ -2978,6 +2996,9 @@ module expose_anchors(opacity=0.2) {
// Module: frame_ref() // Module: frame_ref()
// Synopsis: Shows axis orientation arrows.
// Topics: Attachments
// See Also: anchor_arrow(), anchor_arrow2d(), show_anchors(), expose_anchors()
// Usage: // Usage:
// frame_ref(s, opacity); // frame_ref(s, opacity);
// Description: // Description: