Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: API - IRobotFiniteElement property

  1. #1
    Member
    Join Date
    2010-03
    Location
    Porto
    Posts
    18
    Login to Give a bone
    0

    Default API - IRobotFiniteElement property

    I'm trying to make a small program to generate finite elements in panels.
    I achieved to generate the FE. Now I want to assign each FE to a panel.
    I tried do set ObjectNumber property of the FE but i get a "read-only" error.
    How can I set the ObjectNumber property of a IRobotFiniteElement?

    I don't want to select the FEs and generate a new panel. I want to assign the FEs to an existing panel.

    Thanks in advance

  2. #2
    Member
    Join Date
    2009-10
    Posts
    15
    Login to Give a bone
    0

    Default Re: API - IRobotFiniteElement property

    You can create panel and generate FEs for it or create FEs and generate panel on them.
    But you can't create both panel and FEs and make them connected.

    Why don't you want to get the selection of all FEs connected to your panel, add your new FE and generate panel on this new FE selection?

  3. #3
    Member
    Join Date
    2010-03
    Location
    Porto
    Posts
    18
    Login to Give a bone
    0

    Default Re: API - IRobotFiniteElement property

    If I generate a new panel based in a FEs selection I get a panel with a lot of edges. The result is the creation of a edge in each FE of the border of the panel.

  4. #4
    Member
    Join Date
    2009-10
    Posts
    15
    Login to Give a bone
    0

    Default Re: API - IRobotFiniteElement property

    You can freeze the panel mesh and redefine the geometry to reduce the number of edges.
    The VB sample below changes the X coordinate of the beginning of 5th segment of panel contour.

    Set o = R.Project.Structure.Objects.Get(1)
    o.Mesh.Freeze = True
    o.Update
    Dim cont As RobotGeoContour
    Set cont = o.Main.Geometry
    Dim seg As RobotGeoSegment
    Set seg = cont.Segments.Get(5)
    seg.P1.Y = 0
    o.Initialize
    o.Update

  5. #5
    Member
    Join Date
    2010-03
    Location
    Porto
    Posts
    18
    Login to Give a bone
    0

    Default Re: API - IRobotFiniteElement property

    It's not what I was expecting but it's a possible solution.
    I'm going to try to make a macro to eliminate all the "exceeding" edges of a panel based in your suggestion.
    Something like IF (2 consecutive edges are collinear) THEN (eliminate the point in common). If you have any VB sample that makes something near this, I would be thankful.

    But it's a peaty that we can't assign FE to an existing panel.
    Thanks for your help.

  6. #6
    Member
    Join Date
    2009-10
    Posts
    15
    Login to Give a bone
    0

    Default Re: API - IRobotFiniteElement property

    Maybe it will be easier to generate the panel contour from scratch using only vertices (corner points) that define the panel geometry.
    Do you know coordinates of these points (see bitmap attached)?
    If you know all FEs you probably also know vertices of the panel.
    After freezing mesh you can redefine the panel geometry using only vertices.
    Attached Images Attached Images

  7. #7
    Member
    Join Date
    2010-03
    Location
    Porto
    Posts
    18
    Login to Give a bone
    0

    Default Re: API - IRobotFiniteElement property

    That's what I'm doing now. In your example it would be necessary to "eliminate" 16 vertices to get a contour with only 4 edges. In bigger panels the number of "exceeding" edges can be a lot.

    But I think that in my case there can be another solution.

    I have some simple applications to help the process of creating models that have panels, openings and bars. I use a Cad program where I draw the geometry and export to robot using API. I’m using this workflow because, in my case, I have much more accuracy and productivity in Cad than in RSA (only geometrical definition).

    I’m getting very good results, but sometimes, in some particular points of the model, the mesh generation in RSA “is not good”. Sometimes, in a single panel, I know the geometry of the mesh that should be created to be coherent with the others panels but apparently RSA don’t. Even using different kind of mesh generation options, emitters and other kind of strategies, sometimes it takes a lot of time to solve this problem.

    So I was thinking: how can I draw a mesh in Cad to export to RSA? Is it a good idea?
    That’s the reason of my first post in this thread.

    I have achieved to import any element (panel, bar, mesh, opening) from RSA to Cad.
    I also have achieved to define a mesh in cad and export it to RSA. My problem was to assign the new generated FE to an existing panel. Now I understand that I must create a NEW panel based in the NEW generated FE. But I would like to get rid of the “unnecessary” edges.

    So here is my idea.
    When I create in RSA a new panel based in FE, I have in cad a shape (closed polyline) that has the edges that I want in the new panel.
    I think I could redefine the geometry of the panel based in the geometry of my cad shape using API.

    Thanks for your help and your time.

    Luis
    Last edited by luiscr; 2010-04-01 at 11:55 AM.

  8. #8
    Member
    Join Date
    2009-10
    Posts
    15
    Login to Give a bone
    0

    Default Re: API - IRobotFiniteElement property

    If you can redefine the geometry of the panel based on the geometry of your cad shape, it seems to be the best solution. You will get both the mesh and the geometry exactly as you want.

  9. #9
    Member
    Join Date
    2010-03
    Location
    Porto
    Posts
    18
    Login to Give a bone
    0

    Default Re: API - IRobotFiniteElement property

    I managed to load and change the contour of a panel.
    How can I delete an edge and how can I add a new edge to a contour?
    I tried the methods “add” and “clear” of IRobotGeoContour without success.

  10. #10
    Member
    Join Date
    2010-03
    Location
    Porto
    Posts
    18
    Login to Give a bone
    0

    Default Re: API - IRobotFiniteElement property

    I tried a different approach that worked well.

    Changing the property “P1” of an edge to the same value of another sequent edge makes RSA to delete one of them.

    The method “add” of IRobotGeoContour worked well.
    For each new edge I used this 4 lines of code:
    Set seg = New RobotGeoSegmentLine
    seg.P1.Set X, Y, Z
    cont.Add seg ‘(”cont” is the IRobotGeoContourof the panel “PanRob”)
    PanRob.Initialize

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 10
    Last Post: 2013-12-17, 04:25 PM
  2. How to add a new property to the property tool bar
    By chaitanya.1217767394 in forum VBA/COM Interop
    Replies: 1
    Last Post: 2012-02-17, 08:52 PM
  3. Replies: 0
    Last Post: 2011-12-09, 02:57 PM
  4. Replies: 1
    Last Post: 2008-05-16, 05:57 AM
  5. Match property or property window
    By patrick.callewier in forum Inventor Wish List
    Replies: 0
    Last Post: 2005-03-22, 09:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •