<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Project a point perpendicular from line</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/bdn-vba/93486/project-a-point-perpendicular-from-line</link><description>Dear All, 
 I need to project a point(Blue colored) from a line(Majenta Color) to another line(Yellow Color) and the projected point should be perpendicular from a line(Majenta Color). The required output was represented(in attachment) as green colored</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Project a point perpendicular from line</title><link>https://communities.bentley.com/thread/270681?ContentTypeID=1</link><pubDate>Wed, 01 Jan 2014 01:15:01 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3b1c8052-4fe5-4d4c-b364-ed663a81c5ec</guid><dc:creator>Yongan.Fu</dc:creator><description>&lt;p&gt;[quote user=&amp;quot;Dharmarajan&amp;quot;]&lt;/p&gt;
&lt;p&gt;(2) How to convert a lineElement to valid object which has IntersectRay3d method ?&lt;/p&gt;
&lt;p&gt;[/quote]&lt;/p&gt;
&lt;p&gt;Sorry, my step 4 and 5 should be modified as below:&lt;/p&gt;
&lt;p&gt;4. Construct a line &amp;nbsp;from your blue point and yVec;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;5. Get the yellow line and call yellowLine.&lt;strong&gt;GetIntersectPoints&lt;/strong&gt; method to get the intersect point on yellow line.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Project a point perpendicular from line</title><link>https://communities.bentley.com/thread/270580?ContentTypeID=1</link><pubDate>Mon, 30 Dec 2013 07:39:12 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:18ff40ab-c409-4e35-9ef6-eb5f8563b929</guid><dc:creator>Jon Summers</dc:creator><description>&lt;p&gt;I don&amp;#39;t see a question, but it&amp;#39;s a nice screenshot. By the way, we all use MicroStation, so a DGN model is always a better way of showing us what you are doing or what you want.&lt;/p&gt;
&lt;p&gt;There are some things a screenshot cannot tell us. For example, we still don&amp;#39;t know if you have a 2D or 3D model.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re working in 3D, answers will be more complex because you need to check that your input lines are &lt;a href="http://en.wikipedia.org/wiki/Planar" title="Wikipedia: Planar" target="_blank"&gt;planar&lt;/a&gt; before attempting any calculation.&lt;/p&gt;
&lt;!-- signoff --&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Project a point perpendicular from line</title><link>https://communities.bentley.com/thread/270565?ContentTypeID=1</link><pubDate>Sat, 28 Dec 2013 03:23:11 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5bb6bc6e-5be4-473a-a4b7-48f509820fd8</guid><dc:creator>Dharma Rajan</dc:creator><description>&lt;pre&gt;Hi Jon,&lt;br /&gt;&lt;br /&gt;Majenta(Source line) and Yellow(Destination line) Color are input. Green color line was the output want to achieve.&lt;br /&gt;&lt;br /&gt;The one end of Output lines are snapped with Majenta lines at a regular interval(0.5 m along the element) and are perpendicular to Majenta lines. The other end of output lines are snapped with Yellow line. Input,output are 3D elements &lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><enclosure url="https://communities.bentley.com/cfs-file/__key/telligent-evolution-components-attachments/00-53220-01-00-00-27-05-65/Output2.png" length="33665" type="image/png" /></item><item><title>RE: Project a point perpendicular from line</title><link>https://communities.bentley.com/thread/270557?ContentTypeID=1</link><pubDate>Fri, 27 Dec 2013 16:57:45 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:69aed8fe-602e-4a09-9553-463a0953608a</guid><dc:creator>Jon Summers</dc:creator><description>&lt;p&gt;[quote user=&amp;quot;Dharmarajan&amp;quot;]How to create a &amp;nbsp;vector3D from a LineString?[/quote]&lt;/p&gt;
&lt;p&gt;A line-string has multiple &lt;em&gt;segments&lt;/em&gt;.&amp;nbsp; Since each segment has its own direction and start-point, you can&amp;#39;t convert an entire line-string to a vector.&amp;nbsp; You must focus on each segment of that line-string, and convert each segment to a vector.&lt;/p&gt;
&lt;p&gt;A &lt;span style="font-family:courier new,courier;"&gt;Vector3d&lt;/span&gt; is a vector in the mathematical sense: it has direction but no particular location.&amp;nbsp; Use &lt;span style="font-family:courier new,courier;"&gt;Vector3dSubtractPoint3dPoint3d&lt;/span&gt; to compute a vector from the &lt;em&gt;end&lt;/em&gt; and &lt;em&gt;start&lt;/em&gt; points of a line-string segment.&lt;/p&gt;
&lt;p&gt;[quote user=&amp;quot;Dharmarajan&amp;quot;] How to convert a lineElement to valid object which has IntersectRay3d method? [/quote]&lt;/p&gt;
&lt;p&gt;The &lt;span style="font-family:courier new,courier;"&gt;BSplineSurface.IntersectRay3d&lt;/span&gt; method belongs to the &lt;span style="font-family:courier new,courier;"&gt;BSplineSurface&lt;/span&gt; object.&amp;nbsp; I don&amp;#39;t know how you would consider a &lt;span style="font-family:courier new,courier;"&gt;LineElement&lt;/span&gt; segment to be a &lt;span style="font-family:courier new,courier;"&gt;BSplineSurface&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;It would be better to tell us what you want to achieve.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Project a point perpendicular from line</title><link>https://communities.bentley.com/thread/270538?ContentTypeID=1</link><pubDate>Fri, 27 Dec 2013 09:48:29 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:dfabdb49-0b83-4c9a-aed9-14a0d17742db</guid><dc:creator>Dharma Rajan</dc:creator><description>&lt;p&gt;(1) How to create a &amp;nbsp;vector3D from a LineString? (2) How to convert a lineElement to valid object which has IntersectRay3d method ? can you please send me a sample code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Project a point perpendicular from line</title><link>https://communities.bentley.com/thread/270381?ContentTypeID=1</link><pubDate>Mon, 23 Dec 2013 08:16:43 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:9def10a5-56f2-4e6c-82bb-de069a904128</guid><dc:creator>Yongan.Fu</dc:creator><description>&lt;p&gt;Hi Dharmarajan,&lt;/p&gt;
&lt;p&gt;I assume you are in a 2D model. Then the following steps can help you:&lt;/p&gt;
&lt;p&gt;1. Get a Vector3d xVec from your magenta line as below shown:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file.ashx/__key/communityserver-discussions-components-files/53220/Capture02.JPG"&gt;&lt;img border="0" alt=" " src="/resized-image.ashx/__size/550x0/__key/communityserver-discussions-components-files/53220/Capture02.JPG" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. Create a zVec with (0, 0, 1);&lt;/p&gt;
&lt;p&gt;3. Compute out a yVec by cross producting zVec to xVec using &lt;b&gt;Vector3dCrossProduct &lt;/b&gt;method.&lt;/p&gt;
&lt;p&gt;4. Construct Ray3d from your blue point and yVec;&lt;/p&gt;
&lt;p&gt;5. Get the yellow line and call yellowLine.I&lt;strong&gt;ntersectRay3d&lt;/strong&gt; method to get the intersect point on yellow line.&lt;/p&gt;
&lt;p&gt;HTH, YongAn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>