Face to Face Object Snapping
Re: Face to Face Object Snapping
Thank you for the explanation.
What I was referring to, is selecting small triangles.
The dots/squares become larger then the triangle edge's highlight
What I was referring to, is selecting small triangles.
The dots/squares become larger then the triangle edge's highlight
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Face to Face Object Snapping
Yeah, I'm aware of that. I might add a dot size control or auto sizing or something. Right now it's not even clear how big a size value is. Now the size is something like 9 or 10. 9 or 10 what's? It's not meters and it doesn't seem to be pixels. It'll take a little time to figure out because of the dev cycle:
close tS
make a change to the plugin code
compile the plugin code
start truespace
test it and hope it doesn't crash tS
repeat until it works/figure it out
Re: Face to Face Object Snapping
Yikes!
Baby steps takes hours!
Having preferences would be great...
dot size control or auto sizing, and No dot!
Thinking ahead, in case you develop other tools, like your Face to Face Snap...
If you incorporated your PickFace inside your Face to Face Snap scripts, you could have unique preferences verses global.
Baby steps takes hours!
Having preferences would be great...
dot size control or auto sizing, and No dot!
Thinking ahead, in case you develop other tools, like your Face to Face Snap...
If you incorporated your PickFace inside your Face to Face Snap scripts, you could have unique preferences verses global.
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Face to Face Object Snapping
Well, there's good news, the dot size is pixels after all. So there won't be any auto-sizing, just a size control.
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Face to Face Object Snapping
In your pm you mentioned that if you enable the copy option the inversion happens every other copy. So I tried it and finally saw what you saw. It only happens for me on the second time, not every other time.
This fixes it for me.You will need to test since we don't have the same results. I removed the unselect because it already is set to happen in the next command node.
bottom of the transform script:
This fixes it for me.You will need to test since we don't have the same results. I removed the unselect because it already is set to happen in the next command node.
bottom of the transform script:
Code: Select all
var sx = sourceMatrix.GetScaleX();
var sy = sourceMatrix.GetScaleY();
var sz = sourceMatrix.GetScaleZ();
sourceMatrix.SetScaleX(sx);
sourceMatrix.SetScaleY(sy);
sourceMatrix.SetScaleZ(sz);
Node.Value(sourceNode, "Matrix") = sourceMatrix;
//if(!Copy) {
//Space.Unselect()
//}
Re: Face to Face Object Snapping
Added your code
The above is for when Copy is false, to give an indication of when the tool ends and also disabling the toolbar icon commands.
The next script, Copy is true, the Source is selected, which enables the toolbar icon commands.
I also added UserInterface.OpenToolPanelViewEx2("" , "" ,"Scripts/CustomCommands/facetoface", 3, 1, 0); in this next script
.
.
. Cube selected is the Source shown in the Info panel
The bottom other Cube, 1 is an unmodified primitive(1st Destination)
Checked "Copy Source"
Selected the Cube's top two faces as the Source
Selected the Cube, 1 top two faces as the Destination and Snap
Selected the Cube, 2 top two faces as the Destination and Snap
repeat...
Results:
The Z rotation is different on the 3rd, 4th, 5th and 6th copies, and the rest are 0
Code: Select all
if(!Copy) {
Space.Unselect()
}
The next script, Copy is true, the Source is selected, which enables the toolbar icon commands.
I also added UserInterface.OpenToolPanelViewEx2("" , "" ,"Scripts/CustomCommands/facetoface", 3, 1, 0); in this next script
.
.
. Cube selected is the Source shown in the Info panel
The bottom other Cube, 1 is an unmodified primitive(1st Destination)
Checked "Copy Source"
Selected the Cube's top two faces as the Source
Selected the Cube, 1 top two faces as the Destination and Snap
Selected the Cube, 2 top two faces as the Destination and Snap
repeat...
Results:
The Z rotation is different on the 3rd, 4th, 5th and 6th copies, and the rest are 0
Re: Face to Face Object Snapping
Reinstalled tS761Std
Installed the tS761Std Beta UU that includes my additional Pick Face Widget, and the additional code from the previous post for the transform script
No inside out meshes!!!
No debug.log files!
Everything seems to be working as expected except what I posted in the previous post with the Rotation Z values issue. Also added...
to see it that helped, but no cigar.
Edit: 20 minutes latter...
Made some changes to the script
debug.log created in:
C:\trueSpace761Std/debug.log
Installed the tS761Std Beta UU that includes my additional Pick Face Widget, and the additional code from the previous post for the transform script
No inside out meshes!!!
No debug.log files!
Everything seems to be working as expected except what I posted in the previous post with the Rotation Z values issue. Also added...
Code: Select all
var rx = sourceMatrix.GetPitch()
var ry = sourceMatrix.GetRoll()
var rz = sourceMatrix.GetYaw()
sourceMatrix.SetPitch(rx)
sourceMatrix.SetRoll(ry)
sourceMatrix.SetYaw(rz)
Edit: 20 minutes latter...
Made some changes to the script
debug.log created in:
C:\trueSpace761Std/debug.log
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Face to Face Object Snapping
Do you use Chrome or the new Edge browser? The internet at the moment is blaming them for the debug log. Seems it was showing up on their desktops. Maybe it shows in trueSpace because you spend more time in tS folders. All wild guesses.
Re: Face to Face Object Snapping
I am using Edge and do not have Chrome installed.clintonman wrote: ↑17 Oct 2020, 16:59 Do you use Chrome or the new Edge browser? The internet at the moment is blaming them for the debug log. Seems it was showing up on their desktops. Maybe it shows in trueSpace because you spend more time in tS folders. All wild guesses.
Microsoft Edge is based on Chromium
Been having issues with Edge, ever since the Win10 2004 update
Guessing that the debug.log was created when I had an error.
From the Rosetta.log
Code: Select all
09:31:46.206 ERR Source object: /Scripts/CustomCommands/RectSelect/RMB Error: Microsoft JScript runtime error Description: 'Rectangle' is undefined Error code: 0x800a1391 - (null) Line: 5, Char: 0 Script text: if(Rectangle) { 0x80020101 [RcScriptCmd.cpp(1170)]
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Face to Face Object Snapping
Nope, doesn't mean anything to me.