SimplifiedLogic / creoson

OpenSource Automation using JSON Transactions for PTC's CREO Parametric
http://www.creoson.com
MIT License
81 stars 23 forks source link

file : assemble - request to add examples #42

Open dmtr99 opened 4 years ago

dmtr99 commented 4 years ago

[file : assemble] is quite a cool function, helped me a lot when i needed to place a component in 50 assemblies.

Is it possible to add a few more examples to the provided examples? I would also add a quick description on top of each example.

Requested examples:

Is it maybe possible to extract the constraints of one component in an assembly? Someting like [file : get_constraints] or [component : get_constraints] where you define the assembly and the component to retrieve the constraints. This way you could use it to paste the component quickly in other assemblies,

The following is a simple example, but used a lot, so I would centainly add it: default placement

{
  "sessionId": "~sessionId~",
  "command": "file",
  "function": "assemble",
  "data": {
    "file": "coupling.prt",
    "into_asm": "stub.asm",
    "constraints": [
      {
        "type": "def_placement"
      }
    ]
  }
}
davidhbigelow commented 4 years ago

Thanks! We use it quite often for many of our automation projects.

We have deliberately kept it simple - name references only for CSYS... they are the most stable thing in Pro/E / Wildfire / Creo. But requires automations to be planned for them as known/expected (e.g. skeletons, interfaces in parts/assemblies) - this assumes a design standard for the automation / use of models.

Digging deeper into component constraints for assembly has been talked about for years - but we never seem to agree that it is better than just using a CSYS as the constraint. The main reason for this is that we have seen legacy models that too often were modeled with different references/constraints relative to new design standards / automation purposes. Things modeled years ago - would likely need to be augmented with the additional features/orientations to be able to be used with current standards for most companies. Which then comes to ... do we require a customer to spend a lot of time creating/locating/orienting/naming MULTIPLE plane/datum features - or just create/locate/name a CSYS for the purpose. CSYS wins everytime in our book. So that is what we recommend.

So I don't see this changing - without a REALLY compelling argument. CSYSs are very stable and easy to parameterize and use if needed - so we recommend them as a default. If the APIs are available in JLINK - we might consider the defined interface constraint... (but that would need more research - not sure PTC has exposed that).

We can look at adding a few more examples for the assemble function... I always think that is a good thing.

Our commercial product (Nitro-CELL http://www.simplifiedlogic.com/nitro-cell) adds some handy options for assembling things (e.g. wildcard name targets, and even renaming features with custom incremental names) -- so instead of looping through 50-CSYS assemble operations - you could simply reduce the call to one that wildcard hits each CSYS by a name match (e.g. SCREW_*).

This can be mimicked in CREOSON - with a bit of coding... the net effect would be the same.

Dave

On Sat, Feb 8, 2020 at 1:34 AM dmtr99 notifications@github.com wrote:

[file : assemble] is quite a cool function, helped me a lot when i needed to place a component in 50 assemblies.

Is it possible to add a few more examples to the provided examples? I would also add a quick description on top of each example.

Requested examples:

  • Constraints: on planes (like AFRONT to FRONT with a distance, ARIGHT to RIGHT allined, ATOP to TOP allined)
  • Constriants: coordinate system from assembly to coordinate system of component

Is it maybe possible to extract the constraints of one component in an assembly? Someting like [file : get_constraints] or [component : get_constraints] where you define the assembly and the component to retrieve the constraints. This way you could use it to paste the component quickly in other assemblies,

The following is a simple example, but used a lot, so I would centainly add it: default placement

{ "sessionId": "~sessionId~", "command": "file", "function": "assemble", "data": { "file": "coupling.prt", "into_asm": "stub.asm", "constraints": [ { "type": "def_placement" } ] } }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SimplifiedLogic/creoson/issues/42?email_source=notifications&email_token=AAMSRJIOKFRTD5HIHNFMVQ3RBZG63A5CNFSM4KRYUYX2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IL7D3DA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMSRJOR53E5HHQDRUJYFXDRBZG63ANCNFSM4KRYUYXQ .

-- David Bigelow, President Simplified Logic, Inc https://www.simplifiedlogic.com | SimilarParts.ai C: 317-431-5454

davidhbigelow commented 4 years ago

Whopps - did not hit this latest release for better examples... will try to get some the next.