CAD Modeling

Working with CAD models

52 Topics 178 Posts
  • Problem with surface projection tool

    3
    0 Votes
    3 Posts
    293 Views

    Thanks for your useful suggestion!
    The problem I met was that the patch partically inserted into the human head, not on the surface, shown as a more clear figure below.Both gaps and overlaps exist between the projected cylinder and the skin.
    2e90feb6-bff3-43c1-99e9-4f56d3b70d96-image.png
    I have remeshed the human skin and the patch, to make the voxel sizes approximated match, and it worked out!
    Hope this will be helpful to others with similar problem, the mesh is the crucial role.

  • How to create the model by 2D picture

    4
    0 Votes
    4 Posts
    302 Views

    @bryn Thank you very much.I had succeeded.

  • Avoid solid

    6
    0 Votes
    6 Posts
    295 Views

    Only by snapping to objects. One strategy can be to use planar cuts to snap inside solids/surfaces

  • Create a loop using wire toolbox

    4
    0 Votes
    4 Posts
    270 Views

    Thanks @ofli and @bryn! Yes, that's what I'm doing now, I just create them in multiple segments.

  • Problems with AC

    2
    0 Votes
    2 Posts
    209 Views

    Dear Andrei,
    Could you please check that you have enough disk space? the error message specifies: "No space left on device".
    Best,
    Melina

  • wrapping tool

    4
    0 Votes
    4 Posts
    430 Views

    @mkn the feature is available in v6.2 (or even v6.0). You select the (triangle mesh) entities to project and then the target entity (last), and start the Project / Surface Projection tool. While the tool is often useful, it can fail when the entities to be projected are nearly as large as the target surface. It usually also helps to ensure the target surface is non-manifold (Mesh Doctor -> Make Manifold) and has no degenerate triangles (Mesh Doctor -> Create Degenerate Patch -> Local remeshing of patch(es)).

  • Problem with Boolean operation

    2
    0 Votes
    2 Posts
    221 Views

    I think the error "didn't manage to link up hole" usually occurs when the two objects (involved in the boolean operation) have nearly parallel touching surfaces. You could try:

    (always first make sure surfaces are manifold) make the cylinder overlap more with (deeper in to) the skin
  • 0 Votes
    1 Posts
    148 Views
    No one has replied
  • [SOLVED] How to route a pacemaker lead?

    4
    0 Votes
    4 Posts
    214 Views

    Thank you @bryn! I will adapt this to my needs.

  • Sketch spline fails systematically

    2
    0 Votes
    2 Posts
    156 Views

    I agree that it is unintuitive that the Spline tool stops when it snaps to a vertex. I will create a bug report.

    There are tools that may help you:

    Wire Tools / Routings Tool Box / Approximate Wire Wire Tools / Fit Spline

    The Approximate Wire tool allows you to specify the number of handles you want. It creates a parametric spline with handles (if Parametrize=True), so you can also edit it interactively by moving the handles.

    I guess you can also create a spline using a list of points using the Python API.

  • 0 Votes
    2 Posts
    169 Views

    I guess you have different options, in order of complexity

    stretch the whole model (it is 2.5D I think?) if there is something in the center that should not be stretched (electrodes?), you could cut the model (all entities) in three parts: bottom, center and top. you could stretch the top/bottom and then boolean unite them with the center. you could select the faces e.g. at the top (sub-picker) and offset them. you have to do this separately for each region. to specify the exact extrusion length, you can start pulling the arrow and then press the space key to type the offset/extrusion length (see attached gif)extrude.gif
  • How to scale a Model to a different size?

    1
    0 Votes
    1 Posts
    120 Views
    No one has replied
  • 0 Votes
    3 Posts
    348 Views

    @montanaro Works like a charm, thank you!!

  • 1 Votes
    1 Posts
    112 Views
    No one has replied
  • Setting up voxel priorities in model

    5
    0 Votes
    5 Posts
    318 Views

    Thanks for the answer. I thought there was a way since the VIP models handle this so well, but Python should work as well.
    Or is there a way to to sort the priorities by entitiy name?

  • CAD Projection tool

    7
    1 Votes
    7 Posts
    302 Views

    I see- thank you!

  • how to draw exponential line

    2
    1 Votes
    2 Posts
    220 Views

    Here is a piece of code that creates a coil wrapped onto a torus, using lines defined from 3D parametric equations.

    It makes use of Law(), Curve(), CreateWireBody() and SweepAlongPath() from the XCoreModeling package.

    import numpy as np import s4l_v1.document as document import s4l_v1.model as model import XCoreModeling def create_toroidal_coil(R, r, m, n=1, i=1, name="Toroid"): """ Create a spline model object with a spiral shape. The shape is defined from a 3D parametric equation. """ # equation b = 2. * np.pi * float(i) / float(m) x_component = "({R}-{r}*cos({b} + {n}*t)) * cos(t)".format(R=str(R), r=str(r), b=str(b), n=str(n)) y_component = "({R}-{r}*cos({b} + {n}*t)) * sin(t)".format(R=str(R), r=str(r), b=str(b), n=str(n)) z_component = "{r}*sin({b}+{n}*t)".format(r=str(r), b=str(b), n=str(n)) path = XCoreModeling.Law("vec({}, {}, {})".format(x_component, y_component, z_component)) curve = XCoreModeling.Curve(path, 0.0, 2.*np.pi) # Create a spline wire body to visualize wire = XCoreModeling.CreateWireBody( curve ) wire.Name = name torus_centerline = model.CreateCircle(model.Vec3(0,0,0), model.Vec3(0,0,1), 10) torus_centerline.Name = 'Centerline' torus = model.CreateSolidCylinder(model.Vec3(10,0,0),model.Vec3(10,0,0), 3) torus.ApplyTransform(model.Rotation(model.Vec3(1,0,0), np.pi/2)) XCoreModeling.SweepAlongPath(torus, torus_centerline, make_solid=True, cut_off_end=True) # Theoretical self-inductance: area = np.pi * (r*1e-3)**2 L_theoretical = 4.0e-7 * np.pi * n * n * area/ (2.0* np.pi *R * 1e-3) print(L_theoretical * 40) return wire, torus if __name__=="__main__": wire, torus = create_toroidal_coil(10,3,1, n=100)
  • Import a 3D geometry to sim4life

    2
    0 Votes
    2 Posts
    456 Views

    when you write inventor, do you mean "Autodesk Inventor" or "Open Inventor"?

    I guess the file is some kind of assembly, which is exported as a single STL file. STL does not support multi-part models, so you would need to export each part a separate STL file (or other format supported by Sim4Life), or you export it to a file format that supports multiple parts (ACIS .sab/.sat, STEP .step, ... VTK .vtm (multiblock)).

    STL also only supports triangle surface representations, so if you had a NURBS CAD file, you loose the that by exporting to STL.

    Searching for the topic I found this information for Autodesk Inventor to export as a multibody sab file:
    https://knowledge.autodesk.com/support/inventor/troubleshooting/caas/sfdcarticles/sfdcarticles/How-to-convert-Inventor-Assembly-file-to-a-multi-body-part-file.html

    btw. if the points in different parts aren't coincident, you may be lucky with your single STL file: try Modeling -> Mesh Tools -> Separate Meshes. This could separate disconnected parts.

  • Ellipsoid

    2
    0 Votes
    2 Posts
    231 Views

    Yes, there is. Create a sphere, then use the "Move" tool and look for the "Stretch" button on the right side of the 3D window.
    You can then stretch any of the 3 principal axis of the sphere.

  • Medical Image Segmentation

    3
    0 Votes
    3 Posts
    480 Views

    To comment on this case. The surface extraction in iSEG is inferior to the surface extraction in Sim4Life. So you probably want to export the labelfield as voxels (e.g. in Nifty, Nrrd or Metaheader format - the VTK format does not preserve the transformations correctly). You can also extract the tissue list as txt file in iSEG in order to set the tissue names e.g. via a python script in Sim4Life.