<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: why two CAD blockreference's shape is different in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11978347#M8746</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;The block on the left does not lies on the XY plane, its normal is: 0.0168726, 0.0, 0.999858 (slightly rotated on Y axis).&lt;/P&gt;
&lt;P&gt;The Rotation property of a block reference is measuered about the X axis of the &lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-D99F1509-E4E4-47A3-8691-92EA07DC88F5" target="_blank" rel="noopener"&gt;Object Corrdinate System&lt;/A&gt; (OCS).&lt;/P&gt;</description>
    <pubDate>Sun, 21 May 2023 15:09:44 GMT</pubDate>
    <dc:creator>_gile</dc:creator>
    <dc:date>2023-05-21T15:09:44Z</dc:date>
    <item>
      <title>why two CAD blockreference's shape is different</title>
      <link>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11978332#M8745</link>
      <description>&lt;P&gt;in the dwg,two blockreference&amp;nbsp; has same name ,same rotation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but why do they have different shape, different basepoint ?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blockreference.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1217216iFE445AC1DA23813A/image-size/large?v=v2&amp;amp;px=999" role="button" title="blockreference.png" alt="blockreference.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 21 May 2023 14:47:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11978332#M8745</guid>
      <dc:creator>wokeyiyognshenme</dc:creator>
      <dc:date>2023-05-21T14:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: why two CAD blockreference's shape is different</title>
      <link>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11978347#M8746</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;The block on the left does not lies on the XY plane, its normal is: 0.0168726, 0.0, 0.999858 (slightly rotated on Y axis).&lt;/P&gt;
&lt;P&gt;The Rotation property of a block reference is measuered about the X axis of the &lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-D99F1509-E4E4-47A3-8691-92EA07DC88F5" target="_blank" rel="noopener"&gt;Object Corrdinate System&lt;/A&gt; (OCS).&lt;/P&gt;</description>
      <pubDate>Sun, 21 May 2023 15:09:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11978347#M8746</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2023-05-21T15:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: why two CAD blockreference's shape is different</title>
      <link>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11979083#M8747</link>
      <description>&lt;P&gt;&amp;nbsp;How to reproduce this problem。&lt;/P&gt;&lt;P&gt;do you mean&lt;/P&gt;&lt;P&gt;1。first,&amp;nbsp; set a ocs, forexamble, its Zaxis is (a,b,c).&lt;/P&gt;&lt;P&gt;2。second ,insert a blockreference in the OCS ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I DON'T know how to draw. could you give a&amp;nbsp;Operation video ---&lt;SPAN&gt;Screen recording。&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thank you .&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 05:02:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11979083#M8747</guid>
      <dc:creator>wokeyiyognshenme</dc:creator>
      <dc:date>2023-05-22T05:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: why two CAD blockreference's shape is different</title>
      <link>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11979145#M8748</link>
      <description>&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6327996116112w882h540r634" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6327996116112" data-account="6057940548001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6057940548001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6327996116112w882h540r634');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://forums.autodesk.com/t5/video/gallerypage/video-id/6327996116112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 05:46:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11979145#M8748</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2023-05-22T05:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: why two CAD blockreference's shape is different</title>
      <link>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11983591#M8749</link>
      <description>&lt;P&gt;great!!!&lt;/P&gt;&lt;P&gt;thank your very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;another problem：&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the left blockreference is not drawed in wcs.&lt;/P&gt;&lt;P&gt;how to get the four point(X,Y,z) of the &lt;SPAN&gt;rectangle&amp;nbsp;&lt;/SPAN&gt;in wcs&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 18:32:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11983591#M8749</guid>
      <dc:creator>wokeyiyognshenme</dc:creator>
      <dc:date>2023-05-23T18:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: why two CAD blockreference's shape is different</title>
      <link>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11985635#M8750</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4881699"&gt;@wokeyiyognshenme&lt;/a&gt;&amp;nbsp; a écrit&amp;nbsp;:&lt;BR /&gt;
&lt;P&gt;the left blockreference is not drawed in wcs.&lt;/P&gt;
&lt;P&gt;how to get the four point(X,Y,z) of the &lt;SPAN&gt;rectangle&amp;nbsp;&lt;/SPAN&gt;in wcs&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can either get the coordinates of the polyline by exploding the block reference or from the block definition.&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;        public static Point3dCollection GetPolylineCoordinates(Polyline pline)
        {
            var points = new Point3dCollection();
            for (int i = 0; i &amp;lt; pline.NumberOfVertices; i++)
            {
                points.Add(pline.GetPoint3dAt(i));
            }
            return points;
        }

        private static Point3dCollection GetPolylineCoordinatesByExploding(BlockReference br)
        {
            var entitySet = new DBObjectCollection();
            br.Explode(entitySet);
            var points = new Point3dCollection();
            foreach (Entity entity in entitySet)
            {
                if (entity is Polyline pline)
                {
                    points = GetPolylineCoordinates(pline); 
                }
                entity.Dispose();
            }
            return points;
        }

        private static Point3dCollection GetPolylineCoordinatesFromBlockDefinition(BlockReference br)
        {
            var btr = (BlockTableRecord)br.BlockTableRecord.GetObject(OpenMode.ForRead);
            var points = new Point3dCollection();
            foreach (ObjectId id in btr)
            {
                if (id.ObjectClass.Name == "AcDbPolyline")
                {
                    var pline = (Polyline)id.GetObject(OpenMode.ForRead);
                    foreach (Point3d point in GetPolylineCoordinates(pline))
                    {
                        points.Add(point.TransformBy(br.BlockTransform));
                    }
                }
            }
            return points;
        }&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 May 2023 12:29:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11985635#M8750</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2023-05-24T12:29:51Z</dc:date>
    </item>
    <item>
      <title>回复： why two CAD blockreference's shape is different</title>
      <link>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11996505#M8751</link>
      <description>&lt;P&gt;thankyou very much&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2023 16:42:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/why-two-cad-blockreference-s-shape-is-different/m-p/11996505#M8751</guid>
      <dc:creator>wokeyiyognshenme</dc:creator>
      <dc:date>2023-05-29T16:42:48Z</dc:date>
    </item>
  </channel>
</rss>

