Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:sdksamples:blockinsertionpoint [2015/09/14] (current)
Line 1: Line 1:
 +====== Obtaining the Insertion Point of a Block ======
 +> **Developer:​** //​[[developer:​cplusplusplugins|C++]]//​
 +> **Summary:​** //​Demonstrates how to find the basepoint coordinates of a block instance.//
 +
 +
 +=====Question=====
 +How to get the basepoint coordinates (x,y,z) of a block instance?
 +
 +=====Answer=====
 +See the following sample code:
 +
 +===== C++ =====
 +<code c++>
 +ON_3dPoint BlockInstanceInsertionPoint(const CRhinoInstanceObject* instance_obj)
 +{
 +  ON_3dPoint pt = ON_UNSET_POINT;​
 +  if (instance_obj != 0)
 +  {
 +    pt = ON_origin;
 +    pt.Transform(instance_obj->​InstanceXform());​
 +  }
 +  return pt;
 +}
 +</​code>​
 +
 +{{tag>​Developer cplusplus}}
  
developer/sdksamples/blockinsertionpoint.txt ยท Last modified: 2015/09/14 (external edit)