sketchucation logo sketchucation
    • Login
    1. Home
    2. soldatino
    3. Topics
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 58
    • Groups 1

    Topics

    • S

      Alpha transparency in back face

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      27
      0 Votes
      27 Posts
      4k Views
      S
      Tig, I checked, but AdamB is right ... @adamb said: @tig said: In code you can ensure a face's normal is towards the camera [get angles between the view direction and the face.normal], if >180 you are looking at the front ! TIG, strictly this is only true for a parallel projection. Its broadly correct for perspective projection, but not for all cases. The search for the "internal" and "external" of the object, this is the only way to evaluate the order of the vertices of the faces. Instead, this code seems to be a solution. It is a raw code ... it investigates only the skin of a compact object, devoid of undercuts ... but I will write the recursive routine. the ray must to come and to go in the solid, each IN must find his OUT in the space, and to end this way in the open space, switching the on - off ... otherwise the beam was started by a face looking at the inside of the object, and the normal of that face watch inside (what I have to correct) ... if face.material==nil #and face.back_material!=nil model = Sketchup.active_model vertx=mesh.polygon_at 1 ray = [mesh.point_at(1), face.normal] item = model.raytest(ray, false) if item.to_s.length!=0 then # UI.messagebox(item.to_s.length.to_s) face.reverse! # face.material=face.back_material # else # UI.messagebox("ok") end end PS: at this moment in the code the point is one random of the face vertexes, it would be better to define an interior point on the plane of the face, which is not disturbed by any adjacent faces at 90 degrees that can confuse
    • S

      Error in Triangles with a small side

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      13
      0 Votes
      13 Posts
      836 Views
      S
      @driven said: are you updating su2pov3.rb or starting again? john No, it's an old version, I'm working on a new one, but unfortunately I'm trying to understand how to use SketchUp Alpha declared a value on one side, and a different value in the same back_face simultaneously. All this is complicated by the same concept in the statements of the parent block. A problem that for now I can not find answer ..... This is a version a bit less old, but I hope to improve soon http://imitidicthulhu2.blogspot.it/2010/12/skup2ray-v006.html
    • S

      Jpg textures in *.skp

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      34
      0 Votes
      34 Posts
      2k Views
      S
      thanks , I now see that about it there are topics in the forum...
    • S

      Small face fails

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      324 Views
      S
      @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..
    • 1 / 1