• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Small face fails

Scheduled Pinned Locked Moved Developers' Forum
5 Posts 3 Posters 324 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    soldatino
    last edited by 24 Oct 2010, 02:14

    stv=pts[0].vector_to(pts[2]).parallel? pts[0].vector_to(pts[3])
      if stv==false
        face = entities.add_face pts[0], pts[2], pts[3]
      end
    

    I have these 3 points:
    -7.628099 15.463042 39.735762
    -7.627601 15.463536 39.735292
    -7.634701 15.538607 39.416031
    if I use before the transformation with Ratio=39.37007874 the face works
    but if I don't use Ratio transform on the points, or I use Ratio=1, the face fails
    NOTE: the smallest edge of this face is long 0.0008, if I use Ratio=2 it becomes 0.0016, and in this case the face works. The "parallel?" works ever with these small points, but face does not. Strange. What's wrong?
    Thanks in advance!

    r3nDer tools

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dan Rathbun
      last edited by 24 Oct 2010, 06:02

      Sketchup's internal accuracy is only 0.001 inch for geometry.

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • S Offline
        soldatino
        last edited by 24 Oct 2010, 10:45

        @dan rathbun said:

        Sketchup's internal accuracy is only 0.001 inch for geometry.

        thanks Dan, I think this means that in my parser is probably best to turn all points in a single array and turn on my scale before launching the drawing operations for all the faces....

        r3nDer tools

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by 27 Oct 2010, 15:27

          You may be able to use a PolygonMesh instead of adding each Face. The mesh will also be faster to create than individual faces; but which is better depends on your goal.

          See also:
          http://code.google.com/apis/sketchup/docs/ourdoc/entities.html#add_faces_from_mesh
          http://code.google.com/apis/sketchup/docs/ourdoc/entities.html#fill_from_mesh

          Hi

          1 Reply Last reply Reply Quote 0
          • S Offline
            soldatino
            last edited by 28 Oct 2010, 14:18

            @jim said:

            You may be able to use a PolygonMesh instead of adding each Face. The mesh will also be faster to create than individual faces; but which is better depends on your goal.

            See also:
            http://code.google.com/apis/sketchup/docs/ourdoc/entities.html#add_faces_from_mesh
            http://code.google.com/apis/sketchup/docs/ourdoc/entities.html#fill_from_mesh

            Yes I thank you, but I am working about some interfaces between SketchUp and other CAD system. At this moment I am unable to find the unique criterion that SkUp uses to dispense the order of the ponts in the mesh. Especially about faces edited by subtraction of other faces or with holes.
            The mesh is really difficult to decode because the vertexes seem to hop and to return using a lot of different combinations. This is really laborious and so I use to split triangular faces, that in CAD is a 4 vertexs faces with a duplicated vertex, or, where it'i possible, a couple of SkUp triangles that are a unique (cad) 3DFACE.
            Anyway I thank you very much, because I'll to import also textures, and I will need of the meshes also, I fear...
            Excuse my bad english..

            r3nDer tools

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              2/5
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement