Meshes move when combined

I have a function to place a block and combine it on a piece-based terrain, but I'm running on some issues. When I try to instantiate the block without combining it, it is instantiated at the (0,0,0) position block, but at the correct height. For example, if my blocks are 10 * y * 10 and I click (10), 5,10), which is the second block, the block is instantiated at (0,5,0). When I try to combine the block, it is instantiated at the right position, but the rest of the block is all moved away
at an other place. Probably in the context of localToWorldMatrix.
Here is the script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;

public class worldEdit : MonoBehaviour
{
public int tindex;
public GameObject cube;
Vector3 diagMid(Vector3 pt1, Vector3 pt2, Vector3 pt3)
{
    List dists = new List();
    dists.Add(Vector3.Distance(pt1,pt2));
    dists.Add(Vector3.Distance(pt1,pt3));
    dists.Add(Vector3.Distance(pt2,pt3));
    int index = dists.IndexOf(dists.Max());
    Debug.Log(index); 
    switch(index)
    {
        case 0: return new Vector3((pt1.x+pt2.x)/2,(pt1.y+pt2.y)/2,(pt1.z+pt2.z)/2); break;
        case 1: return new Vector3((pt1.x+pt3.x)/2,(pt1.y+pt3.y)/2,(pt1.z+pt3.z)/2);  break; 
        case 2: return new Vector3((pt2.x+pt3.x)/2,(pt2.y+pt3.y)/2,(pt2.z+pt3.z)/2); break;
        default: Debug.Log("def"); return new Vector3(0,0,0); break;
    }
}
Vector3 cubePosition(Vector3 pt1, Vector3 pt2, Vector3 pt3,Vector3 caDif, Vector3 diag)
{
    List dists = new List();
    dists.Add(Vector3.Distance(pt1,pt2));
    dists.Add(Vector3.Distance(pt1,pt3));
    dists.Add(Vector3.Distance(pt2,pt3));
    int index = dists.IndexOf(dists.Max());
    Vector3 v1 = new Vector3(0,0,0); Vector3 v2 = new Vector3(0,0,0);
    if(index == 0){v1 = pt1; v2 = pt2;}else if(index == 1){v1 = pt1; v2 = pt3;}else if(index == 2){v1 = pt2; v2 = pt3;}else{Debug.Log("else");}
    Vector3 axi = new Vector3(0,0,0);
    if(v1.x-v2.x == 0){axi = new Vector3(1,0,0);}else if(v1.y-v2.y == 0){axi = new Vector3(0,1,0);}else if(v1.z-v2.z == 0){axi = new Vector3(0,0,1);}
    else{Debug.Log("else");}
    return new Vector3(((axi.x *(caDif.x/Mathf.Abs(caDif.x))) * 0.5f)+diag.x,((axi.y *(caDif.y/Mathf.Abs(caDif.y))) * 0.5f)+diag.y,((axi.z *(caDif.z/Mathf.Abs(caDif.z))) * 0.5f)+diag.z);
}
void Update()
{
    Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    RaycastHit hit;
    if(Physics.Raycast(ray,out hit))
    {
        tindex = hit.triangleIndex;
        if(Input.GetMouseButtonDown(0))
        {

            Vector3() v = hit.collider.gameObject.GetComponent().mesh.vertices;
            int() tri = hit.collider.gameObject.GetComponent().mesh.triangles;
            List closV = new List();
            closV.Add(v(tri(hit.triangleIndex*3+0)));
            closV.Add(v(tri(hit.triangleIndex*3+1)));
            closV.Add(v(tri(hit.triangleIndex*3+2)));
            Vector3 diago = diagMid(closV(0),closV(1),closV(2));
            Vector3 cam = Camera.main.transform.position;
            Vector3 c = new Vector3(cam.x - hit.point.x,cam.y - hit.point.y,cam.z - hit.point.z);
            GameObject mesh = hit.collider.gameObject;
            MeshFilter meshF = Instantiate(cube,cubePosition(closV(0),closV(1),closV(2),c,diago),Quaternion.identity).GetComponent();

            MeshFilter() meshFilters = new MeshFilter(){meshF,mesh.GetComponent()};
            CombineInstance() combine = new CombineInstance(meshFilters.Length);
            Destroy(mesh.gameObject.GetComponent());
            int i = 0;
            while (i < meshFilters.Length)
            {
                combine(i).mesh = meshFilters(i).sharedMesh;
                combine(i).transform = meshFilters(i).transform.localToWorldMatrix;
                meshFilters(i).gameObject.SetActive(false);
                i++;
            }
            Destroy(meshFilters(0).gameObject);
            mesh.GetComponent().mesh = new Mesh();
            mesh.GetComponent().mesh.CombineMeshes(combine);
            mesh.gameObject.SetActive(true);
            mesh.AddComponent();
        }
...

pathfinder 1e – Can the archetypes Separatist and Scroll Scholar be combined?

Each of these archetypes changes the way the cleric's domains work, and I'm not sure they can be combined.

The separatist chooses a domain from those that his deity usually offers, and a secondary domain that can be almost anything. For this secondary domain:

Granted powers from the second domain of the cleric function as if the
Cleric level, wisdom and charisma were 2 lower than normal (minimum
Level 1) in terms of effect, DC and use per day. This also means the
The separatist receives the superior ability of the domain only from 2
Levels later than normal. If the second domain grants additional class
Skills that the separatist earns as usual.

The scroll scholars get diligent students who

… replaces one of the granted powers of the 1st level of her
domains – The character can choose which of his first two levels he wants
replaced.

Here are the ways I could see how this is regulated:

  1. The archetypes can not be combined because they both change the domains class function
  2. The archetypes can be combined, but Diligent Student must replace the ability of the primary domain, as this is the only domain power the cleric has at the 1st level.
  3. The archetypes can be combined, and Diligent Student can replace the power of the first level of the second domain, although the cleric usually gets that power only at level 3.
  4. The archetypes can be combined, but Diligent Student can not be used until level 3 if it replaces the ability of the second domain. In this case, Diligent Student functions as if the cleric were 2 levels lower, just like the second domain.

Is there an official way in which these archetypes would work together, or are they mutually exclusive?

How to use builder pattern combined with protected access modifier?

I'm reading a book in Design Patterns and below is a code example used by the author. The author tries to create an HTML builder as follows (code in C #):

public class HtmlElement
{
    public string Name, Text;
    public List Elements = new List();

    public HtmlElement() { }
    public HtmlElement(string name, string text)
    {
        Name = name;
        Text = text;
    }
    // factory method
    public static HtmlBuilder Create(string name)
    {
       return new HtmlBuilder(name);
    } 
}

//builder class
public class HtmlBuilder
{
    protected readonly string rootName;
    protected HtmlElement root = new HtmlElement();
    public HtmlBuilder(string rootName)
    {
        this.rootName = rootName;
        root.Name = rootName;
    }
    public HtmlBuilder AddChild(string childName, string childText)
    {
        var e = new HtmlElement(childName, childText);
        root.Elements.Add(e);
        return this;            //fluent api
    }

     // to return a HtmlElement object
    public static implicit operator HtmlElement(HtmlBuilder builder)
    {
        return builder.root;
    }
    public override string ToString() => root.ToString();
}

then the author says:

Msgstr "" "To simply force users to use the builder if they have one HtmlElement Object, we have hidden all constructors from HtmlElement Class as ":

public class HtmlElement
{
   ...
   protected HtmlElement() { }
   protected HtmlElement(string name, string text)
   {
      Name = name;
      Text = text;
   }
   ...
}

so users like to go

HtmlElement root = HtmlElement.Create("ul").AddChildFluent("li", "hello").AddChildFluent("li", "world");

Console.WriteLine(root);

I do not understand the following: The author has changed the access modifier from HtmlElementThe designers of protected, which means, that HtmlBuilder Class can not access the protected constructors like

protected HtmlElement root = new HtmlElement();    // not allowed

It also means that we have to allow that HtmlBuilder inherited from HtmlElement? But they are not inheritance contexts at all. How can I change it?

Combined DB technologies?

Dear forum – still a DB decision question. Thank you in advance for any good advice.

So I set up a database for the "media archive" of our company. It contains metadata about (1) print data (such as newspaper clippings, book reviews, marketing documents, books and brochures published by us) and (2) audiovisual data (basically everything with a timeline, such as digitized videos and audio files). DVDs and CDs). These two create the main data tables, and there are a few other smaller ones …

Combined DB technologies?

[Vn5socks.net] Car Update 24/7 – Good Socks 10h10 PM

LIFE ~ 166.62.117.207:17935 | 0,181 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 209.240.109.238:9050 | 0.221 | Lee's Summit | MO | unknown | United States | Checked for vn5socks.net
LIFE ~ 192.169.189.120:29529 | 0.18 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 166.62.43.205:49683 | 0.349 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 192.169.231.160:39750 | 0.369 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 70.168.93.201:17009 | 0.334 | Santa Barbara | CA. | unknown | United States | Checked for vn5socks.net
LIFE ~ 192.169.236.118:18491 | 0.367 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 184.176.166.8:17864 | 0.317 | unknown | unknown | unknown | United States | Checked for vn5socks.net
LIFE ~ 192.169.224.204:6837 | 0,343 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 192.169.189.120:10306 | 0,181 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 174.70.241.27:24413 | 0,325 | unknown | unknown | unknown | United States | Checked for vn5socks.net
LIFE ~ 174.70.241.7:24385 | 0.326 | unknown | unknown | unknown | United States | Checked for vn5socks.net
LIFE ~ 166.62.54.164:5357 | 0.323 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 109.175.6.166:13101 | 0,357 | Tuzla | 01 | unknown | Bosnia and Herzegovina | Checked for vn5socks.net
LIFE ~ 220.79.34.109:2018 | 0.086 | Seoul | 11 | unknown | Korea, Republic of | Checked for vn5socks.net
LIFE ~ 169.239.221.90:50802 | 0.472 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 166.62.103.159:57531 | 0.396 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 166.62.91.192:64531 | 0.215 | unknown | unknown | unknown | unknown | Checked for vn5socks.net

Feuerhimmel
Reviewed by Feuerhimmel on
,
[Vn5socks.net] Auto Update 24/7 – Good Socks 10h10 PM
LIVE ~ 166.62.117.207:17935 | 0.181 | Unknown | Unknown | Unknown | Unknown | Checked at vn5socks.net
LIVE ~ 209.240.109.238:9050 | 0,221 | Lee's Summit | MO | Unknown | United States | Checked at vn5socks.net
LIVE ~ 192.169.189.120:29529 | 0.18 | Unknown | Unknown | Unknown | Unknown | Checked at vn5socks.net
LIVE ~ 166.62.43.205:49683 | 0,349 | Unknown | Unknown | Unknown | Unknown | Checked at vn5socks.net
LIVE ~ 192.169.231.160:39750 | 0,369 | Unknown | unknown

Rating: 5

[Vn5socks.net] Car Update 24/7 – Good Socks 12h00 PM

LIFE ~ 69.4.86.194:47343 | 0.261 | unknown | unknown | unknown | United States | Checked for vn5socks.net
LIFE ~ 166.62.43.205:49683 | 0,181 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 47.94.244.27:7302 | 0.23 | Ottawa | ON | k1y4h7 | Canada | Checked for vn5socks.net
LIFE ~ 192.169.218.22:20137 | 0,199 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 220.79.34.109:2018 | 0.115 | Seoul | 11 | unknown | Korea, Republic of | Checked for vn5socks.net
LIFE ~ 166.62.53.145:12932 | 0201 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 212.237.34.93:6483 | 0,302 | unknown | unknown | unknown | Denmark | Checked for vn5socks.net
LIFE ~ 24.249.199.14:57335 | 0.342 | unknown | unknown | unknown | United States | Checked for vn5socks.net
LIFE ~ 166.62.54.164:5357 | 0.212 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 166.62.116.91:17802 | 0.18 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 192.169.189.120:29529 | 0,191 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 192.169.236.118:18491 | 0.18 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 82.165.137.115:7061 | 0.26 | unknown | unknown | unknown | Germany | Checked for vn5socks.net
LIFE ~ 166.62.52.19:62802 | 0.286 | unknown | unknown | unknown | unknown | Checked for vn5socks.net
LIFE ~ 40.117.74.171:51729 | 0.227 | Indianapolis | IN THE | 46285 | United States | Checked for vn5socks.net
LIFE ~ 113.120.36.92:6682 | 0,298 | Peking | 22 | unknown | China | Checked for vn5socks.net
LIFE ~ 94.177.188.120:1188 | 0.28 | Galati | 18 | unknown | Romania | Checked for vn5socks.net
LIFE ~ 192.169.202.18:32188 | 0.351 | unknown | unknown | unknown | unknown | Checked for vn5socks.net

Feuerhimmel
Reviewed by Feuerhimmel on
,
[Vn5socks.net] Auto Update 24/7 – Good Socks 12h00 PM
LIVE ~ 69.4.86.194:47343 | 0,261 | Unknown | Unknown | Unknown | United States | Checked at vn5socks.net
LIVE ~ 166.62.43.205:49683 | 0.181 | Unknown | Unknown | Unknown | Unknown | Checked at vn5socks.net
LIVE ~ 47.94.244.27:7302 | 0.23 | Ottawa | ON | k1y4h7 | Canada | Checked at vn5socks.net
LIVE ~ 192.169.218.22:20137 | 0,199 | Unknown | Unknown | Unknown | Unknown | Checked at vn5socks.net
LIVE ~ 220.79.34.109:2018 | 0,115 | Seoul | 11 | Unknown | Korea,

Rating: 5

,

Web App – status icon for verified, claimed and combined

I am currently working on a web app that has different statuses. It can either be nothing, asserted, verified or asserted and verified.

This is the current version for the status "verified". I wonder what solution is best for displaying the various status types as icons in the corner by changing the icon or color. Which is the correct symbol to indicate "asserted"? Or should I use other colors and ID forms?

Really appreciate your feedback and input :]

Enter image description here

I was wondering if this is a possible solution:

Enter image description here

The claimed shape is part of the combined state and the form under review has the final shape. Gasoline is also the company color, so the combination of blue and green is gasoline. Would it make sense?