Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Navigation
- Solid Edge
- Forums
- Blogs
- Knowledge Bases
- Contests
- Groups

- Siemens PLM Community
- Solid Edge
- Solid Edge Developer Forum
- Scan and draw Algorithm

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-03-2015 09:42 AM

4 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-03-2015 12:17 PM - edited 11-03-2015 12:20 PM

Hi,

one could probably solve this task as follows:

- Search the Relations2d collection of a Sheet or Profile object for perpendicular relations
- We expect to find 4 of them
- For each found perpendicular Relation2d object determine the related objects, which should be of type Line2d with equal lengths
- Each Line2d object found should have its start point common with the start or end point of exactly one of the other 3 lines
- Now we've found the 4 lines building up our square
- The radius of the circle to inscribe is 1/2 of the line length
- The center point of the circle to inscribe can be derived also (Pythagoras)
- Now the circle can be created via Circles2d.Add(...)

Kind regards,

Wolfgang Kunert - www.wksyspro.de

Wolfgang Kunert - www.wksyspro.de

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-05-2015 09:48 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-05-2015 10:01 AM - edited 11-05-2015 10:08 AM

Martin Bernhard recently tried the AddAutoConstraints method of the Relations2d object, but without success.

So you should find the 4 Line2d objects, building a square, on your own. When comparing coordinates you should consider to ignore absolute differences smaller than a given epsilon.

Kind regards,

Wolfgang Kunert - www.wksyspro.de

Wolfgang Kunert - www.wksyspro.de

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-05-2015 08:37 PM - edited 11-06-2015 03:26 PM

Hi:

I have attempted such sqaure detection and subsequent drawing geometry using it, which is detailed in this tutorial:

Check if this can be adapted for your case.

The executable for the program is on the page below.

~Tushar Suradkar

Follow Siemens PLM Software

© 2017 Siemens Product Lifecycle Management Software Inc