The API currently call the underlying existing GUID implementation - just pass through the call. I wouldn't expect it to change, should the underlying GUID implementation change for whatever reason, then the characters might be different. Say if the IFC specs changed for instance.
Posts made by tt_su
-
RE: ComponentInstance Guid question
-
RE: [REQ] Open and close all nested groups in selection
@tig said:
After the selection
grep
you need a.each
....grep takes a block which it will invoke on all matched elements. On large sets it's somewhat faster.
-
RE: ComponentInstance Guid question
GUIDs doesn't have a standard for formatting though.
Looking into the GUIDs we return it they are based on the IFC specification which describe compressed GUIDs for file-based exchange: http://www.buildingsmart-tech.org/implementation/get-started/ifc-guid
Having said that - the API doesn't actually have a contract to which characters it return. It would be safest to not depend on specific delimiter characters and instead use something like JSON or XML to carry the data.
-
RE: [Plugin] Hide Overlapping Geometry (Updated 20150511)
@jql said:
@pilou said:
YEP! Excellent!
What make exactly this double click ?When you create a group and copy it, it is just like any component, and you get duplicate instances of the same definition (duplicate groups behaving like duplicate components).
However, if you double-click it, you edit it, and even if you do nothing on it, it is made into a different definition, therefor "unique".
What happened is that the plugin hide the face of a group behaving as a component and in doing so it hid the face of both components. If you'd flipped it like Dave suggested, you wouldn't see the problem.
This isn't documented well in the API either. Something we need to improve. Developers need to call group.make_unique to ensure groups are unique before modifying them.
-
RE: [REQ] Open and close all nested groups in selection
From what I can gather this action is done in order to make groups unique - for that there is group.make_unique. That appears to be a more correct way to address it - you are after all looking for unique instances.
Not saying that being able to open an instance wouldn't be useful. (There is a way to close instances already, having a way to open would be a nice symmetry.)
-
RE: ComponentInstance Guid question
It appear that Base64 character set will depend on implementation. I'm not exactly sure which ones we generate, but I'm asking for more details.
@oajfh said:
Any particular reason why they seem non-standard Guids ?
Which standard are you referring to?
-
RE: ComponentInstance Guid question
The GUID is Base64. Are you actually seeing dollar and underscore characters?
-
RE: Vertex ordering problem
We actually had this issue with the STL exporter. STL doesn't have object hierarchy so we must export everything into one big mesh.
See issue here:
https://github.com/SketchUp/sketchup-stl/issues/129Then I think the commit that fixed was this one:
https://github.com/SketchUp/sketchup-stl/commit/4ad199a2d46245f2a668e47f2ee81bc36c9b9763 -
RE: SDK: Get Images data
@marc477 said:
What is the equivalent of SUTextureGetImageData for a SUImageRef? How can I access images pixel data?
Update -
SUImageGetData
should be equivalent.
http://www.sketchup.com/intl/en/developer/su-api/image_8h.html#aedb99aee21a39619602866fc400766cb -
RE: Vertex ordering problem
Do you have a sample model to share by the way - just so that we have the same data set to talk over. These types of discussions often become confusing because one inadvertently talk about different things.
-
RE: Vertex ordering problem
I posted on StackOverflow some time ago a snippet to detect if a transformation is flipped or not:
http://stackoverflow.com/a/17982272/486990 -
RE: Vertex ordering problem
@devilreborn said:
Actually is it possible to "temporarily" explode all the components and groups but at the same time not affecting the model (like not ACTUALLY exploding the groups)? I apologize if I didn't express this well enough but I sort of did something like that when I wrote a similar exporter for Blender.
Exploding would be incredible slow and would be a clunky brute force way to solve it. You can probably keep track of the transformation hierarchy when you traverse the model and inspect the transformation for when you need to reverse the vertex ordering.
Or ... I assume you are discarding group and instance hierarchy and export a mesh with everything in the same context? Then you can perhaps calculate the vertex winding based on the global position of the vertices at this point. Though I suspect the first method of inspecting the transformation matrix (which you need anyway to get the global position) will be faster.
-
RE: Vertex ordering problem
I think normally in 3d applications polygons are defined counter-clockwise. This is the case with SketchUp. However - this also depend if the face is reversed. You want to inspect the loops of the faces:
http://www.sketchup.com/intl/en/developer/docs/ourdoc/loop
http://www.sketchup.com/intl/en/developer/docs/ourdoc/face#loops
http://www.sketchup.com/intl/en/developer/docs/ourdoc/face#outer_loopThe Loop objects will return the vertices in order for each loop. If you dig into face.vertices directly they will represent multiple loops if the face has holes.
-
RE: Intersect_with revisited
@slbaumgartner said:
If you ponder Entities#intersect_with, you will notice a peculiar aspect: there are three Entities collections involved in the operation,
Two Entities collections, and one array of entities.
First is the one you call intersect_with on, the second is there the new entities will appear. The last is the set of entities to intersect with the Entities collection you called intersect_with on.@slbaumgartner said:
All of the examples I found used Groups, and despite having an associated Transformation, the Entities in a Group are actually captured in model coordinates at all times.
Hm... not quite sure what you get at here. But it could be that when you make a group the origin set at the model origin. But if you move the group after creating it the coordinates will be offset. I think this differs from components where the origin is set to the boundingbox minimum.
-
RE: Win32ole access violation
Have you tried this is a standalone version of Ruby? Just for comparison?
-
RE: Start_operation/commit_operation with sandboxTools
@sonjachr said:
I have contacted him and he told me that he could provide an API, which could solve my problem, hopefully.
That's excellent! IMO - his extension produce cleaner terrain than Sandbox Tools so that will be a win-win for you.
-
RE: Start_operation/commit_operation with sandboxTools
I see that TIG also has a script to generate a mesh from points. You might try to reach out to him too.
-
RE: Start_operation/commit_operation with sandboxTools
@sonjachr said:
Do you know, whether the source code of the sandbox FromContoursTool is available?
It isn't I'm afraid.
@sonjachr said:
Even if Fredo would allow me to use some of his source code it would be much too complicated for me to pick the right code to generate the Terrain.
I'd recommend reaching out and ask him. If he's on board with this he might be able to provide you with the exact code you need to include and then describe how to call it.
Then you'd have something that work reliably and isn't dependent on third party extension that might be disabled or suddenly change. (We have been talking about cleaning up our extensions so it's not unlikely Sandbox Tools would suddenly stop working for your purpose.)It would have been nice if we had an API for Sandbox Tools (or even seeing it open source IMO), but as it is right now it's not - so I don't have a good immediate solution for that.
I don't even know if I'm allowed to find and disclose a way to use the internals of Sandbox Tools.
-
RE: Start_operation/commit_operation with sandboxTools
Does it it has to be a Sandbox Tool mesh?
For instance, would it be an option to use a different way to create the terrain mesh? If so, maybe you could work out an arrangement with Fredo using some of his terrain code? http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=52039#p470701
To use Sandbox Tools I don't have an immediate answer right now. I'd have to dig into how it works. Though I would feel much better about this if we could find a solution for you where you didn't have to rely on such a fragile connection to Sandbox Tools.
-
RE: Start_operation/commit_operation with sandboxTools
You get two operations because Sandbox Tools create it's own operation - will will not become transparent to yours. It was never made to be called by third party extensions.
First of all, such things are very fragile. Any change in Sandbox Tools might break your extension - as you already noticed since you need to branch off for various SketchUp versions.
Secondly, Sandbox Tools might not be enabled by your users. Most will probably have it enabled, but some disable or even remove it. Making this even more fragile.
Actually, by default it's disabled for Make users. So out of the box for Make users this will not fly.
Might we step back a little bit here and query to what you are trying to make here?